View Poll Results: Do you think it can help you?

Voters
3. You may not vote on this poll
  • Great!

    1 33.33%
  • Good!

    0 0%
  • Fair.

    0 0%
  • Bad!

    1 33.33%
  • Awful!

    1 33.33%
Results 1 to 7 of 7

Thread: How to disable shutdown for normal user?

  1. #1
    Join Date
    Mar 2010
    Location
    Hong Kong
    Beans
    5
    Distro
    Ubuntu 10.04 Lucid Lynx

    Exclamation How to disable shutdown for normal user?

    Dear All,
    Hi, for security reasons, I want to disable shutdown for normal user, but the post here does not help me. It is because when I open the
    /etc/X11/gdm/gdm.conf I just saw a blank file. I use the 9.10 version.Who can help me?
    Best Wishes,
    Chaut0

  2. #2
    Join Date
    Mar 2010
    Location
    Hong Kong
    Beans
    5
    Distro
    Ubuntu 10.04 Lucid Lynx

    Exclamation How to disable shutdown for normal user?

    Dear All,
    Hi, for security reasons, I want to disable shutdown for normal user, but the post here does not help me. It is because when I open the
    /etc/X11/gdm/gdm.conf I just saw a blank file. I use the 9.10 version.Who can help me?
    Best Wishes,
    Chaut0

  3. #3
    Join Date
    Apr 2008
    Beans
    98

    Re: How to disable shutdown for normal user?

    You can always change the executable bit from the shutdown command to owner executable only (it is owned by root). However, I don't know the ramifications of this on other parts of the system. Example, if you are logged into an X11 session as a regular user and use the GUI shutdown command, if it will prompt you for the "sudo" password, or simply fail. In the latter case, you will have to enter a terminal and sudo shutdown.

  4. #4
    Join Date
    Apr 2008
    Beans
    1

    Re: How to disable shutdown for normal user?

    Hi,

    I'm in the same boat, trying to get rid of the "shutdown", "restart", "suspend" and "hibernate" options (for normal users) from the desktop menu in Karmic. Searched high and low, policykit, the article referenced by the OP etc.

    Any hints appreciated!

    BTW: the option of disabling the executable bit for the shutdown command does not work.

    Rgds,
    Jeroen

  5. #5
    Join Date
    May 2007
    Location
    Phoenix, Arizona USA
    Beans
    2,909
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: How to disable shutdown for normal user?

    Guys this should be in the desktop forums as Ubuntu server does not let a "normal" user shut down the box by default as there is no GUI and unless you sudo and know the password you are not going to shut down the server.

    The answer to your question lies in creating the user without shutdown privileges in their own login. This is why a GUI on a server is dangerous.

    -Tim
    www.pcchopshop.net

    Hard to find and obsolete PC and server parts. "If we can't find it, it probably doesn't exist"

  6. #6
    Join Date
    Mar 2011
    Location
    East Coast USA
    Beans
    2
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: How to disable shutdown for normal user?

    Quote Originally Posted by jvdongen View Post
    Hi,

    I'm in the same boat, trying to get rid of the "shutdown", "restart", "suspend" and "hibernate" options (for normal users) from the desktop menu in Karmic. Searched high and low, policykit, the article referenced by the OP etc.

    Any hints appreciated!

    BTW: the option of disabling the executable bit for the shutdown command does not work.

    Rgds,
    Jeroen
    the helper that handles logout, shutdown, and restart is /usr/lib/indicator-sesson/gtk-logout-helper.
    it calls /sbin/shutdown with -r now options in the case of restart and
    it calls /sbin/shutdown with -h now options in the event of shutdown.

    my solution to this was to <code> sudo mv /sbin/shutdown /sbin/shutoff </code>.
    this leaves the normal user with the logout option only.
    root may run <code> /sbin/shutoff -h now </code> to shutdown

    Daniel
    Last edited by AlsoDaniel; March 26th, 2011 at 02:33 AM.

  7. #7
    Join Date
    Mar 2011
    Location
    East Coast USA
    Beans
    2
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: How to disable shutdown for normal user?

    oh and <code> sudo mv /usr/sbin/pm-hibernate /usr/sbin/hibernate </code>
    will stop the hibernate button as well.


    -daniel

Tags for this Thread

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
  •