[OT] sudo, why not su?

Sean Miller sean at seanmiller.net
Mon Aug 8 08:25:05 UTC 2005


I missed most of this conversation, but reading through it is somebody 
asking whether you can su straight from one user to another?

If so, yes, that's precisely what "su" is meant to do...

$ su - fred
<enter fred's password>

The way "su" is written if no user is supplied then it switches to root, 
otherwise to that user.

The "-" tells it to run all the login scripts etc. (for instance 
~/.profile and /etc/profile etc. or the equivilent .login etc. on csh)

Maybe I've missed the point of this thread... if so, sorry.

Sean




More information about the ubuntu-users mailing list