Monday, February 22, 2016

Execute sudo command without authenticating via password

The approach to solve your problem is to put your user in sudoers file, like you can see.
Open terminal window and type:
sudo visudo
In the bottom of the file, type the follow:
username ALL=(ALL) NOPASSWD: ALL
Where username is your username in your system. Save and close sudoers file (if you haven't changed your default terminal editor (you'll know if you have), press ctl+x to exit nano (but note that the screenshot below shows vim), and it'll prompt you to save).
sudoers file]
After this, you can, in terminal window, type sudo <Whatever you want>, without being prompted for the password.
This only applies, to sudo command in terminal window. For example, when you try to install a package in software center, you will be prompted to insert your password, like you can see in the next Screenshot.

Sources: http://askubuntu.com/questions/147241/execute-sudo-without-password

No comments:

Post a Comment