Visudo Nopasswd Not Working

Visudo not working anymore, what can I do?

visudo just a binary file with no built-in configurations, so you can safely replace it. Is included in the sudo package, which you can reinstall by typing:

sudo apt-get install --reinstall sudo

And if you're inclined to learn how to use the editor you stumbled onto, try typing

vimtutor

If all you care to know is how to exit vi / vim without breaking anything, the way to do is to type :q!

visudo nopasswd not working

Try:

%admin ALL=(ALL) NOPASSWD: /usr/bin/java -jar /opt/myapp/myapp.jar

Permission denied after visudo nopasswd set for port command

You actually want to achieve two things:

1. Making it possible to run sudo port without the need to enter a password.

You already solved that by adding the following line to /etc/sudoers:

%admin ALL=(ALL) NOPASSWD: /opt/local/bin/port

2. Making it possible to run sudo port without the need to explicitely type sudo

This can be done by an shell alias. Since the question is tagged bash I assume your shell is bash. In that case modify your .bashrc and add the following line:

alias port='sudo port'

Start a new shell and it should work.

Sudo NOPASSWD not registering/working/showing

To aide debugging and maintainability you should split your rules:

%groupname ALL=(root) NOPASSWD: SOFTWARE
%groupname ALL=(GROUPALIASNAME) NOPASSWD: APP

Splitting your rules onto different lines makes it clearer what you are trying to do.

Ensure that the user you are trying to run sudo as, is in %groupname.

Ensure that you are using something like sudo -u user1 (etc) so the Runas_alias is actually effected.

The other thing you need to do, is if you are testing changes as the destination user, if you just added your user to %groupname, you need to log out and log back in for the group add to actually work.



Related Topics



Leave a reply



Submit