Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
Allow users to shutdown / reboot
Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Allow users to shutdown / reboot

  1. #1
    Junior Member
    Join Date
    Sep 2001
    Posts
    96

    Allow users to shutdown / reboot

    Hi,
    I've recently started using SuSE 9.0, and only root is able to shutdown or reboot the system. I want all users to be able to do this from the command line, as I prefer a text-based login.

    Ideally when logged in as myself I would like to be able to just invoke "reboot" or "poweroff" without having to provide a password. Security is not really an issue as it's my home desktop machine.

    How can this be done?

  2. #2

    Re:Allow users to shutdown / reboot

    suid shutdown.

    Code:
    chmod +s  /sbin/shutdown
    Note that this is not good for production environments, because you are basically making the shutdown binary run always as root.

    However, there should not be a problem in a home environment.

  3. #3
    Junior Member
    Join Date
    Sep 2001
    Posts
    96

    Re:Allow users to shutdown / reboot

    Thanks Trickster, worked perfectly and I can now shutdown without su'ing! 8)

    Have a Karma on me!

  4. #4

    Re:Allow users to shutdown / reboot


  5. #5

    Re:Allow users to shutdown / reboot

    maybe you could just copy the shutdown, reboot, and init files to /usr/bin ? Or would this cause problems?

  6. #6
    Junior Member
    Join Date
    Sep 2001
    Posts
    96

    Re:Allow users to shutdown / reboot

    What I did after chmodding shutdown was to put two wee scripts called "reboot" and "poweroff" into /usr/bin. All they do is invoke /sbin/shutdown with the necessary switches.

  7. #7

    Re:Allow users to shutdown / reboot

    [quote author=Baron_Flambe link=board=1;threadid=9205;start=0#msg83201 date=1084519567]
    What I did after chmodding shutdown was to put two wee scripts called "reboot" and "poweroff" into /usr/bin. All they do is invoke /sbin/shutdown with the necessary switches.
    [/quote]
    For future reference, those scripts already exist on your system. they should be
    Code:
    reboot
    and
    Code:
    halt
    .

  8. #8
    Junior Member
    Join Date
    Sep 2001
    Posts
    96

    Re:Allow users to shutdown / reboot

    <<slaps forehead>> They do? Ah well. One of the things I love about Linux is that you're constantly learning / discovering new things!

    I'm just coming back to Linux having been Windows-only for about a year, and it's amazing the amount of stuff I've forgotten. This time around I'm making notes, and printing out the relevant parts of threads where people have helped me!

  9. #9

    Re:Allow users to shutdown / reboot

    I also learned that

    Code:
    chmod +s /sbin/shutdown
    
    chmod +s /sbin/reboot
    will also let the user shutdown or reboot.

  10. #10

    Re:Allow users to shutdown / reboot

    [quote author=trickster link=board=1;threadid=9205;start=0#msg83153 date=1084448736]
    suid shutdown.

    Code:
    chmod +s  /sbin/shutdown
    Note that this is not good for production environments, because you are basically making the shutdown binary run always as root.

    However, there should not be a problem in a home environment.
    [/quote]

Similar Threads

  1. Random reboot
    By CP in forum Linux - General Topics
    Replies: 5
    Last Post: 03-04-2004, 11:32 PM
  2. Allow users to shutdown Linux Server
    By infinite_root in forum Linux - General Topics
    Replies: 2
    Last Post: 11-21-2003, 03:44 AM
  3. Remote Reboot
    By trickster in forum Linux - Hardware, Networking & Security
    Replies: 0
    Last Post: 11-15-2002, 05:43 PM
  4. Remote reboot possible ?
    By civ1492 in forum Linux - General Topics
    Replies: 17
    Last Post: 09-23-2002, 05:20 PM
  5. Laptop - (Reboot & Halt)
    By gmoreno in forum Linux - General Topics
    Replies: 3
    Last Post: 05-07-2002, 11:26 PM

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
  •