A quick guide on how to use sudo without a password

Please note: there is a better way to get root access and run as sudo for a lot of commands, type sudo -s, this will give you a root prompt and you no longer have to type sudo, this will mean you just type in your password once and thats it for the rest of the session. This guide is for people like me who use sudo and kdesu a lot but at lots of different times.

Most of the time i use sudo without a password, i do this simply because it is much easier when running lots of commands and my password is long and complicated and its just a pain to keep typing it over and over again. So i setup sudo so that it does not ask for a password to run commands. This if how to do it:

1. Run kdesu kwrite

2. Put in your password

3. Open /etc/sudoers

(Please note this compromises the security so don’t say i didn’t warn you)

4. Add:

username ALL=NOPASSWD: ALL

to the sudoers file making sure to change username to your username. Now save the file and test it.

It should have worked and now you should be sudoing happily all day long, i only use this during the initial install stages, after everything is setup i simply comment it out.


Post A Comment

Latest News

Monthly archives