This is a discussion on halt for users within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hallo What is the best and safest way to enable users to halt and reboot system....
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| On Wed, 23 Jun 2004 08:14:44 +0200, Tallis wrote: > Hallo > > What is the best and safest way to enable users to halt and reboot > system. sudo is good, and it allows you to specify which users can halt/reboot and which cannot. man sudo, sudoers |
| |||
| -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Tallis wrote: > Hallo > > What is the best and safest way to enable users to halt and reboot system. "Normal" (unpriveledged) users can shutdown/halt or shutdown/reboot a vanilla Slackware Linux box with no problem. a) From any (character) console: <ctl><alt><del> will shutdown/reboot (see the "ca" line in /etc/inittab) (FWIW, <ctl><alt><Fx> will move you from a GUI to a console, where you can then <ctl><alt><del> to shutdown) b) From any login, a login as user "shutdown" will cause the system to shutdown/halt (see /etc/passwd user "shutdown", which runs /sbin/shutdown as it's shell) c) From any login, a login as user "halt" will cause the system to halt (see /etc/passwd user "halt", which runs /sbin/halt as it shell) d) From KDM (KDE's XDM replacement), the user is permitted to select either the "reboot" or "halt" shutdown option. e) From GDM (Gnome's XDM replacement), the user is permitted to select either the "reboot" or "halt" shutdown option. - -- Lew Pitcher, IT Consultant, Enterprise Application Architecture Enterprise Technology Solutions, TD Bank Financial Group (Opinions expressed here are my own, not my employer's) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (MingW32) iD8DBQFA2W/lagVFX4UWr64RAvr0AKDhWo1ADzmmh4e335gF/35BdSpjYwCfVxSK 4bZcMfhyanbc+cfovkgZM+8= =xq0b -----END PGP SIGNATURE----- |
| |||
| -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 In alt.os.linux.slackware, David Dutchison dared to utter, > [ctrl]+[alt]+[del] will reboot for ordinary users Not from remote connections. - -- It is better to hear the rebuke of the wise, Than for a man to hear the song of fools. Ecclesiastes 7:5 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFA2Xf1lKR45I6cfKARAr6UAJ4hx8SBbn3lDEwMjOQgnT M/kLyEFQCgr+3p Fegusu0i6vLWeDJ2rQ7gF7g= =fjGZ -----END PGP SIGNATURE----- |
| |||
| chud napisaĆ(a): > On Wed, 23 Jun 2004 08:14:44 +0200, Tallis wrote: > > >>Hallo >> >>What is the best and safest way to enable users to halt and reboot >>system. > > > sudo is good, and it allows you to specify which users can halt/reboot and > which cannot. > > man sudo, sudoers Yes I tried this but probably I've got problems with sudoers file syntax. I tried examples from man pages and still got problems. Can you show me a good example. |
| |||
| On 2004-06-23, Tallis <rork@piotrkow.net.pl> wrote: > chud napisa?(a): >> On Wed, 23 Jun 2004 08:14:44 +0200, Tallis wrote: >> >> >>>Hallo >>> >>>What is the best and safest way to enable users to halt and reboot >>>system. >> man sudo, sudoers > Yes I tried this but probably I've got problems with sudoers file > syntax. I tried examples from man pages and still got problems. Can you > show me a good example. Define your user: # User alias specification User_Alias OWNER = piotr and define his/her rights: piotr ALL=NOPASSWD: /sbin/shutdown -h now,/sbin/reboot and make an alias e.g. : halt=/sbin/ etc.. cheers -- ++++++++++++++++++++++++++++++++ Mike Slack 9.1 email: micr at zeelandnet dot nl ++++++++++++++++++++++++++++++++ |
| |||
| chud wrote: > On Wed, 23 Jun 2004 08:14:44 +0200, Tallis wrote: > sudo is good, and it allows you to specify which users can halt/reboot and > which cannot. > > man sudo, sudoers The shutdown command also has its own ability to allow specific user access. Check out the -a option to the shutdown command. Jeffrey |
| |||
| On Wed, 23 Jun 2004 07:56:22 -0400, Lew Pitcher wrote: <snip> > a) From any (character) console: <ctl><alt><del> will shutdown/reboot > (see the "ca" line in /etc/inittab) > (FWIW, <ctl><alt><Fx> will move you from a GUI to a console, where > you can then <ctl><alt><del> to shutdown) <snip> ....and for any other newbie stupid enough to try <ctrl><alt><Fx> to see what it does... (ahem)... my subsequent trial-and-error revealed that <alt><F7> brought me back into x-windows! oopsie... sb |
| ||||
| On Wed, 23 Jun 2004 15:01:15 +0000, Mike wrote: >>> man sudo, sudoers >> Yes I tried this but probably I've got problems with sudoers file >> syntax. I tried examples from man pages and still got problems. Can you >> show me a good example. > Define your user: > # User alias specification > User_Alias OWNER = piotr > > and define his/her rights: > piotr ALL=NOPASSWD: /sbin/shutdown -h now,/sbin/reboot > > and make an alias e.g. : halt=/sbin/ etc.. > > cheers I was always under the impression, from the man page, that the sudo command required the user to input a password in order to 'sudo' something. From the test "ALL=NOPASSWD", would I be right in thinking I was wrong? A quick slap and a point in the relevant and obvious section of the man page I missed will do sb |