On Thu, 5 Sep 2002, Yohann DESQUERRE (DSI NOISIEL) wrote:

> -----Message d'origine-----
> De : Bret Hughes [mailto:[EMAIL PROTECTED]] 
> Envoyé : jeudi 5 septembre 2002 15:27
> À : [EMAIL PROTECTED]
> Objet : Re: Strange problem with su and vi commands

> not sure about this specific problem but su - username rather than su
> user will build the environment for the user as if he logged in
> normally.
> 
> Bret 

just an observation -- i got burned *badly* once after having used 
"su - <username>" to allegedly become another user with that user's full
environment, then using command substitution "$(logname)" in a script
to clean up that user's directory.

big mistake (and clearly my fault).

the "logname" command will still return the original user's login name.
i should have used "whoami" to get the new effective username.  or is 
there another standard way i should have done this?

rday



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to