I just set-up ubuntu 9.10 on my computer, and I'm trying to figure out how to avoid typing a password on every action that requires sudo privileges. I just want to type a password once on login and have all rights throughout my session. Also, I'd rather not login as root, but using my own username and settings. Thanks.
feedback
|
|
sudo visudo and add the following line: MYUSERNAME ALL=NOPASSWD: ALL replacing MYUSERNAME with your username :) This allows your user account to sudo any command without requiring a password. Note that there are inherent security risks with this though - for example if someone can persuade you to run a script, that script could sudo and do things as root without you noticing. It is convenient though. | |||
|
feedback
|
|
You can set timestamp_timeout in the sudoers file ( From
timestamp_timeout
Number of minutes that can elapse before sudo will ask
for a passwd again. The default is 15. Set this to 0
to always prompt for a password. If set to a value
less than 0 the user's timestamp will never expire.
This can be used to allow users to create or delete
their own timestamps via sudo -v and sudo -k
respectively.
| |||
|
feedback
|
|
You can edit your sudo config file and add the NOPASSWD where appropriate. See the man page ( The config file is usually | ||||
|
feedback
|
|
Set a root password, use 'su' :) | |||||||||
feedback
|