PDA

View Full Version : Sudo no password



kari
19th October, 2009, 10:39 AM
Here’s how you can set Ubuntu to not prompt for your password when using sudo.
Launch a terminal window and enter the following command:

# sudo visudo

Visudo is a tool used to edit the configuration file of sudo . The command will prompt your for your password. Enter it one last time. The configuration file will open in a text editor, most likely Nano. Scroll down to the end of the document and add the following line:

username ALL=NOPASSWD: ALL

Replace username with the username of the user you want to allow a passwordless sudo. So if the user is kari, you would enter:

kari ALL=NOPASSWD: ALL

Save and exit the file. Log out, log in as the user kari and test out your new passwordless sudo.

Note: this is something that is not recommended if you are using your computer in a public place or at your work

eleos
14th November, 2009, 03:28 AM
Thnx!
Very usefull post

hackhain
12th February, 2010, 09:51 PM
Here?s how you can set Ubuntu to not prompt for your password when using sudo.
Launch a terminal window and enter the following command:

# sudo visudo

Visudo is a tool used to edit the configuration file of sudo . The command will prompt your for your password. Enter it one last time. The configuration file will open in a text editor, most likely Nano. Scroll down to the end of the document and add the following line:

username ALL=NOPASSWD: ALL

Replace username with the username of the user you want to allow a passwordless sudo. So if the user is kari, you would enter:

kari ALL=NOPASSWD: ALL

Save and exit the file. Log out, log in as the user kari and test out your new passwordless sudo.

Note: this is something that is not recommended if you are using your computer in a public place or at your work
Beware of that you are serving yourself in silver plate with root privileges. That's why we are using sudo with pass for your security.

zerofool2005
14th February, 2010, 12:35 AM
They are right. You should only run things in root if you really need to.

Root is dangerous if mis-handled

jeremias
22nd July, 2010, 07:50 PM
Hi

Very useful, post thank you!

Jeremias

rwl408
13th August, 2010, 03:16 PM
Here?s how you can set Ubuntu to not prompt for your password when using sudo.


It would be safer to limit the scope of "no password" through CMD_ALIAS. For example, I skip the password for reboot, shutdown, mount, and umount only.

rwl408
13th August, 2010, 03:22 PM
It would be safer to limit the scope of "no password" through CMD_ALIAS. For example, I skip the password for reboot, shutdown, mount, and umount only.

By the way, be extremely careful when you "su visudo". It is too easy to mess up things and I had to boot to recovery mode to fix it a few times.

stealthier
13th August, 2010, 05:07 PM
I think that you shouldn't do it, cause it is not so good for your security m8. You increase vulnerability with that thing

mondeo1965
23rd September, 2010, 09:40 PM
I will never do that on my Ubuntu computer.

radu_gostian
28th September, 2010, 12:55 PM
And that s how you make your account to a root one :).
Why bother with that account just use root account instead :)

makikou
1st October, 2010, 10:57 PM
very usefull post, thanks for post