Find the answer to your Linux question:
Results 1 to 7 of 7
Hi On my box, if I want to reboot/halt I have to issue this command as a superuser which is quite annoying. Which user group has these permissions and how ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Enthusiast apoorv_khurasia's Avatar
    Join Date
    Feb 2005
    Posts
    624

    Question Halt and reboot permissons for normal user


    Hi

    On my box, if I want to reboot/halt I have to issue this command as a superuser which is quite annoying. Which user group has these permissions and how do I grant these permissions to a particular group?

    Thanks
    "There is no sixth rule"
    --Rob Pike
    Registered Linux User: 400426 home page

  2. #2
    Just Joined!
    Join Date
    Jan 2006
    Posts
    77
    do a ls -l /sbin/shutdown and see which group has permissions. it's root on my pc. just add the user name you want to be able to issue the shutdown command in /etc/group on the first line like this:
    root:x:0:root,<username>

  3. #3
    Banned CodeRoot's Avatar
    Join Date
    Sep 2005
    Posts
    567
    This may not be a "perfect" solution, but it is one possible option:

    Find and modify the 'ctrlaltdel' line in your '/etc/inittab' file to something like:

    Code:
    ca::ctrlaltdel:/sbin/shutdown -r -t 5 now
    Create a new group for the users you wish to have this privilege (For this example, I will use 'shutdown'.)

    Change the ownership of '/sbin/shutdown':

    Code:
    chown root:shutdown /sbin/shutdown
    Change the permissions of '/sbin/shutdown':

    Code:
    chmod 750 /sbin/shutdown
    Add 'shutdown' to the group list of each user who is to have this privilege.

  4. #4
    Linux Enthusiast apoorv_khurasia's Avatar
    Join Date
    Feb 2005
    Posts
    624
    Quote Originally Posted by CodeRoot
    This may not be a "perfect" solution, but it is one possible option:

    Find and modify the 'ctrlaltdel' line in your '/etc/inittab' file to something like:

    Code:
    ca::ctrlaltdel:/sbin/shutdown -r -t 5 now
    Create a new group for the users you wish to have this privilege (For this example, I will use 'shutdown'.)

    Change the ownership of '/sbin/shutdown':

    Code:
    chown root:shutdown /sbin/shutdown
    Change the permissions of '/sbin/shutdown':

    Code:
    chmod 750 /sbin/shutdown
    Add 'shutdown' to the group list of each user who is to have this privilege.
    Still getting the same error.
    "There is no sixth rule"
    --Rob Pike
    Registered Linux User: 400426 home page

  5. #5
    Linux Engineer spencerf's Avatar
    Join Date
    Jan 2005
    Location
    Syracuse, NY
    Posts
    1,144
    take a look at this wiki
    All right, brain. You don't like me and I don't like you, but let's just do this and I can get back to killing you with beer. All New Users Read This!!! If you have a grub problem please look at GRUB MANUAL

  6. #6
    Linux Enthusiast apoorv_khurasia's Avatar
    Join Date
    Feb 2005
    Posts
    624

    sudo did not work out.

    Quote Originally Posted by spencerf
    take a look at this wiki
    I tried this thing but now I get this error:
    Code:
    apoorv@chandraghanta ~ $ halt
    sudo: can't open /etc/sudoers: Permission denied
    apoorv@chandraghanta ~ $ sendmail: Cannot open mail:25
    I even tried changing the permissions of /etc/sudoers but nothing worked out.
    "There is no sixth rule"
    --Rob Pike
    Registered Linux User: 400426 home page

  7. #7
    Linux Engineer spencerf's Avatar
    Join Date
    Jan 2005
    Location
    Syracuse, NY
    Posts
    1,144
    did you do this step?

    Code:
    chmod +s /usr/bin/sudo
    if so then try manually modifying permissions for /etc/sudoers

    chmod 777 /etc/sudoers

    or 755 to deny write access but allow read for group and others.
    All right, brain. You don't like me and I don't like you, but let's just do this and I can get back to killing you with beer. All New Users Read This!!! If you have a grub problem please look at GRUB MANUAL

Posting Permissions

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