Find the answer to your Linux question:
Results 1 to 8 of 8
So I reinstalled Slackware 10.1 last week. I was going to install 10.2, but I thought a little about and still hadn't had mastered 10.1 yet, and I really don't ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Enthusiast
    Join Date
    Jun 2005
    Location
    The Hot Humid South
    Posts
    602

    Shutdown and Reboot permission


    So I reinstalled Slackware 10.1 last week. I was going to install 10.2, but I thought a little about and still hadn't had mastered 10.1 yet, and I really don't need the up-to-date packages, but that's beside the point anyway. Since the reinstall, I hadn't created a user account till today. Basically I didn't need to since I was doing some system configuration and learning (and I don't have internet, so I don't have to worry about anything from that end either). So after poking around for a while, I decided it's time to have a user (me).

    Enough side tracking, let me get to the point. Now, when I have to shutdown or reboot the system (which I do a lot since I need to have a network connection for times like these) I have to log out then log in as root and shutdown/reboot. Pretty annoying! I'm using Xfce4 incase anyone needs to know.

    I'll get to the no internet problem another day, I think I already post too much anyway.

  2. #2
    Linux Enthusiast
    Join Date
    Aug 2005
    Posts
    542
    That is quite annoying. I had to do the same thing in FreeBSD, so I guess it must be something with more advanced distros.
    In answer to your question: I don't know.

  3. #3
    Linux Guru
    Join Date
    May 2004
    Location
    forums.gentoo.org
    Posts
    1,817

    Re: Shutdown and Reboot permission

    Quote Originally Posted by bidi
    ...I think I already post too much anyway.
    I was gonna say...

    Take a look at your sudoers file, It gets edited with the 'visudo' command. I think there is a line you can put in there that will allow a user or all users to have permission to use shutdown, halt or any other command.
    /IMHO
    //got nothin'
    ///this use to look better

  4. $spacer_open
    $spacer_close
  5. #4
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    use the command "visudo" to add this to sudoers:

    Code:
    User_Alias USERS = username
    Cmnd_Alias SHUTDOWN = /sbin/shutdown
    USERS ALL = NOPASSWD: SHUTDOWN

  6. #5
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    ...or if you want to shutdown using XFCE4's shutdown menu, you can follow these instructions for setting up the /etc/sudoers file, but I don't remember where xfsm-shutdown-helper is in Slackware (but it may be at /usr/libexec/xfsm-shutdown-helper):

    http://www.loculus.nl/xfce/documenta...#xfsm-shutdown

  7. #6
    Just Joined!
    Join Date
    Jul 2005
    Location
    cedar hill,tx
    Posts
    23

    Re: Shutdown and Reboot permission

    Quote Originally Posted by bidi
    Enough side tracking, let me get to the point. Now, when I have to shutdown or reboot the system (which I do a lot since I need to have a network connection for times like these) I have to log out then log in as root and shutdown/reboot. Pretty annoying! I'm using Xfce4 incase anyone needs to know.
    Hey Bidi. I too am fairly new and I just discovered this problem. Just a thought but what about changing the permissions for the shutdown script? This seems easy enough but not sure if its possible.

    And for all you Pro's out there; why is this such an issue? You add a user account and now you created a nightmare of trying to bring functionality to that account. a serious pain in the a$$.

  8. #7
    Just Joined!
    Join Date
    Jul 2005
    Location
    cedar hill,tx
    Posts
    23
    Quote Originally Posted by Ozar
    use the command "visudo" to add this to sudoers:

    Code:
    User_Alias USERS = username
    Cmnd_Alias SHUTDOWN = /sbin/shutdown
    USERS ALL = NOPASSWD: SHUTDOWN
    Ok, I m a n00b, how do I edit the file? I ran the visudo cmd and I got a page that shows examples but I don't know how to edit the actual file.
    THanks
    Dyn0

  9. #8
    Linux Guru
    Join Date
    May 2004
    Location
    forums.gentoo.org
    Posts
    1,817
    Quote Originally Posted by dyn0myt3
    I ran the visudo cmd and I got a page that shows examples but I don't know how to edit the actual file.
    If you got there from the visudo command, that is the page. But it has examples in it already for us n00bs. You can delete the '#' at the beginning of a line if you want to "uncomment" it, or you can add your own lines. You might even want to add some notes of your own like this:

    # Following line changed 9/19/05 to allow user shutdown
    /IMHO
    //got nothin'
    ///this use to look better

Posting Permissions

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