LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-17-2009, 05:47 AM   #1
nagavinodh
Member
 
Registered: Aug 2009
Posts: 118

Rep: Reputation: 15
shutdown and service startip


Hi,
how to assign shutdown and reboot privileges to the user.please tell directory hierarchy privileges for /root,/bin./lib,/tmp,/var,/pro etc ...

And also i would like to give space quota to particular user and directory for users.
 
Old 09-17-2009, 05:50 AM   #2
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
You can add user in power group.
 
Old 09-17-2009, 07:58 AM   #3
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,186

Rep: Reputation: 121Reputation: 121
Add to the sudoers file (/etc/sudoers) an entry like

user ALL=(ALL)NOPASSWD: /sbin/shutdown

Where you replace user for the username of the person who want to allow to be able to perform this task.

the user should be able to then do '/sbin/shutdown now' for a shutdown or '/sbin/shutdown -r now' for a reboot.

this might be a good source for sudo as generally sudo doesn't change between distributions from what I have seen
http://ubuntuforums.org/showthread.php?t=1132821

As for Hard Drive quotas that's really a completely seperate issues and will likely involve changing /etc/fstab. I think more information might be needed for the hard drive quotas and that it should probably be an issue for a seperate thread as having two issues in a thread does run potential for the issues to slightly conflict.

Last edited by r3sistance; 09-17-2009 at 07:59 AM.
 
Old 09-17-2009, 08:07 AM   #4
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
You could give the rights to /sbin/shutdown and /sbin/reboot files for particular group in which your user is a member of.
You enable quota for a file system and not a directory. So you will need a partition on which you can enable quota or enable it on complete root (/).
 
Old 09-17-2009, 09:01 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,260

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
Can I just recommend against 'NOPASSWD', unless you intend to script it?
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabling shutdown service shankarbrnair Fedora 4 10-26-2007 11:28 AM
script/service/command executes during shutdown shipon_97 Linux - Newbie 1 08-30-2007 04:19 AM
LSB service shutdown tate_harmann Linux - Newbie 1 08-20-2007 04:12 PM
Slack problems 1)incomplete shutdown? 2)starting a service koodoo Linux - Newbie 5 06-08-2005 12:22 PM
Service Shutdown and Init Setup g_goblin Solaris / OpenSolaris 1 10-29-2003 04:53 PM


All times are GMT -5. The time now is 05:14 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration