Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!olivea!oliveb!amdahl!dgcad!dg-rtp!hunt From: hunt@dg-rtp.rtp.dg.com (Greg Hunt) Newsgroups: comp.unix.questions Subject: Re: Substitute-User or Super-User ? Keywords: su, superuser, substitue user. Message-ID: <1991Jan26.173253.21396@dg-rtp.dg.com> Date: 26 Jan 91 17:32:53 GMT References: <868@creatures.cs.vt.edu> Sender: usenet@dg-rtp.dg.com (Usenet Administration) Reply-To: hunt@dg-rtp.rtp.dg.com Distribution: na Organization: Data General Corp., Research Triangle Park, NC Lines: 33 In article <868@creatures.cs.vt.edu>, ramakris@bloss.cs.vt.edu (S Ramakrishnan) writes: > I always thought 'su' was a 'substitute user' command. Its seems > apt also, since it allows the current USER to be changed to the > specified user-id. Of course, default value of this parameter is > root. > > That being so, why do so many reputed (?) shell programming books > describe 'su' as 'super user' command ('becoming a super user -- su'). > Was it originally meant to be become-superuser command ? It's because the default operation of su, as you mention, is to become root, who is the super user. 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. The man page for my system says "su - become super-user or another user", which is clearer than what you listed from your man page. "Super user" is defined as having a user-id of zero. Both root and sysadm usually have a user-id of zero, so both user names have super user privileges. Also, su doesn't change the current "user" as you mention. Rather, it starts a new shell with the specified user name. When you exit this new shell, you're back running your original shell. At least, that's the way it works on my system. Hope this helps. Enjoy! -- Greg Hunt Internet: hunt@dg-rtp.rtp.dg.com DG/UX Kernel Development UUCP: {world}!mcnc!rti!dg-rtp!hunt Data General Corporation Research Triangle Park, NC, USA These opinions are mine, not DG's.