Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)
su(1) OSS Shell and Utilities Reference Manual
NAME
su - Substitutes user ID temporarily and changes password
SYNOPSIS
su [[-f ]|[- ]
[ username | username,password[,]]
[ -c string ]]
FLAGS
- Starts a login shell using /bin/sh; /etc/profile and .profile are processed if they exist,
and the current working directory is set to the home directory (the initial working
directory) of the new user ID. The ENV and HOME environment variables are set
accordingly. If the - option is not specified, the ENV and HOME environment vari-
ables are not changed.
-f The -f option allows the command to skip certain steps to load faster. A new shell
(/bin/sh) is started.
-c string Specifies a string to be passed to the shell as a command to execute. This option must
follow a specified username value.
The string value is subject to all of the rules of character substitution and is usually
enclosed in quotation marks. Refer to the osh(1) reference page either online or in the
Open System Services Shell and Utilities Reference Manual for a discussion of using -c
options.
DESCRIPTION
The su command can change:
• The login name and therefore the user ID of the current shell
• The password for the user ID of the current shell
• The login name and therefore the user ID used for a new shell
• The password used for the user ID of a new shell
Security is enforced by requiring the user to complete a normal login dialog for the new login
name.
The new user ID stays in force until the shell exits. The new password stays in force until
changed again.
Changing the Password
The password can be changed either on the command line or during the login dialog by specify-
ing a comma immediately after the current password. See the EXAMPLES section of this refer-
ence page for more information. For information about valid passwords, including information
about special characters in passwords, see the USER_AUTHENTICATE_ procedure in the Guar-
dian Procedure Calls Reference Manual.
The ability to change the password of the new login name can be disabled by setting the
BLINDLOGON attribute of the new login name.
Operands
username Specifies the login name to which the command applies. If no value is specified
for username, the SUPER.SUPER username is assumed; this usually
corresponds to the super ID of 65535. Only users who belong to group number
255 can issue su to become the super ID, even with the appropriate password for
the super ID.
8−68 Hewlett-Packard Company 527188-021