Substitute-User or Super-User ?

Greg Hunt hunt at dg-rtp.rtp.dg.com
Sun Jan 27 04:32:53 AEST 1991


In article <868 at creatures.cs.vt.edu>, ramakris at 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 at 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.



More information about the Comp.unix.questions mailing list