Giving Specific users access to the reboot command
Dear All,
Sorry if this is in the wrong forum, it just seems like the most suitable place to ask this. I am a single user of my own machine, and I would like to give myself access to the reboot command, tather than su ing then doing it ot just doing ctrl-alt-del. This is a learning experience and I would like the satisfaction of knowing how to do it. I have already tries chown <username> /sbin/.reboot and chmod 777 /sbin/reboot to no avail. Can anyone please help? Thanx beforehand |
You need to change permissions on /sbin/halt because /sbin/reboot is a symlink to halt
chmod 755 /sbin/halt should suffice |
tried but no
Nope. I did as u advised. First i exited the X server, and logged out completely. Logged in as root, and did a c
cd /sbin chmod 755 halt exit then logged in as the regular user and typed in reboot and it said must be superuser Any ideas? |
It's either installing sudo, use PAM or try this:
open up /etc/inittab and look for the line where you CTRL+ALT+DEL, and add "-a" to shutdown args. echo $LOGNAME >> /etc/shutdown.allow now you're allowed to shutdown using the 3 finger salute. If you're using PAM you can change the /etc/pam.d config for the shutdown service using allow lists. Add an "auth" line under the last auth statement w/o quotes: "auth required /lib/security/pam_listfile.so item=user sense=allow file=/etc/pam.d/shutdown.allow onerr=fail" echo $LOGNAME >> /etc/pam.d/shutdown.allow. Haven't tested the PAM solution for shutdown, but this works on other services so it should work with shutdown as well. |
unSpawn you kinda lost me. I do not with to shut down using ctr-alt-del. What I wish to do is simply allow a normal user, to use the reboot command without having to be root (superuser).
|
Shutdown does what you ask it to do depending on the flag, "-h" for halt and "-r" for reboot, so...
|
hmmm but how do i make a REGULAR user access the shutdown or even reboot commands?
|
did you ignore /sbin/halt hint, or SuSE has different setup?
Also look at sudo |
Also what /etc/pam.d/halt looks like ?
|
I quote myself
Quote:
|
man sudo
Regards |
Check the man page on "shutdown" for /etc/shutdown.allow.
|
THE answer!!!
Hey, stop confusing this guy with the wrong answers!! i saw this post yesterday cuz I had the same issue and I found the solution!!
man sudoers actually just go to /etc and edit sudoers. at the end of the file there should be 3 commented out lines to the tune of 'examples' and two examples beneath. change one to say (don't quote me on the syntax) $:users allow:/sbin/shutdown -h now NOPASSWD:ALL like i said look up 'man sudoers' to get the syntax right if my memory is wrong:study: also to reboot just duplicate the line and replace '-h' with '-r' you shouldn't have to even check the man pages if you're astute enough!! BTW halt and reboot can only be run in runlevel 1 and 6, if they are called in ANY other runlevel it tels the system ./sbin/shutdown -h now freakin lamerz |
Quote:
Um, you answered a thread that is a year and a half old. I think they moved on. |
whateva
it's my hot body, i'll do what i want
um.. for the benefit of others.:tisk: i'm sick of round about answers on web forms. so i took matters into my own hands. besides, if it's so damn old... WTF!! why are you replying to me? |
All times are GMT -5. The time now is 04:58 AM. |