Unix Technical Forum

halt for users

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....


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-19-2008, 12:36 PM
Tallis
 
Posts: n/a
Default halt for users

Hallo

What is the best and safest way to enable users to halt and reboot system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-19-2008, 12:36 PM
chud
 
Posts: n/a
Default Re: halt for users

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-19-2008, 12:36 PM
David Dutchison
 
Posts: n/a
Default Re: halt for users

Tallis <rork@piotrkow.net.pl> wrote:

> What is the best and safest way to enable users to halt and reboot system.


[ctrl]+[alt]+[del] will reboot for ordinary users


--
David Dutchison

bizness_[spelled corectkly!]address@telus.net

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-19-2008, 12:36 PM
Lew Pitcher
 
Posts: n/a
Default Re: halt for users

-----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-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-19-2008, 12:36 PM
Alan Hicks
 
Posts: n/a
Default Re: halt for users

-----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-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-19-2008, 12:36 PM
Tallis
 
Posts: n/a
Default Re: halt for users

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-19-2008, 12:37 PM
Mike
 
Posts: n/a
Default Re: halt for users

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
++++++++++++++++++++++++++++++++
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-19-2008, 12:37 PM
Jeffrey Froman
 
Posts: n/a
Default Re: halt for users

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-19-2008, 12:37 PM
standardblue
 
Posts: n/a
Default Re: halt for users

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-19-2008, 12:38 PM
standardblue
 
Posts: n/a
Default Re: halt for users

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:08 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com