Penguin
Annotated edit history of su(1) version 3, including all changes. View license author blame.
Rev Author # Line
1 perry 1 !!NAME
3 CraigBox 2 su - Change user ID or become super-user
1 perry 3
4 !!SYNOPSIS
3 CraigBox 5 __su__ [[__OPTS__] [[__-__] [[__username__ [[__ARGS__]]
1 perry 6
7 !!DESCRIPTION
3 CraigBox 8 __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.
1 perry 9
3 CraigBox 10 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.
1 perry 11
3 CraigBox 12 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).
1 perry 13
3 CraigBox 14 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.
1 perry 15
3 CraigBox 16 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.
1 perry 17
18 !!OPTIONS
19
3 CraigBox 20 ;__-__ : make this a login shell
21 ;__-c__, __--commmand__=''<command>'' : pass ''command'' to the invoked shell using its __-c__ option
22 ;__-m__, __-p__, __--preserve-environment__ : do not reset environment variables, and keep the same shell
23 ;__-s__, __--shell__=''<shell>'' : use ''shell'' instead of the default in /etc/passwd
1 perry 24
25
26
27 !!NOTES
3 CraigBox 28 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.
1 perry 29
3 CraigBox 30 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.
1 perry 31
3 CraigBox 32 !!CAVEATS
1 perry 33
34
3 CraigBox 35 This version of __su__ has many compilation options, only some of which may be in use at any particular site.
1 perry 36
37 !!Files
38 /etc/passwd - user account information
39 /etc/shadow - encrypted passwords and age information
40 /etc/shells - valid user shells
3 CraigBox 41 $HOME/.profile - initialization script for default shell
42
1 perry 43 !!SEE ALSO
3 CraigBox 44 login(1), sh(1), __login.defs__ (5), shells(5)
1 perry 45
46 !!AUTHOR
47 Julianne Frances Haugh (jfh@austin.ibm.com)
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.

PHP Warning

lib/blame.php:177: Warning: Invalid argument supplied for foreach() (...repeated 11 times)