Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 02-04-2004, 03:11 PM   #1
Registered: Oct 2003
Distribution: Mandrake 10
Posts: 160

Rep: Reputation: 30
Question Shutdown requires password

Under Mandrake I could shut down as any user from any of the window managers. However, under Debian I am required to log out to GDM, and then to enter the root password in order to shut down. This sucks, because I don't want the other users of the computer to know the root password, but I do want them to be able to shut down. I know this is the "proper" way for it to behave (understandable if it is, e.g., a network server, or something) but I want to change it back to the Mandrake way.

I'm guessing that chmodding shutdown is a bad idea; are there alternatives here? And how do I inform GDM and KDE that the two stage shutdown is no longer required?

Old 02-04-2004, 04:08 PM   #2
Senior Member
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
Actually, that may be what is necessary (but there may be a GUI tool already installed that'll do it neatly, globally, and correctly. I have Mepis installed, so it Deb and I can shutdown as user (only logged in to X as root once since the install and won't be doing it again soon). I'll look at my configs for kdm and see if theres somethigg onvious there. Might try adding the user to the shutdown group
Old 02-04-2004, 08:07 PM   #3
Registered: Jul 2003
Location: Massachusetts
Distribution: LFS 4.0, Windows XP, Ubuntu 10.01, Gentoo 2.6.32-r7, OpenSolaris
Posts: 100

Rep: Reputation: 15
"chmod +s /sbin/shutdown" might help. I don't think it's a bad idea in this case.
Old 02-04-2004, 09:23 PM   #4
Registered: Jun 2003
Location: Tampa, Fl
Distribution: Gentoo, Slackware
Posts: 828

Rep: Reputation: 30
read man sudo
Old 02-04-2004, 09:43 PM   #5
Senior Member
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 47
i used to have users be able to shutdown and reboot without them having other commands, but i forgot how i did it. (adding the user to wheel, maybe?) sudo would work, but that would give users access to many or even most root commands. however, there might be a way to modify sudo so users only have access to the commands you want them to have. i agree that chmodding the shutdown command wouldn't necessarily be a bad thing if you know what you are doing and are sure that's what you want.
Old 02-04-2004, 09:47 PM   #6
Senior Member
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
There is another way, which is not too elegant, if this cannnot be solved for you (like we'll let that happen!). Users can exit to a console and then hit ctrl+alt+del. That will spawn a reboot sequence. The filesystem will be unmounted properly and they can shut down with the switch the second the messages say "rebooting"

Not the elegant answer, but it'll work.
Old 02-05-2004, 05:30 AM   #7
Registered: Jan 2004
Location: Texas, USA, Terra
Distribution: Debian (currently...)
Posts: 74

Rep: Reputation: 15
shutdown can be called from init(8) when the magic keys CTRL-ALT-DEL
are pressed, by creating an appropriate entry in /etc/inittab.
means that everyone who has physical access to the console keyboard can
shut the system down. To prevent this, shutdown can check to see if an
authorized user is logged in on one of the virtual consoles. Otherwise it will write the message

shutdown: no authorized users logged in to the (physical) system console.

If shutdown is called with the -a argument (add this to the
invocation of shutdown in /etc/inittab), it checks to see if the file
/etc/shutdown.allow is present. It then compares the login names in that
file with the list of people that are logged in on a virtual console (from
/var/run/utmp). Only if one of those authorized users or root is logged
in, it will proceed.
The format of /etc/shutdown.allow is
one user name per line. Empty lines and comment lines (prefixed by a #)
are allowed. Currently there is a limit of 32 users in this file.

Note that if /etc/shutdown.allow is not present, the -a argument is

This is from the 'shutdown' man page, it says that you can set up a file that will keep the command limited to some users but not others. You could create the 'shutdown.allow' file with the users you will want to be able to shutdown, then create an alias named 'halt', or some other name, with the "shutdown -a" as the command to be aliased. I hope this helps.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
root password needed for shutdown msound SUSE / openSUSE 6 06-19-2005 10:25 PM
Please help on how to save services shutdown or shutdown from the terminal. wambuzz Linux - General 2 03-11-2005 07:38 AM
Samba requires password? jon_k Linux - Software 2 12-03-2004 07:29 AM
No password for shutdown or reboot with GDM. Creak Linux - Software 4 08-30-2004 01:19 AM
konsole shutdown possible? or key combo = shutdown possible? Laptop2250 Linux - Newbie 3 11-16-2003 10:44 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:50 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration