Click to See Complete Forum and Search --> : how do I give my user permission (or "Mommy, can you sign my permission slip?")


The Ghost Of Ille Pugil
09-13-2001, 08:25 AM
Hi all, having a slight problem here. I've reinstalled slack on the new laptop (in the ongoing battle against X) and everything works except for xdm. That aside, since I'm the only user on the machine, how do I give my user account the ability to shut the machine down (halt)? With xdm, I'd just select shutdown... Any and all help is appreciated.

System Slack 8.0

Craig McPherson
09-13-2001, 08:37 AM
There's several ways to do this. Let me tell you one easy way to shut the system down, without even logging in.

Edit the /etc/inittab file find a line that starts with this, or create a new one if there's not one there:

kb::kbrequest:

Make it say this:

kb::kbrequest:shutdown -h now

Now, you can power down the system, by switching to a TEXT CONSOLE (this probably won't work in X) and pressing alt-UP.

The Ghost Of Ille Pugil
09-13-2001, 09:15 AM
neat trick! but, how do I get my user account to have permission to use "halt" - as in be able to type in halt and hit enter and have the laptop shut off?

Craig McPherson
09-13-2001, 09:44 AM
You don't, really. UNIX security is somewhat binary: either somone has full root access, or he has no special systems access at all.

You could always do something weird like making "halt" setuid so that anybody who runs it automatically runs it with root privileges, but that would be bad for security, or write a program that calls halt and make it setuid root. Neither of those is very good choices.

You can also configure sudo to allow your user account to run the halt command through sudo. The user would then be able to do this:

sudo halt

And the system would halt. You'd have to enter the user account password again for security, so it's not much faster than using su and entering the root password, though.

The Ghost Of Ille Pugil
09-13-2001, 12:23 PM
so how does kdm/gdm/xdm do it?

The Ghost Of Ille Pugil
09-13-2001, 03:50 PM
anyone?

Craig McPherson
09-13-2001, 05:26 PM
XDM runs with root authority. All the various display managers run as root.

The Ghost Of Ille Pugil
09-14-2001, 10:48 AM
okay, well that makes sense. So what I have to do know is to get xdm/kdm/gdm to work... thanks for the help.