[buug] Lost root access

f.johan.beisser jan at caustic.org
Fri Nov 15 18:46:07 PST 2002


On Fri, 15 Nov 2002, Rick Moen wrote:

> If memory serves, the root account on FreeBSD is /bin/sh (a Bourne
> shell).  If I'm correct in remembering that, then it's possible that
> there are system dependencies, e.g., in scripts that run as root, on
> Bourne shell behaviour.  Bash is an excellent shell (say I), but it is
> not 100% Bourne-compatible, especially Bash 2.x.

	root:*:0:0:Charlie &:/root:/bin/csh
	toor:*:0:0:Bourne-again Superuser:/root:

those are both root users. default is /bin/csh (which has some tcsh
behaviours).

i tend to simply use "sudo" for all my root level crap. if i have to
execute more than one command as root, i invoke bash through sudo. simple
enough, gives me everything i need.

> Because I don't have a FreeBSD host at my disposal at the moment, the
> foregoing relies on memory, and may have flaws in some details -- in
> which case, I'm sure someone, noting my domain name, will take great
> delight in whapping me over the head for it.  But I stand by the general
> point, that you don't want to fsck around with root's environment,
> regardless.

it's usually bad policy to fuck with root unless you know what you're
going to break, or have the skill to fix it after it's broken.

most of freebsd's scripts are written in bourne shell.

-------/ f. johan beisser /--------------------------------------+
  http://caustic.org/~jan                      jan at caustic.org
	"Champagne for my real friends, real pain for
	  my sham friends." -- Tom Waits




More information about the buug mailing list