Results 1 to 3 of 3
Thread: How to change /etc/sudoers ?
Enjoy an ad free experience by logging in. Not a member yet? Register.
How to change /etc/sudoers ?
Use the visudo command (do not edit /etc/sudoers directly). You can follow the examples that are already in the file.
Found an easier explanation to edit /etc/sudoers. I found it in a different forum. Here it is :
sudo visudo will drop you into a vim session to edit the sudoers file.
To make the changes you want, you will need to add lines like the following under the #Defaults specifications line:
Defaults:short username timestamp_timeout=0
short username is your short username.
Note that you will be using vim to edit this file. Vim is a very nice command line text editor, but its not exactly strait forward to use.
Before you can type text into the window, use the arrow keys to navigate the cursor to the spot where you want to start typing and then enter insert mode by hitting i first. When you are done entering text, hit esc to go back to command mode. Write the file back to disk by typing :w followed by enter. Exit visudo with :q followed by enter.
If you do decide to change your account to a non-admin user, but still want o retain the ability to superuser from the command line, add the following line at the bottom of your sudoers file (with visudo):
short username ALL=(ALL) ALL