[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#3117: Tob needs whoami



You (Dirk Eddelbuettel) wrote:
> On Fri, 24 May 1996, Michael Meskes wrote:
>
> > Package: tob
> > Version: 0.14-0
> >
> > /sbin/tob calls /usr/bin/whoami. But in an emergency /usr might not be
>
> Good point. If I try to replace the
> 	if [ 'whoami' != root ] ; then
> by another test for not being root, what should I use? Will _everybody_
> have set $USER to their idendity when they either login as, or su to, root,
> under every possible shell?

Well bash sets the UID, EUID, GID and EGID variables by itself.. so
a test like
	if [ $UID -ne 0 ]; then
would do..

Mike.
--
  Miquel van    | Cistron Internet Services   --    Alphen aan den Rijn.
  Smoorenburg,  | mailto:info@cistron.nl          http://www.cistron.nl/
miquels@het.net | Tel: +31-172-419445 (Voice) 430979 (Fax) 442580 (Data)


Reply to: