*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Linux man pages -> su (1)              
Title
Content
Arch
Section
 

SU(1)

Contents


NAME    [Toc]    [Back]

       su - Change user ID or become super-user

SYNOPSIS    [Toc]    [Back]

       su [OPTS] [-] [username [ARGS]]

DESCRIPTION    [Toc]    [Back]

       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    [Toc]    [Back]

       -      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    [Toc]    [Back]

       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    [Toc]    [Back]

       This version of su has many compilation options, only some of which may
       be in use at any particular site.

Files    [Toc]    [Back]

       /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    [Toc]    [Back]

      
      
       login(1), sh(1), login.defs(5), shells(5)

AUTHOR    [Toc]    [Back]

       Julianne Frances Haugh (jfh@austin.ibm.com)



									 SU(1)
[ Back ]
 Similar pages
Name OS Title
listRootBackups IRIX get the list of backups scheduled by the super-user
passwd Linux change user password
chfn Linux change user name and information
chfn HP-UX change user information; used by finger
ypchfn FreeBSD add or change user database information
ypchpass FreeBSD add or change user database information
chsh FreeBSD add or change user database information
chfn FreeBSD add or change user database information
chpass FreeBSD add or change user database information
chpass OpenBSD add or change user database information
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service