You are not logged in.
How can I get a normal user, (or maybe a user from group shutdown) to be able to shutdown the computer? I have to login as root everytime!
If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing. 1 Corinthians 13:2
Offline
You can setuid the halt or shutdown binaries (chmod +s /sbin/halt). What I did though was editing inittab and replaced "shutdown -r" with "shutdown -h", so the pc poweroffs when I do ctrl+alt+del, instead of rebooting.
Offline
Or install sudo and use that.
I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal
Offline
Can I get it to save the password, just for some programs? So, if someone in my family needs to reboot, they can do it without knowing my password?
If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing. 1 Corinthians 13:2
Offline
Can I get it to save the password, just for some programs? So, if someone in my family needs to reboot, they can do it without knowing my password?
make a new usergroup and make the users you want the members of this group, then chmod/chown the programms you want to run by this group
The impossible missions are the only ones which succeed.
Offline
punkrockguy318 wrote:Can I get it to save the password, just for some programs? So, if someone in my family needs to reboot, they can do it without knowing my password?
make a new usergroup and make the users you want the members of this group, then chmod/chown the programms you want to run by this group
I do that, but it says...
halt: you must be superuser
If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing. 1 Corinthians 13:2
Offline
Someting different alltogether : if you want a user at the console to shut down the computer and if your windowmanager/desktop-environement does not catch Ctrl-Alt-Del you can edit /etc/inittab so that the ctraltdel line reads :
ca::ctrlaltdel:/sbin/shutdown -t3 -h now
and then issue
kill -1 1
to tell the system about it.
If your windowmanager/KDE/Gnome catches Ctrl-Alt-Del you can, of course, first switch to a virtual console (or exit X).
Offline
The alt-ctrl-delete works, but is there some way I can get halt to work from command line? halt's permissions are set so anyone can use it, but the superuser check is inside the halt program. Is there a solution?
If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing. 1 Corinthians 13:2
Offline
See my previous and Xentac's post for the answer...
Offline
i did the setuid on the halt binary.
simple and fast and worked like a dream
thanks i3839
slyski
Joey: If a cow passes away from natural causes can I eat it.
Pheobe: Not if I get there first.
Offline