Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16
Hi Gurus out there, Need help. Iam using RH9 in text mode. I want to allow my users to shutdown my linux server how can I do that? thanks....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2003
    Posts
    34

    Allowing users to shutdown Linux Server


    Hi Gurus out there,

    Need help.

    Iam using RH9 in text mode.

    I want to allow my users to shutdown my linux server how can I do that?

    thanks.

  2. #2
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    tell them to run
    "/sbin/shutdown -h now" to run it off
    " /sbin/shutdown -r now" to restart

    Jason

  3. #3
    flw
    flw is offline
    Linux Engineer
    Join Date
    Mar 2003
    Location
    U.S.A.
    Posts
    1,025
    J doesn't he need to add the permissions to the account or dir for those cmds? I thought only root had rights for the shutdown cmd. i.e Joe blow with telnet rights to his home dir only cannot run system commands even with the correct paths. i.e "rm -rf /"
    Dan

    \"Keep your friends close and your enemies even closer\" from The Art of War by Sun Tzu\"

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    I may be wrong, but IIRC normal users dont have /sbin/ in their PATH environment variable, only r00t does. hence running the shutdown cmd preceeded with /sbin/ *should* work. Give it a try, I could be wrong.

    Jason

  6. #5
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    Yeah, that should work. Looking at my permissions (that I haven't changed) on /sbin/shutdown, I see that the permissions are 755.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  7. #6
    flw
    flw is offline
    Linux Engineer
    Join Date
    Mar 2003
    Location
    U.S.A.
    Posts
    1,025
    Now thats a hole for anyone with telnet/ssh access.
    Dan

    \"Keep your friends close and your enemies even closer\" from The Art of War by Sun Tzu\"

  8. #7
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    /me changed those permissions right after posting.

    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  9. #8
    Linux Engineer
    Join Date
    Sep 2003
    Location
    Knoxhell, TN
    Posts
    1,078
    i tried shutting down as a regular user (shutdown with default 755 perms).. it gives the following message:
    Code:
    shutdown: you must be root to do that!
    so shutdown has a built-in failsafe..
    Their code will be beautiful, even if their desks are buried in 3 feet of crap. - esr

  10. #9
    Linux Engineer kriss's Avatar
    Join Date
    Jun 2003
    Posts
    1,113
    you could use sudo, so the users could just sudo /sbin/shutdown -h now

  11. #10
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    Quote Originally Posted by lordnothing
    i tried shutting down as a regular user (shutdown with default 755 perms).. it gives the following message:
    Code:
    shutdown: you must be root to do that!
    so shutdown has a built-in failsafe..
    I stand corrected

Page 1 of 2 1 2 LastLast

Posting Permissions

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