(quite a geographically broad set of responses, eh?)
The Original Question:
I've RTFM'd and searched the archives, and am still trying to determine
the difference between /usr/bin/sh and /sbin/sh under Solaris 2.5.1.
The former is 197672 bytes in size, and the latter is 89492 bytes. Also,
the man page for sh indicates that /usr/xpg4/bin/sh is actually the
same as /usr/bin/ksh (Korn), further confusing things.
My guess here is that /sbin/sh is perhaps a statically linked version
to be used when only the root filesystem has been mounted. Is this
correct? If so, is there a statically linked version of ksh?
Also, on a related note, what is the preferred method of changing the
default shell for root? Is there any problem with just editing this
directly in the /etc/passwd file?
My hunch was confirmed that /sbin/sh is a statically linked shell.
This is of course most necessary when only the / filesystem is
available and you need to be able to log in as root.
Most also warned of the danger of messing with the root account's
default shell. I'm well aware of this; my actual goal was to use
a static Korn shell instead, but I'm told that no such animal
exists. I imagine it'd be rather fat if it did.
Many recommended use of vipw to do any editing of /etc/passwd.
vipw enables editing of this file while doing the proper file
lock and consistency checks.
Andy Paton suggested adding the following to root's .profile:
Birger pointed out that given the above, one might want to
check that everything is OK before automatically starting the