Results 1 to 7 of 7

Thread: allow normal user shutdown and restart without password

  1. #1
    Join Date
    Aug 2006
    Beans
    462
    Distro
    Ubuntu 11.04 Natty Narwhal

    allow normal user shutdown and restart without password

    hi

    I have Ubuntu 10.10.
    Howto allow normal user shutdown and restart without password?

  2. #2
    Join Date
    Aug 2006
    Beans
    462
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: allow normal user shutdown and restart without password

    I added these lines in /etc/sudoers:
    Code:
    # cat /etc/sudoers
    # /etc/sudoers
    #
    # This file MUST be edited with the 'visudo' command as root.
    #
    # See the man page for details on how to write a sudoers file.
    #
    
    Defaults        env_reset
    
    # Host alias specification
    
    # User alias specification
    User_Alias USERS = ubuntuuser
    
    # Cmnd alias specification
    Cmnd_Alias SHUTDOWN_CMDS = /sbin/shutdown, /sbin/reboot, /sbin/halt
    
    # User privilege specification
    root    ALL=(ALL) ALL
    
    # Allow members of group sudo to execute any command
    # (Note that later entries override this, so you might need to move
    # it further down)
    %sudo ALL=(ALL) ALL
    #
    #includedir /etc/sudoers.d
    
    # Members of the admin group may gain root privileges
    %admin ALL=(ALL) ALL
    USERS ALL=(ALL) NOPASSWD: SHUTDOWN_CMDS
    but this problem still exists.
    Last edited by cccc; January 29th, 2011 at 04:43 AM.

  3. #3
    Join Date
    Jan 2011
    Location
    Kansas City, KS
    Beans
    1,319
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: allow normal user shutdown and restart without password

    What's your specific goal here? I mean, obviously, you can do these things without a password through the GUI, so why do you need them in CLI?
    I know I shouldn't use tildes for decoration, but they always make me feel at home~

  4. #4
    Join Date
    Aug 2006
    Beans
    462
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: allow normal user shutdown and restart without password

    Quote Originally Posted by Copper Bezel View Post
    What's your specific goal here? I mean, obviously, you can do these things without a password through the GUI, so why do you need them in CLI?
    I've removed Gnome and have just CLI.

  5. #5
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: allow normal user shutdown and restart without password

    You'd still have to use sudo, it just won't prompt you for your password.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  6. #6
    Join Date
    Aug 2006
    Beans
    462
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: allow normal user shutdown and restart without password

    Quote Originally Posted by CharlesA View Post
    You'd still have to use sudo, it just won't prompt you for your password.
    Thx, but just wondering if is it any way to do it without using sudo?

  7. #7
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: allow normal user shutdown and restart without password

    Quote Originally Posted by cccc View Post
    Thx, but just wondering if is it any way to do it without using sudo?
    I don't think it's possible to do it without using "sudo"

    Could create an alias, but that doesn't get rid of the problem.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

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
  •