hakanson@mist.cs.orst.edu (Marion Hakanson) (10/13/88)
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@cs.orst.edu UUCP : {hp-pcd,tektronix}!orstcs!hakanson