Find the answer to your Linux question:
Results 1 to 3 of 3
Hi everybody! I'm new to knoppix......I'm using knoppix 5.1 installed to the hard disk.....How do I edit/change the /etc/sudoers file where I can use sudo in the terminal ?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! stonerrob420's Avatar
    Join Date
    Jun 2007
    Location
    Tennessee, USA
    Posts
    6

    How to change /etc/sudoers ?


    Hi everybody! I'm new to knoppix......I'm using knoppix 5.1 installed to the hard disk.....How do I edit/change the /etc/sudoers file where I can use sudo in the terminal ?

  2. #2
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    Use the visudo command (do not edit /etc/sudoers directly). You can follow the examples that are already in the file.

  3. #3
    Just Joined! stonerrob420's Avatar
    Join Date
    Jun 2007
    Location
    Tennessee, USA
    Posts
    6

    /etc/sudoers

    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:root timestamp_timeout=0
    Defaults:%admin timestamp_timeout=0
    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

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •