Asking for root passwd when booting single user

Dave Becker dave at jupiter.nmt.edu
Tue Dec 13 02:39:28 AEST 1988


We've been using the following technique for several years without any
problems, but I don't guarantee it:  put the following in the file
"/.profile":

		trap exit 2 3 15
		PATH=/etc:/usr/bin:/bin:/usr/ucb
		login root

This causes the system to prompt for the root password when booting
single-user, and, if it doesn't get it, it immediately boots multi-user
instead.  **This assumes that root's shell is "/bin/csh"!!**.  If it's
/bin/sh, you won't like this "solution".

The login will time out in 60 seconds, so don't be slow if you mean to
boot single user.

Of course, SunOS 4.0 can be configured to require the root password
anyway, so this technique is already pretty dated.

dave
-- 
David C. Becker, "Sys Prog/Anal"            ``What are our schools for if not
New Mexico Tech Computer Center             indoctrination against Communism?''
Socorro, New Mexico  87801  [505] 835-5662                --- Richard M. Nixon
Internet: dave at nmt.edu         CSNET: dave at nmtsun        UUCP: ...!nmtsun!dave



More information about the Comp.sys.sun mailing list