Re: [pull] su.1 manual page
|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
Sami Kerola wrote: > On Thu, May 31, 2012 at 10:06 AM, Ludwig Nussel <ludwig.nussel@xxxxxxx> wrote: >>> Please find from my git a su(1) manual page candidate. The text is >>> almost one to one copy with GNU Coreutils 'su invocation' info page, >>> so it is questionable if I "wrote" the man page. To feel a little >> >> Hmm, I was about to write a man page from scratch. Should I continue or >> do we use the coreutils man page? > > 1. Continue writing from scratch, and propose your own man page candidate. I've attached my suggestion cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
.TH SU 1 "May 2012" "util-linux" "User Commands" .SH NAME su \- Run a command with substitute user and group ID .SH SYNOPSIS .B su [OPTIONS...] [\-] [USER [ARGS...]] .SH DESCRIPTION .B su allows to run commands with substitute user and group ID. When called without arguments \fBsu\fR defaults to running an interactive shell as \fIroot\fR. For backward compatibilty \fBsu\fR defaults to not change the current directory and to only set the enviroment variables \fBHOME\fR and \fBSHELL\fR (plus \fBUSER\fR and \fBLOGNAME\fR if the target user is not root). It's recommended to always use the \fB\-\-login\fR option (resp it's shortcut \fB-\fR) to avoid side effects caused by mixing environments. This version of \fBsu\fR uses PAM for authentication, account and session management. Some configuration options found in other \fBsu\fR implementations such as e.g. support of a wheel group have to be configured via PAM. .SH OPTIONS .TP \fB\-c\fR \fICOMMAND\fR, \fB\-\-command\fR=\fICOMMAND\fR Pass COMMAND to the shell with the .B -c option .TP \fB\-\-session\-command\fR=\fICOMMAND\fR Same as \fB-c\fR but do not create a new session (discouraged) .TP \fB\-f\fR, \fB\-\-fast\fR Pass \fB\-f\fR to the shell which may or may not be useful depending on the shell. .TP \fB\-\fR, \fB\-l\fR, \fB\-\-login\fR Starts the shell as login shell with an environment similar to a real login: \- clears all environment variables except for \fBTERM\fR \- initializes the environment variables \fBHOME\fR, \fBSHELL\fR, \fBUSER\fR, \fBLOGNAME\fR, \fBPATH\fR \- changes to the target user's home directory \- sets argv of the shell to \fB\-\fR in order to make the shell a login shell .TP \fB\-m\fR, \fB\-p\fR, \fB\-\-preserve-environment\fR Preserves the whole environment, ie does not set \fBHOME\fR, \fBSHELL\fR, \fBUSER\fR nor \fBLOGNAME\fR. .TP \fB\-s\fR \fISHELL\fR, \fB\-\-shell\fR=\fISHELL\fR Runs the specified shell instead of the default. The shell to run is selected according to the following rules in order: \- the shell specified with \fB\-\-shell\fR \- The shell specified in the environment variable \fBSHELL\fR if the \fB\-\-preserve-environment\fR option is used. \- the shell listed in the passwd entry of the target user \- /bin/sh If the target user has a restricted shell (ie not listed in /etc/shells) the \fB\-\-shell\fR option and the \fBSHELL\fR environment variables are ignored unless the calling user is root. .TP \fB\-\-help\fR Display help text and exit .TP \fB\-\-version\fR Display version information and exit .SH CONFIG FILES .B su reads the .IR /etc/default/su and .IR /etc/login.defs configuration files. The following configuration items are relevant for .BR su (1): .PP \fBFAIL_DELAY\fR (number) .RS 4 Delay in seconds in case of authentication failure. .RE .PP \fBENV_PATH\fR (string) .RS 4 Defines the PATH environment variable for a regular user. The default value is "/usr/local/bin:/bin:/usr/bin". .RE .PP \fBENV_ROOTPATH\fR (string), \fBENV_SUPATH\fR (string) .RS 4 Defines the PATH environment variable for root. The default value is "/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin". .RE .PP \fBALWAYS_SET_PATH\fR (boolean) .RS 4 If set to "yes" and \-\-login and \-\-preserve\-environment were not specified initializes \fBPATH\fR .RE .SH EXIT STATUS \fBsu\fR normall returns the exit status of the command it executed. If the command was killed by a signal, \fBsu\fR returns the number of the signal plus 128. Exit status generated by \fBsu\fR itself: .TP 1 Generic error before executing the requested command .TP 126 The requested command could not be executed .TP 127 The requested command could was not found .SH FILES .nf /etc/pam.d/su \- default PAM configuration file /etc/pam.d/su-l \- PAM configuration file if \-\-login is specified /etc/default/su /etc/login.defs .fi .SH "SEE ALSO" .BR pam (8), .BR shells (5), .BR login.defs (5), .SH AUTHOR Derived from coreutils' su which was based on an implemenation from David MacKenzie .SH AVAILABILITY The su command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
[Site Home] [Netdev] [Ethernet Bridging] [Linux Wireless] [Kernel Newbies] [Memory] [Security] [Linux for Hams] [Netfilter] [Bugtraq] [Rubini] [Photo] [Yosemite] [Yosemite News] [MIPS Linux] [ARM Linux] [Linux RAID] [Linux Admin] [Samba] [Video 4 Linux] [Linux Resources]