non-root single user
Marion Hakanson
hakanson at mist.cs.orst.edu
Thu Oct 13 10:45:08 AEST 1988
On one of our 4.3bsd machines here we have an init(8) which asks for
the root password before it comes up single user. Nice enough, but
I would like our backup people to be able to bring it up single user,
not running as root.
As a first hack, I modified this init so it also accepts the password
for the user "backup" and then did a set[gu]id() to that userid. This
all takes place after init has forked itself to exec the single user
shell, so all I really added was the set[gu]id. Pretty simple, and it
seems to work OK except that the shell you end up in is running as root.
The question: Is this approach naive? I checked the return values on
the set[gu]id calls, and they were fine, but we sure enough end up in
a root shell afterwards. Is there something in the kernel (or elsewhere)
which is preventing this hack from working? I looked around a bit, but
didn't see anything obvious (to me :-).
Alternative suggestions would also be appreciated. Thanks.
--
Marion Hakanson Domain: hakanson at cs.orst.edu
UUCP : {hp-pcd,tektronix}!orstcs!hakanson
More information about the Comp.unix.wizards
mailing list