Find the answer to your Linux question:
Results 1 to 6 of 6
I have this annoying problem. Except root no other user on my box is authozied to execute the following commands: shutdown halt reboot poweroff etc. These commands I believe should ...
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

    Exclamation Shutdown Permissions


    I have this annoying problem. Except root no other user on my box is authozied to execute the following commands:

    shutdown
    halt
    reboot
    poweroff etc.

    These commands I believe should be executable by all "normal users". There exists no command such as "visudo" and I have tried using shutdown -a. None work, everytime I execute them I get the message:

    Only root can do it.

    Please suggest me some solution.

    I have also tried making a shutdown group and adding me to it (as well as root) and then changing ownership of /sbin/shutdown to this group and then
    Code:
    chmod g+x /sbin/shutdown
    "There is no sixth rule"
    --Rob Pike
    Registered Linux User: 400426 home page

  2. #2
    Linux User Game master pro's Avatar
    Join Date
    Sep 2005
    Location
    Tasmania, australia
    Posts
    274
    You have to edit the file /etc/sudoers
    In there there is a line that goes along the lines of "root ALL=(ALL)ALL" and under that there should be your username like "#BOB ALL=(ALL)ALL" uncomment the line by deleting the #. I do not know if this will work but you never know

  3. #3
    Linux Enthusiast apoorv_khurasia's Avatar
    Join Date
    Feb 2005
    Posts
    624
    Quote Originally Posted by Game master pro
    You have to edit the file /etc/sudoers
    In there there is a line that goes along the lines of "root ALL=(ALL)ALL" and under that there should be your username like "#BOB ALL=(ALL)ALL" uncomment the line by deleting the #. I do not know if this will work but you never know
    There is no such file, infact visudio, as I wrote earlier is not recoginized by my machine. What do I need to emerge in order to make it work? Or is there some other way out?
    "There is no sixth rule"
    --Rob Pike
    Registered Linux User: 400426 home page

  4. #4
    Linux Engineer spencerf's Avatar
    Join Date
    Jan 2005
    Location
    Syracuse, NY
    Posts
    1,144
    have a look at this Gentoo guide
    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

  5. #5
    Linux Guru loft306's Avatar
    Join Date
    Oct 2003
    Location
    The DairyLand
    Posts
    1,666
    here is a small step by step from the wiki on how to set this up http://gentoo-wiki.com/HOWTO_Let_a_c...hutdown/reboot
    ~Mike ~~~ Forum Rules
    Testing? What's that? If it compiles, it is good, if it boots up, it is perfect. ~ Linus Torvalds
    http://loft306.org

  6. #6
    Linux Enthusiast apoorv_khurasia's Avatar
    Join Date
    Feb 2005
    Posts
    624
    Quote Originally Posted by loft306
    here is a small step by step from the wiki on how to set this up http://gentoo-wiki.com/HOWTO_Let_a_c...hutdown/reboot
    I get this message when I type
    Code:
    Geiger@DeusExMachina ~ $ reboot
    sudo: can't open /etc/sudoers: Permission denied
    I followed all things mentioned on your link.
    "There is no sixth rule"
    --Rob Pike
    Registered Linux User: 400426 home page

Posting Permissions

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