LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 10-15-2003, 09:02 AM   #1
poweroff
LQ Newbie
 
Registered: Oct 2003
Posts: 27

Rep: Reputation: 15
Lightbulb how can i allow a power user 2 shutdown linux boz from console


Hi all!

I Need a user who can shutdown box from shell but can`t do some damages in the system.
Thx
Poweroff
 
Old 10-15-2003, 09:09 AM   #2
born4linux
Senior Member
 
Registered: Sep 2002
Location: Philippines
Distribution: Slackware, RHEL&variants, AIX, SuSE
Posts: 1,127

Rep: Reputation: 49
man shutdown

look for shutdown.allow.

also, check for sudo.
 
Old 10-15-2003, 09:16 AM   #3
porous
Member
 
Registered: Oct 2003
Distribution: redhat 9
Posts: 147

Rep: Reputation: 15
i am not sure but i believe it should work

you can change the permission of shutdown
so that other users can also shutdown , without elevating their
previlages (and hope you dont need to create a user just for
shutdown :-) ).
 
Old 10-15-2003, 09:29 AM   #4
ceedeedoos
Member
 
Registered: Aug 2003
Location: Antwerp, Belgium
Distribution: Slackware 10.0, Mandrake 10.1
Posts: 174

Rep: Reputation: 36
I have a line for that in my sudoers
man sudo
man visudo
man sudoers

and it works smoothly
 
Old 10-15-2003, 01:52 PM   #5
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Rep: Reputation: 45
what I do is create a 'shutdown' group, then modify /sbin/shutdown so that its group owner (set to 'shutdown') has executable permission, chmod /sbin/shutdown to suid ('chmod 4550 /sbin/shutdown') and add the desired user to the 'shutdown' group.

but that's just what I do, I could be wrong.
 
Old 10-15-2003, 01:55 PM   #6
chup
Member
 
Registered: Aug 2003
Location: South Africa
Distribution: Ubuntu (Feisty)
Posts: 280

Rep: Reputation: 31
heh, i also configured sudo for it, i did it differently though, as i have only the root account and my own.
i just added this to the command alias thingie:
Code:
#Command Alias section
[your_username]            ALL=NOPASSWD:/sbin/shutdown
i just hope i did it the best way....
 
Old 10-16-2003, 06:58 AM   #7
porous
Member
 
Registered: Oct 2003
Distribution: redhat 9
Posts: 147

Rep: Reputation: 15
can you explain that a little bit more .....

( i mean i dont understand how it will give the user the previlage to shutdown )

: he doesnt want to give the root passwd to the users to do shutdown....
 
Old 10-16-2003, 09:22 AM   #8
fatgod
Member
 
Registered: Mar 2002
Location: Edinburgh, Scotland
Distribution: Suse 7.2, Gentoo 1.4, Solaris 9
Posts: 661

Rep: Reputation: 30
Well if you just do what jpbarto said then you can do it right now, easy as, you dont need any additional software or anything. Looks like it would work, jpbarto says it does anyway.
 
  


Reply


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
Power off after shutdown dukeem Slackware 15 11-30-2010 10:08 AM
Shutdown and power off bwtoh Linux - Newbie 4 11-02-2006 02:48 PM
I want to grant 'shutdown' previlege to a non-root user to do directly from console jagadee76 Linux - General 6 12-29-2004 03:16 AM
Shutdown could not power off satimis Debian 13 02-14-2004 11:05 AM
Shutdown with power button hriosm Linux - Hardware 4 06-06-2003 02:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:26 PM.

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