Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Aug 2001 20:22:50 -0500 (CDT)
From:      David Scheidt <dscheidt@enteract.com>
To:        Mike Meyer <mwm@mired.org>
Cc:        Eric Anderson <anderson@centtech.com>, <questions@freebsd.org>
Subject:   Re: finding user of su
Message-ID:  <Pine.BSF.4.32L2.0108081959200.52189-100000@shell-2.enteract.com>
In-Reply-To: <15217.48743.5521.681759@guru.mired.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 8 Aug 2001, Mike Meyer wrote:

:Eric Anderson <anderson@centtech.com> types:
:> Is there a tool (or how would I write one) that can tell me the original
:> user after an su?  Basically, if I su to root, how can I tell who I su'd
:> from?
:
:There are a number of ways, but none are 100% reliable. You can check
:the USER environment variable, which the su command normaly doesn't
:change. You can suspend or exit the shell, and see what user you wind
:up as. There are probably other ways as well.
:

su-2.03# whoami
root
su-2.03# who am i
david            ttyp4   Aug  2 19:24   (:0.0)

-- 
dscheidt@tumbolia.com
Bipedalism is only a fad.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.32L2.0108081959200.52189-100000>