Hi DU Admins
My question was about using a dynamically linked shell for root.
Thanks to Robert L. McMillin, Alan Rollow, Carlos A M dos Santos,
Dr. Tom Blinn, Sean O'Connell, Richard Renshaw, Kevin Oberman and
Tom Webster for their replies.
The expert opinion backed up by lots of experience in some cases
is that you can list a dynamically linked shell for root in
/etc/passwd without getting into trouble when you boot into
single user.
Here is Kevin Oberman's reply which sums it up very clearly:
> There are two copies of sh, /usr/bin/sh (which is NOT in the root
> partition) and /sbin/sh (which is). When the system is booted into
> single user mode, the /usr partition is not mounted and the statically
> linked files in /sbin will be used instead of the dynamically linked
> /usr/bin versions. All executables in /sbin should be linked statically.
Dr.Tom Blinn gave the most complete explanation of what happens when you
boot into single user mode:
> When you only come up to single user mode, you don't log in, so you get the
> shell that init spawned, which is always /sbin/sh (not some other shell).
> If you mount the local file systems (by running bcheckrc and maybe also the
> lsmbcheck or whatever it's called script if you're using lsm), then you can
> start a shell that uses shared libraries, but you probably also want to be
> sure to start your swap space if it's a large shell. The point here is that
> until you do something else from single user mode, you're using /sbin/sh as
> the root shell, with no reading of a login or profile file to set things up
> and maybe get you in trouble (so that you won't easily make it impossible to
> get to single user mode).
Tom Webster's reply is also worth quoting:
> The only reason to have root's shell be statically linked is to
> keep you out of trouble if you are messing with the shared libs
> themselves -- this should be done from single user mode and thus
> is a moot point.
Thanks again
Ian
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Ian Mortimer _/
_/ Email: mortimer_at_physics.uq.edu.au ,-_|\ Department of Physics _/
_/ Tel : +61 7 3365 3436 / *\ University of Queensland _/
_/ Fax : +61 7 3365 1242 \_,-._/ St. Lucia, Brisbane _/
_/ v Queensland, Australia 4072 _/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Disclaimer: Any opinions expressed are my own.
Received on Mon Aug 04 1997 - 02:53:22 NZST