Click to See Complete Forum and Search --> : shutting down in user without su


alfredo
11-11-2000, 10:48 PM
How can I set up permissions so a user can shutdown or reboot without root password?
I want my wife to start using my linux, so I am setting up an account for her. She likes the games.

She is a incurable tinkerer and I am not yet ready to let her get into root. I'd hate to think of the trouble she could get into there. I don't even trust myself there.

TaeShadow
11-11-2000, 10:53 PM
ctrl-alt-delete generally lets you reboot without a password.

winnotgoneyet
11-12-2000, 12:48 AM
Most distros have some way of allowing permissions to be changed so any user or even all users can shutdown, tell us which you have????

alfredo
11-12-2000, 02:24 AM
I have YellowDog Linux. It will allow c-a-d in root, but not in user. C-A-D will shutdown X, but I want to give permission to a user to reboot or shutdown the whole machine. I don't think she would want to su then type the command. They could do command-ctrl-power to force quit, but that causes fsck on reboot. I can turn that off, but I don't want to.

She's figured out Riven without the book. Da chick is smart.

I think she will like Linux.

bdl
11-12-2000, 04:24 AM
Originally posted by alfredo:
How can I set up permissions so a user can shutdown or reboot without root password?


Sudo is usually the best way to allow non-admin users to utilize 'root' functions without actually letting them have a root shell or being allowed to run anything else as root. You just edit your /etc/sudoers file to allow a certain user to run certain functions as root; you can be as restrictive as you like. Then when your wife needs to shutdown the system, she just types 'sudo shutdown -h now' and gives her password (optionally, you can give her sudo permissions without having to type in a password). Check out The Sudo Website (http://www.courtesan.com/sudo/) for more details.

Strike
11-12-2000, 04:47 AM
Yes!!! Another sudo aficionado! I absolutely adore sudo it is one of the first things I install on a system that doesn't come with it bundled. And then I generally give my own account ALL = NOPASSWD : ALL in the /etc/sudoers file so as to make things easy on myself and essentially making myself a "root account with a little idiot prevention thrown in". So, instead of having to do a ton of keystrokes (i.e. su<enter><password><enter>) I just prefix whatever command I want to do with sudo and it flies. Sure, I still su to do certain things, but sudo is the BEST for the every-now-and-then maintenance activities I do (like writing to my Windows drives, editing global config files, installing software, etc). Trust me, if you use Linux as a desktop system, sudo will greatly help you maintain it, and it provides so many elegant solutions for your other users as well.

alfredo
11-12-2000, 10:31 AM
great! they also have a Linux PPC version, 1.5.9p4

I will give it a try. Thanks. I will let you know how it works. Other suggestions are welcomed.

StanLin
11-12-2000, 11:27 AM
I use Red Hat and my non root users can shutdown with no problem at all as long as they supply their own passwords at the prompt. Am I on the same subject?

Linux newbie.

bdl
11-12-2000, 03:50 PM
Originally posted by StanLin:
I use Red Hat and my non root users can shutdown with no problem at all as long as they supply their own passwords at the prompt. Am I on the same subject?




I dont run Redhat/MDK but I know this is true; those distros make as many things as 'idiot proof' as they can, and a recent test install of mandrake was like running the dreaded M$ for craps sake! Anyway, on these systems, I believe they do add 'shutdown' , 'reboot', 'halt', to the /etc/sudoers file so that any non-root user can call them. I dont see anything wrong with this on a basic home system, but you want to have as few suid/sudo apps and as tight permissions as you can allow on a production system.

alfredo
11-12-2000, 04:09 PM
I got it to work for shutdown. I don't know how I did it, but it works. I will try to do it again with another user. I noticed that the newgrp command doesn't work.