Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: sunloop!oconnor!porsche!miker@central.sun.com (Mike Raffety) Newsgroups: comp.sys.sun Subject: Re: "Best Way" to inhibit halting of workstations Keywords: SunOS Message-ID: <8903292154.AA09760@porsche> Date: 21 Apr 89 10:16:22 GMT Sender: usenet@rice.edu Organization: Sun-Spots Lines: 37 Approved: Sun-Spots@rice.edu Original-Date: Wed, 29 Mar 89 15:54:17 CST X-Sun-Spots-Digest: Volume 7, Issue 234, message 1 of 10 To achieve a secure single-user mode under SunOS 3.X, there's a couple of ways to do it; the documented, easy, not-quite-perfect way, and the foolproof, you-need-Unix-source way: 1. At the tail end of the init(8) man page, in the BUGS section, there's a documented method. Unfortunately, I believe you can get around this simply by INTerrupting at the right moment. Here's the BUGS section: ------ When coming up single-user, the system does not require the super-user to log in. To force a login when running single-user, add the line: login root to the file /.profile. ------ 2. The foolproof way requires Unix source; change init so that when it comes up single-user, it execs login, instead of sh: ------ fine% scc sccsdiff -r1.1 -r1.2 init.c 23a24 > char login[] = "/bin/login"; 227c228,230 < execl(shell, minus, (char *)0); --- > write(2, "Single-user mode...", 20); > execl(login, login, (char *)0); > /* execl(shell, minus, (char *)0); MVR */ fine% ------ The interesting thing about BOTH of these is that login will time out after 60 seconds, and the machine will continue to come up multi-user. Note that fsck will NOT have been run when it comes up, since it originally came up single-user.