Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Sep 2004 14:56:50 +0100 (BST)
From:      Jan Grant <Jan.Grant@bristol.ac.uk>
To:        Ed Budd <ebudd@grokking.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: what are the pros and cons of running in single user?
Message-ID:  <Pine.GSO.4.61.0409161450000.29724@mail.ilrt.bris.ac.uk>
In-Reply-To: <414990F7.3000101@grokking.org>
References:  <FBC2DC90-0781-11D9-9302-000A95775140@mactutor.biz> <414990F7.3000101@grokking.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 16 Sep 2004, Ed Budd wrote:

> mailing lists at MacTutor wrote:
> > I have a machine running 4.10-STABLE that will be a dedicated gateway with a
> > router/firewall combo and web server plus mysql server (maybe). What would
> > be the pros and cons of running this system single user? Processes that run
> > under their own uid, would they be able to run?
> > 
> > Just curious. Any extra thoughts welcome.
> > 
> 
> er...doesn't "single user" mode mean no networking? My understanding is that
> this is really only for maintenance (ie. make installworld, etc.), not regular
> operations. Perhaps you meant something else or I just haven't had enough
> caffeine yet...

"Single-user mode" refers to the point in the boot process prior to 
running the startup scripts that make multi-user services available: for 
instance, mounting all drives, turning on swap, configuring network 
interfaces, starting daemons etc. and potentially most importantly, 
setting the securelevel.

Unlike the sysV init, there is no real "magic" about single-user mode 
apart from the fact that you can get init to stop the boot process and 
drop you directly into a shell in "single-user" mode. Running "shutdown" 
drops you into much the same state - that is, it kills off daemon 
processes etc. so that the machine can be administered* without 
unexpected interference from spurious processes. However, there's 
nothing (in principle) stopping you from kicking off those processes 
again, providing their environmental needs are satisfied.

So to answer the question: you can certainly tune the scripts and 
services available that launch you into multi-user mode to get a minimum 
profile on the machine. However if you modify rc to the extent that it 
turns on everything you need in order to set up bridging, run a few 
daemons etc then you're effectively duplicating the multiuser startup 
anyway.

jan

* modulo securelevel changes which can only be reverted via reboot.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
The Java disclaimer: values of 'anywhere' may vary between regions.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.61.0409161450000.29724>