Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
su(1)
Edit
PageHistory
Diff
Info
LikePages
!!NAME su - Change user ID or become super-user !!SYNOPSIS __su__ [[__OPTS__] [[__-__] [[__username__ [[__ARGS__]] !!DESCRIPTION __su__ is used to become another user during a login session. Invoked without a username, __su__ defaults to becoming the super user. The optional argument __-__ may be used to provide an environment similiar to what the user would expect had the user logged in directly. The user will be prompted for a password, if appropriate. Invalid passwords will produce an error message. All attempts, both valid and invalid, are logged to detect abuses of the system. An optional command can be executed. This is done by the shell specified in ''/etc/passwd'' for the target user unless the __-s__ or __-m__ options are used. Any arguments supplied after the __username__ will be passed to the invoked shell (shell must support the -c command line option in order for a command to be passed to it). The current environment is passed to the new shell. The value of __$PATH__ is reset to __/bin:/usr/bin__ for normal users, or __/sbin:/bin:/usr/sbin:/usr/bin__ for the super user. This may be changed with the __ENV_PATH__ and __ENV_SUPATH__ definitions in ''/etc/login.defs''. When using the __-m__ or __-p__ options, the users environment is not changed. A subsystem login is indicated by the presense of a "*" as the first character of the login shell. The given home directory will be used as the root of a new filesystem which the user is actually logged into. !!OPTIONS ;__-__ : make this a login shell ;__-c__, __--commmand__=''<command>'' : pass ''command'' to the invoked shell using its __-c__ option ;__-m__, __-p__, __--preserve-environment__ : do not reset environment variables, and keep the same shell ;__-s__, __--shell__=''<shell>'' : use ''shell'' instead of the default in /etc/passwd !!NOTES The __-m__, __-p__ and __-s__ options are restricted by the target user's shell being listed in __/etc/shells__. If it's not listed, then it's assumed to be a restricted account, a normal su is performed, and those options are ignored silently. A subsystem login is indicated by the presense of a "*" as the first character of the login shell. The given home directory will be used as the root of a new filesystem which the user is actually logged into. !!CAVEATS This version of __su__ has many compilation options, only some of which may be in use at any particular site. !!Files /etc/passwd - user account information /etc/shadow - encrypted passwords and age information /etc/shells - valid user shells $HOME/.profile - initialization script for default shell !!SEE ALSO login(1), sh(1), __login.defs__ (5), shells(5) !!AUTHOR Julianne Frances Haugh (jfh@austin.ibm.com)
21 pages link to
su(1)
:
login(1)
xscreensaver(1)
biff(1)
at(1)
csh(1)
newgrp(1)
pam(7)
pam.conf(5)
pam.d(8)
passwd(5)
sg(1)
shadow(5)
updatedb(1)
crontab(5)
GentooNotes
MakeWhatIs
TwoLetterCommands
Man1s
crontab(1)
SuperUser
NewUserTips
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.