Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 09-17-2009, 04:47 AM   #1
Registered: Aug 2009
Posts: 118

Rep: Reputation: 15
shutdown and service startip

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, 04:50 AM   #2
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, 06:58 AM   #3
Senior Member
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
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

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 06:59 AM.
Old 09-17-2009, 07:07 AM   #4
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
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, 08:01 PM   #5
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,803

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


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 10:28 AM
script/service/command executes during shutdown shipon_97 Linux - Newbie 1 08-30-2007 03:19 AM
LSB service shutdown tate_harmann Linux - Newbie 1 08-20-2007 03:12 PM
Slack problems 1)incomplete shutdown? 2)starting a service koodoo Linux - Newbie 5 06-08-2005 11:22 AM
Service Shutdown and Init Setup g_goblin Solaris / OpenSolaris 1 10-29-2003 03:53 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:28 PM.

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
Open Source Consulting | Domain Registration