On Sun, 19 Mar 2000, Satya wrote:

> On Mar 18, 2000 at 20:38, Philip S Tellis wrote:
> 
> >I have to be root to run shutdown and halt.  If I run it as any other
> >user, it asks for a password. 
> 
> Because you're on the console. The *physical* console.

Don't make a diff, even if I telnet in.

> > I assume this is the root password, and
> 
> No, it's the password of $USER

That's not logical.  If all I needed was my own password, then I could
telnet into any machine and shut it down.  It's got to be the root
password.

Problem is, nothing works.  I could enter any password, only root's would
be accepted, but the machine will never shutdown unless I directly execute
/sbin/shutdown  (normal non-root users would execute /usr/bin/shutdown
which is a link to console-helper which in turn executes userhelper which
is something that uses PAM to execute root permission programs in
unpriviledged mode.)

In any case, I do not consider it safe to suid root to shutdown my
machine.  I do not consider it safe to suid root for anything.  It's just
a habit I wish to cultivate.

I should be able to execute all root privilidged programs as a user on
supplying the correct password.

Why can't it just be as simple as:
su -c shutdown - root

That would ask me for the password and shutdown.  Except that my PATH
would still be used, so /usr/bin/ would be in the path and not /sbin

Philip

To subscribe / unsubscribe goto the site www.ilug-bom.org ., click on the mailing list 
button and fill the appropriate information 
and submit. For any other queries contact the ML maintener

Reply via email to