Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jul 2004 21:52:25 +0200
From:      "Simon L. Nielsen" <simon@FreeBSD.org>
To:        Fernando Schapachnik <fernando@mecon.gov.ar>
Cc:        Brandon Grace <brandon.grace@ntscom.com>
Subject:   Re: Root users shell == no existant shell /bin/bash
Message-ID:  <20040708195225.GB761@zaphod.nitro.dk>
In-Reply-To: <20040708155519.GH1169@bal740r0.mecon.gov.ar>
References:  <20040708153848.GF1169@bal740r0.mecon.gov.ar> <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAQalskDVfo0WQ/a0WxfyYA8KAAAAQAAAAf2nUAULtfUGYmBzHXriA/AEAAAAA@ntscom.com> <20040708155519.GH1169@bal740r0.mecon.gov.ar>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
[Please don't top post...]

On 2004.07.08 12:55:19 -0300, Fernando Schapachnik wrote:
> En un mensaje anterior, Brandon Grace escribió:
> > For some reason su -c relates to "class" not "command" as in linux. I know
> > about the booting into single user mode also. This happends to be the
> > primary dns server and our secondary doesn't have the capacity to handle all
> > the queries. Any other suggestions?
>
> Looks like a bug in the man page:
>
> su - root -c id
> Password: ********
> uid=0(root) gid=0(wheel) groups=0(wheel), 2(kmem), 3(sys), 4(tty), 5(operator),
> 20(staff), 31(guest)

No the manual page is correct; what's happening here is that su
handles the "- root" arguments, and "-c id" is being passed to root's
login shell where -c tells the shell to run the rest of the arguments
as run commands.  That is, at least the behavior of -c both for sh and
tcsh.

-- 
Simon L. Nielsen
FreeBSD Documentation Team

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFA7aX5h9pcDSc1mlERAj1hAKCYFsSlhUo82ag6dDkYMDdNjWv9RQCfc9fu
e1do5aGo8/wXPj5mxxAlE4I=
=39d9
-----END PGP SIGNATURE-----
home | help

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