home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    

su

su [option ] [user ] [shell_args ]

Create a shell with the effective user ID of another user (that is, login as user ). If no user is specified, create a shell for a privileged user (that is, become a superuser). Enter EOF to terminate. You can run the shell with particular options by passing them as shell_args (e.g., if the shell runs sh , you can specify -c command to execute command via sh , or -r to create a restricted shell).

su will inherit your environment settings. Administrators wishing to switch to a user's setup (perhaps to help them solve a problem) may wish to consider using this sequence:

me$ su

		Switch to root

Password:		Enter root password

# su -

 user
	Switch to other user

user$ 

Option

-

Go through the entire login sequence (i.e., change to user 's environment).


Previous: Reference: stty UNIX in a Nutshell: System V Edition Next: Reference: tail
Reference: stty Book Index Reference: tail

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System










??????????????@Mail.ru