Find the answer to your Linux question:
Results 1 to 4 of 4
I'm a normal user 'sthakkar' on Linux platform. I had the root passwd and I tried to modify the /etc/sudoers file. [sthakkar@linux log]$su Password: [sthakkar@linux log]# visudo /etc/sudoers Code: Host_Alias ...
  1. #1
    Just Joined!
    Join Date
    Apr 2007
    Posts
    59

    /etc/sudoers file

    I'm a normal user 'sthakkar' on Linux platform. I had the root passwd and I tried to modify the /etc/sudoers file.
    [sthakkar@linux log]$su
    Password:
    [sthakkar@linux log]# visudo /etc/sudoers
    Code:
    Host_Alias        MACHINE= linux
    User_Alias        USER= sthakkar
    Cmnd_Alias      YPBIND= ypbind
    Runas_Alias     ROOT= root
    
    USER    RHEL4 = (root) NOPASSWD: /sbin/ypbind
    When I do:
    [sthakkar@linux log]$sudo -u sthakkar /sbin/ypbind
    sthakkar is not in the sudoers file. This incident will be reported.

    Why?

  2. #2
    Just Joined!
    Join Date
    Apr 2007
    Posts
    59

    it works

    The above things wirks when I comment the Cmnd_Alias.
    Now, I want to give permissions to edit /etc/services file.?
    Should I use 'sudoedit'?

  3. #3
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    Running
    # visudo
    is sufficient (without specifying a file).

    When you run
    sudo -u sthakkar /sbin/ypbind
    you're telling sudo to run /sbin/ypbind as sthakkar. I don't think that's what you want. Remove the -u option.

    Finally, why do you need to edit the /etc/services file?

  4. #4
    Just Joined!
    Join Date
    Apr 2007
    Posts
    59
    Thanks ...
    we are product based company and we have a product where we should add our service to /etc/services.

Posting Permissions

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