Thursday, September 16, 2010

Using sudo without a password

One of the most noticeable features of ubuntu is the common use of sudo in order to perform ‘root’ level tasks.  By default the ‘root’ user is disabled leaving sudo as the most used method of running administrator level commands and tasks.

A intial setup of sudo requires the user to type in the password everytime the command is used.  Although the autorization is maintained for a few minutes after the password is first used it can become quite tedious to constantly be prompted for a password on commonly used commands.

I have set up my own ubuntu 9.10 Karmic Koala system to allow the aptitude command to be run without having to type my password.  This lets me cron a very small script to keep my system up-to-date without being prompted for a password.

Here’s how I set it up:

$ sudo visudo

Below the line “%admin ALL

No comments:

Post a Comment