[Courses] [Networking] Lesson 1

Charlotte Oliver charlotte.oliver at rcn.com
Thu Mar 20 07:46:04 EST 2003


On Thu, Mar 20, 2003 at 09:11:14PM +1100, Sue Stones wrote:
> I did that, but I didn't understand the answer.  So I tried it out.
> "su" loged me in as root, and left me in the current directory
> "su -" put me into the /root directory (the eqivalent of "su" followed by cd)
> I would have thought it would be more usefull to be in the / directory.

Depends what you're doing!

Sometimes, if I'm trying to investigate a user problem, but will need to
have root access privileges, using "su" lets me go anywhere while
pretending to be that user.  Of course, you have to be very cautious if
you're going to do this - root mistakes are final.  Also, if I'm just
moving a package I've uploaded to my user home directory to /root (which
is where I keep my tarballs and rpms and where I install them from),
I'll just use su.  

But in general, it's a better practice to use "su -" and then su
username to check out what's going on with your user's problem when you
need to see stuff specific to them.  Don't be a lazy sysadmin like me!
And always, always make backups before you delete anything - I actually
keep an extra harddrive in my server to keep my backups on so that they
don't confuse the user, but I have them available if needed.  And if my
primary hard drive fails, the data is still intact - a problem that's
happened to me on more than one occasion.

Charlotte


More information about the Courses mailing list