Automatically logging in root

Robert Reed bobr at zeus.UUCP
Sat Nov 16 04:36:40 AEST 1985


> I don't know how to automatically login as root.  Like the original poster,
> I also like to be root only when necessary.
> 
> What I do is login as myself and then su to root...So when I get a
> "permission denied" error on a long command, I can "fg" to my root shell,
> and re-do the command from history.

We have a utility called ".do" which examines the UID of the invoker,
and if it is contained in a selected set of validated numbers (which are
compiled into the program), does a setuid or setgid (depending on the
options) before exec-ing the rest of the line.  So, if you get a permission
denied, you can simply do a ".do !!".  Most of the time you sit in an
unpriveledged process, so there is less concern about making mistakes that
will horribly disfigure the filesystems.  But the power is there when you
need to use it.  It does mean that you have to be careful not to leave
unattended logins, but this comes as a simple matter of habit.
---
I got a postcard from my friend George with a satellite picture of
the entire earth.  On the back he wrote, "Wish you were here."
--Steve Wright

-- 
Robert Reed, CAE Systems Division, tektronix!teklds!bobr



More information about the Comp.unix mailing list