Hi
On my box, if I want to reboot/halt I have to issue this command as a superuser which is quite annoying. Which user group has these permissions and how do I grant these permissions to a particular group?
Thanks
Printable View
Hi
On my box, if I want to reboot/halt I have to issue this command as a superuser which is quite annoying. Which user group has these permissions and how do I grant these permissions to a particular group?
Thanks
do a ls -l /sbin/shutdown and see which group has permissions. it's root on my pc. just add the user name you want to be able to issue the shutdown command in /etc/group on the first line like this:
root:x:0:root,<username>
This may not be a "perfect" solution, but it is one possible option:
Find and modify the 'ctrlaltdel' line in your '/etc/inittab' file to something like:
Create a new group for the users you wish to have this privilege (For this example, I will use 'shutdown'.)Code:ca::ctrlaltdel:/sbin/shutdown -r -t 5 now
Change the ownership of '/sbin/shutdown':
Change the permissions of '/sbin/shutdown':Code:chown root:shutdown /sbin/shutdown
Add 'shutdown' to the group list of each user who is to have this privilege.Code:chmod 750 /sbin/shutdown
Still getting the same error.Quote:
Originally Posted by CodeRoot
take a look at this wiki
I tried this thing but now I get this error:Quote:
Originally Posted by spencerf
I even tried changing the permissions of /etc/sudoers but nothing worked out.Code:apoorv@chandraghanta ~ $ halt
sudo: can't open /etc/sudoers: Permission denied
apoorv@chandraghanta ~ $ sendmail: Cannot open mail:25
did you do this step?
if so then try manually modifying permissions for /etc/sudoersCode:chmod +s /usr/bin/sudo
chmod 777 /etc/sudoers
or 755 to deny write access but allow read for group and others.