Results 1 to 4 of 4

Thread: Confirmation required before editing sudoers

  1. #1
    Join Date
    Feb 2009
    Location
    /earth/india/mumbai
    Beans
    599
    Distro
    Ubuntu 12.04 Precise Pangolin

    Confirmation required before editing sudoers

    I need to enable shutdown and reboot from command without the need of entering sudo password.
    I know i have to edit /etc/sudoers file and add custom entry to it.
    My UserID is already added to admin group.There is this entry for admin group(at the very end of file) already in sudoers file which allows ALL access to admin group.
    So,my question is:if i enter following command AFTER the existing line for %admin
    Code:
    %admin ALL=NOPASSWD: /sbin/shutdown,/sbin/reboot
    will it affect the original rule of %admin?
    My requirement is very clear:sudo pwd to be entered for all sudo commands except shutdown and reboot..
    Waiting for expert's inputs..

    Vote for my Idea
    ~~~Open-source Software and Patience go hand in hand~~~

  2. #2
    Join Date
    Apr 2009
    Location
    Rawalpindi, Pakistan
    Beans
    5,669
    Distro
    Ubuntu Gnome Development Release

    Re: Confirmation required before editing sudoers

    My blog-mate wrote something on this at the very bottom of this post:

    http://www.tuxgarage.com/2011/09/shu...for-linux.html

    And yeah, it would only exclude the 'admin' group, or even if you want to, a specific user, from entering password for shutdown and reboot. Everything else should still need the 'sudo' password to be entered.

  3. #3
    Join Date
    Feb 2009
    Location
    /earth/india/mumbai
    Beans
    599
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Confirmation required before editing sudoers

    thanks for the confirmation,will proceed with it today itself..

    Vote for my Idea
    ~~~Open-source Software and Patience go hand in hand~~~

  4. #4
    Join Date
    Feb 2009
    Location
    /earth/india/mumbai
    Beans
    599
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Confirmation required before editing sudoers

    found another way for achieving what i want.setting uid bit on /sbin/shutdown allows normal users to restart/shutdown from terminal without sudo password.
    Only thing is:it will allow all users and not only the admin group.And that is acceptable at my end.

    Vote for my Idea
    ~~~Open-source Software and Patience go hand in hand~~~

Bookmarks

Posting Permissions

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