Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!agate!ucbvax!bloom-beacon!ora!jerry From: jerry@ora.com (Jerry Peek) Newsgroups: comp.unix.questions Subject: Re: Substitute-User or Super-User ? (why 'su user' is useful) Summary: hints for using "su user" Keywords: su, superuser, substitute user. Message-ID: <1991Jan29.111117.17404@ora.com> Date: 29 Jan 91 11:11:17 GMT References: <868@creatures.cs.vt.edu> <1991Jan26.173253.21396@dg-rtp.dg.com> Distribution: na Organization: O'Reilly and Associates Inc., Cambridge, MA Lines: 37 In article <1991Jan26.173253.21396@dg-rtp.dg.com> hunt@dg-rtp.rtp.dg.com writes: > ...Using the su command to become the > super user is more common, in my opinion, than using it to become > another user. That's my understanding of the origin of the name. BTW, here's why I use "su user" a lot. I think it's really handy: - I want shells open onto several other accounts. My system has job control, so I can suspend the "su user" shells and jump back to them whenever I want: jerry@wheeze% jobs [1] Stopped su [2] + Stopped su bin [3] - Stopped su manuals jerry@wheeze% fg su bin ...do stuff as bin... bin@wheeze% suspend Stopped jerry@wheeze% fg %1 su wheeze# ...do stuff as root... wheeze# suspend Stopped jerry@wheeze% - Because these shells run on the same tty as your login shell, "su" doesn't tie up other tty/pty ports like multiple logins or multiple windows can. This is a help on busy machines with lots of users. The thing to watch out for is that plain "su user" doesn't read a csh user's .login file or sh user's .profile. Using "su - user" solves that, but you can't suspend an "su -" shell (at least not on my systems). --Jerry Peek, jerry@ora.com