Click to See Complete Forum and Search --> : User using shutdown
I just installed RH7.1 on my girlfriends laptop - she like the KDE/Gnome games ;-) It won't allow her as a user to 'shutdown -h now'; she doesn't want to go through the bother of su-ing to root to shut it down (heh...women :p ), how can I give her user name permission to do this? (It will accept the reboot command though) Ultimately i would assign a simple alias to the shutdown command for her.
As a side note, I thought linux would be a ***** to install on a Sony VIAO and was pepared for war, but it was a breeze, I didn't have to troubleshoot anything! It was win2k that gave me all the headaches. Go figure.
Craig McPherson
09-17-2001, 02:20 PM
Originally posted by VRay:
<STRONG>It won't allow her as a user to 'shutdown -h now'</STRONG>
That's a good thing. Only a superuser can shut down the system. Do you really want some random script kiddie in Hong Kong shutting down your system at 3AM? Permissions exist for a reason.
how can I give her user name permission to do this?
You don't.
If you're in a console, why not just press Ctrl-Alt-Del and then power off the system right after it soft-resets? If you're in X, just press Ctrl-Alt-F1 to get to a console. You don't even have to be logged in to use Ctrl-Alt-Del.
Another option is to edit /etc/inittab and enable a keyboard event -- you can run a specified command whenever Ctrl-Alt-UP is pressed. You can assign that event to "shutdown -h now" if you like.
Ultimately i would assign a simple alias to the shutdown command for her.
Ctrl-Alt-Del is fairly simple.
As a side note, I thought linux would be a ***** to install on a Sony VIAO and was pepared for war, but it was a breeze, I didn't have to troubleshoot anything! It was win2k that gave me all the headaches. Go figure.
Win2K on a Sony Vaio is a nightmare, isn't it? 3% hardware support and 10% software support ain't all that great...
Thanks Craig, I'll try assign the Ctrl-Alt-UP; the system cannot be switched off after it soft resets. She will not be online when booting to linux; no dial up even, she will just mindlessly be playing shinsen-sho or something. Could I create an alias (or a script maybe?) that will su to root and then shutdown with one command? There are zero security issues involved here.
I couldn't believe the win2k install, had to run at least 10 patches, update bios...
Craig McPherson
09-17-2001, 02:57 PM
Well, you could just make the shutdown program setuid root. Then, anybody who ran it would run it as root. Setting stuff setuid is one of the biggest security risks out there, but since the box isn't Internet-connected, I'll assume you're willing to risk it.
I forget whether setuid is 2 or 4 (setgid is the other), so you'd want to set the shutdown program to either mode 2755 or 4755. Try both, because I can't remember which. Or you could just use 6755.
X_console
09-17-2001, 05:01 PM
4755