Wednesday, May 24, 2017

user with sudo access without password





--------------------------------------------

Often times, I wish to carry out privileged operations while logged in as a user.

You can this line in /etc/sudoers, to avoid password every time.


<username_here>   ALL=(ALL)    NOPASSWD: ALL

I usually add it below this line:

## Same thing without a password
# %wheel    ALL=(ALL)    NOPASSWD: ALL
<username_here>   ALL=(ALL)    NOPASSWD: ALL

--------------------------------------------

You can try commands like this:
#sudo vgs

You can be root simply by:
#sudo su


--------------------------------------------

No comments:

Post a Comment