Differences between current version and predecessor to the previous major change of su(1).
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 3 | Last edited on Monday, February 14, 2005 12:17:10 am | by CraigBox | |
Older page: | version 1 | Last edited on Tuesday, June 4, 2002 12:22:55 am | by perry | Revert |
@@ -1,121 +1,47 @@
-SU
-!!!SU
-NAME
-SYNOPSIS
-DESCRIPTION
-OPTIONS
-NOTES
-CAVEATS
-Files
-SEE ALSO
-AUTHOR
-----
!!NAME
+su - Change user ID or become super-user
-
-su - Change user ID or become super-user
!!SYNOPSIS
+__su__ [[__OPTS__] [[__-__] [[__username__ [[__ARGS__]]
-
-__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.
-__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
.
+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.
-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
.
+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
.
-
-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
!!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
-__-__
-make this a login shell
-
-
-__-c__,
-__--commmand__=''''
-
-
-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__=''''
-
-
-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.
-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.
+!!CAVEATS
-A subsystem login is indicated by the presense
of a
-!!CAVEATS
-
+This version
of __su__ has many compilation options, only some of which may be in use at any particular site.
-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
+$HOME/.profile - initialization script for default shell
+
!!SEE ALSO
+login(1), sh(1), __login.defs__ (5), shells(5)
-
-login(1), sh(1), __login.defs__(5),
-shells(5)
!!AUTHOR
-
-
Julianne Frances Haugh (jfh@austin.ibm.com)
-----