• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

su

su

su Switches user identity.
su

su [-Kflm] [<login> [<shell_arguments>]]

-K Does not attempt to use Kerberos authentication for the user.
-f Prevents the reading of .cshrc if the invoked shell is csh.
-l Simulates a full login. Environment is discarded except for HOME, SHELL, PATH, TERM, and USER. HOME and SHELL are set to the target login's default. USER is set to the target login, unless the target login has a UID of 0, in which case it is unmodified. PATH is set to /bin:/usr/bin. TERM is imported from your current environment. The invoked shell is the target login's. su changes directory to the target login's home directory.
-m Leaves the environment unmodified. The invoked shell is your login shell and no directory changes are made. As a security precaution, if the target user's shell is a non-standard shell, and the caller's real UID is nonzero, su fails.
If su is executed by root, no password is requested, and a shell with the appropriate user ID is executed. No additional Kerberos tickets are obtained.
The -l and -m options are mutually exclusive. The last one listed is the one executed.
Only users in the wheel group (normally GID 0) can su to root. By default, unless reset by a startup file, the super user prompt is set to # as a reminder of its power.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint