Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

csh(1)

sh(1)

passwd(5yp)

environ(7)

edauth(8)

su(1)

Name

su − substitute a user ID

Syntax

su [username]

su − [username]

su −f [username]

Description

The su command requests the password of the specified username. If the correct password is given, su changes to that username without changing the current directory.  The user environment is unchanged except for HOME and SHELL which are taken from the password file entry for username.  The shell that is run is also taken from the password file entry for username.  The new user ID stays in force until the shell exits. 

If no username is specified, ‘root’ is assumed.  To remind the superuser of his responsibilities, the shell substitutes ‘#’ for its usual prompt. 

Options

−fPrevents csh() from executing the .cshrc file, making su start up faster.

−Simulates a full login. 

Diagnostics

Sorry
An invalid password was supplied for the specified username.

Unknown login: username
The specified username was not found in the passwd database. 

No directory
The home directory for the username is not accessible at this time (only with “−” argument). 

No shell
The shell specified in the passwd database entry for username could not be executed. 

Kerberos initialization failure
Consult your system administrator.

If enhanced security features are enabled the following error messages are also possible:

Requires secure terminal
Attempt to su to UID 0 on a line that is not marked secure in /etc/ttys.

User’s password has expired
Access is denied because the password for username is expired. 

This account is disabled
Access is denied because the auth entry corresponding to username is marked disabled. 

Files

/usr/adm/sulog
Log file of anyone who became root, with a date mark. 

See Also

csh(1), sh(1), passwd(5yp), environ(7), edauth(8)
Security Guide for Administrators
Security Guide for Users

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026