home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD1.bin
/
gnu
/
man
/
cat1
/
su.0
< prev
next >
Wrap
Text File
|
1993-12-07
|
5KB
|
133 lines
SU(1L) SU(1L)
NNAAMMEE
su - run a shell with substitute user and group IDs
SSYYNNOOPPSSIISS
ssuu [-flmp] [-c command] [-s shell] [--login] [--fast]
[--preserve-environment] [--command=command]
[--shell=shell] [-] [user [arg...]]
DDEESSCCRRIIPPTTIIOONN
This manual page documents the GNU version of ssuu. ssuu
allows one user to temporarily become another user. It
runs a shell with the real and effective user ID, group
ID, and supplemental groups of USER. If no USER is given,
the default is root, the super-user. The shell run is
taken from USER's password entry, or /bin/sh if none is
specified there. If USER has a password, ssuu prompts for
the password unless run by a user with real user ID 0 (the
super-user).
By default, ssuu does not change the current directory. It
sets the environment variables `HOME' and `SHELL' from the
password entry for USER, and if USER is not the super-
user, sets `USER' and `LOGNAME' to USER. By default, the
shell is not a login shell.
If one or more ARGs are given, they are passed as addi-
tional arguments to the shell.
ssuu does not handle /bin/sh or other shells specially (set-
ting argv[0] to "-su", passing -c only to certain shells,
etc.).
On systems that have syslog, ssuu can be compiled to report
failed, and optionally successful, ssuu attempts using sys-
log.
This program does not support a "wheel group" that
restricts who can ssuu to super-user accounts, because that
can help fascist system administrators hold unwarranted
power over other users.
OOPPTTIIOONNSS
_-_, _-_l_, _-_-_l_o_g_i_n
Make the shell a login shell. This means the fol-
lowing. Unset all environment variables except
`TERM', `HOME', and `SHELL' (which are set as
described above), and `USER' and `LOGNAME' (which
are set, even for the super-user, as described
above), and set `PATH' to a compiled-in default
value. Change to USER's home directory. Prepend
"-" to the shell's name, to make it read its login
startup file(s).
1
SU(1L) SU(1L)
_-_c _C_O_M_M_A_N_D_, _-_-_c_o_m_m_m_a_n_d_=_C_O_M_M_A_N_D
Pass COMMAND, a single command line to run, to the
shell with a _-_c option instead of starting an
interactive shell.
_-_f_, _-_-_f_a_s_t
Pass the _-_f option to the shell. This probably
only makes sense with ccsshh and ttccsshh, for which the
_-_f option prevents reading the startup file
(.cshrc). With Bourne-like shells, the _-_f option
disables filename pattern expansion, which is not a
generally desirable thing to do.
_-_m_, _-_p_, _-_-_p_r_e_s_e_r_v_e_-_e_n_v_i_r_o_n_m_e_n_t
Do not change the environment variables `HOME',
`USER', `LOGNAME', or `SHELL'. Run the shell given
in the environment variable `SHELL' instead of
USER's shell from /etc/passwd, unless the user run-
ning ssuu is not the superuser and USER's shell is
restricted. A restricted shell is one that is not
listed in the file /etc/shells, or in a compiled-in
list if that file does not exist. Parts of what
this option does can be overridden by _-_-_l_o_g_i_n and
_-_-_s_h_e_l_l.
_-_s_, _-_-_s_h_e_l_l _s_h_e_l_l
Run SHELL instead of USER's shell from /etc/passwd,
unless the user running ssuu is not the superuser and
USER's shell is restricted.
The long-named options can be introduced with `+' as well
as `--', for compatibility with previous releases. Even-
tually support for `+' will be removed, because it is
incompatible with the POSIX.2 standard.
2