Home | History | Annotate | Download | only in su
History log of /src/usr.bin/su/su.1
RevisionDateAuthorComments
 1.55  24-Mar-2023  kre PR misc/57287 from Nan Xiao

While it has always been assumed that everyone "just knew" that a simple
"su' meant "su root" perhaps the man page really should make that explicit.

Do that (using slightly different wording than suggested in the PR).
 1.54  01-Sep-2019  wiz Remove superfluous Ns.
 1.53  01-Sep-2019  sevan su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf
 1.52  18-May-2017  abhinav branches: 1.52.10; 1.52.12;
Correct the man page reference
 1.51  19-Sep-2014  wiz branches: 1.51.6;
Sort sections. From Henning Petersen in PR 49222.
 1.50  21-Nov-2012  pgoyette Note that 'su -l' does not update utmp and related databases.
 1.49  18-May-2009  wiz branches: 1.49.6; 1.49.12;
Sort options.
 1.48  27-Oct-2007  christos bump date.
 1.47  27-Oct-2007  christos uncomment the group handling documentation.
 1.46  17-Oct-2007  christos From Anon Ymous:
- general cleanup [e-funcs, lint fixes, exit values, more error checking]
- add the ability to change the primary group group as login:group, or :group
*disabled*, until it is discussed.
- remove krb4 code since there is no more krb4 code in the tree.
- also make the old su behave like the pam su: su to the same user, does
not ask for a password.
- split out shared code into a separate file.
 1.45  15-Dec-2005  hubertf branches: 1.45.12;
Give a general description what this command does before going into
all the details.
 1.44  05-Jul-2005  kleink Set LOGNAME in the new environment (in addition to USER);
fixes PR bin/30670 from Pavel Cahyna.
 1.43  19-Jun-2005  wiz Use groff macros instead of troff ones.
 1.42  19-Jun-2005  wiz Drop trailing whitespace.
 1.41  05-Apr-2005  christos Update with pam descriptions.
XXX: needs more work.
1. code needs to be added in pam_group.so to handle indirect groups and
documented.
2. the indirect group description outside before the customization section
does not work with pam, but could be made to work once [1] is implemented.
 1.40  28-Feb-2005  christos branches: 1.40.2;
Fix unmatched .El warning.
 1.39  01-Feb-2005  christos Add commented out notes on how we support the special compilation options
under pam.
 1.38  27-Apr-2004  kleink Remove a leftover line apparently from rev. 1.17; also from Juha Hyttinen
in PR bin/25347.
 1.37  27-Apr-2004  cjep Fix typo (SU_INDIRECT_GROOP -> SU_INDIRECT_GROUP). PR#25347 from
Juha Hyttinen.
 1.36  17-Sep-2003  atatat branches: 1.36.2;
Hey, wiz! Doesn't this need a comma?
 1.35  23-Aug-2003  wiz Comma and Pp police. Bump date for last.
 1.34  20-Aug-2003  christos Normalize the program's compilation options so they are all of the form SU_
and document them.
 1.33  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.
 1.32  27-Apr-2003  wiz Drop trailing space.
 1.31  27-Apr-2003  jmmv Implement the `-d' option, which behaves as `-l' but does not change the
current directory. Idea suggested by dsl@ in source-changes.
 1.30  24-Apr-2003  wiz Bump date for last.
 1.29  20-Apr-2003  christos PR/5803: Gregg A. Woods: su doesn't support it's "-f" option for sh and/or ksh
fixed by unsetenv("ENV") when -f is set and the shell is not csh.
 1.28  25-Feb-2003  wiz .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
 1.27  21-Feb-2003  jmmv Add missing dot to the `-' option. Ok'ed by wiz.
 1.26  19-Jan-2003  jmmv Add EXIT STATUS section.
 1.25  13-Oct-2002  wiz New sentence, new line; drop trailing whitespace.
 1.24  05-Oct-2002  hubertf Make example clearer, that the -c _after_ the login is passed to the shell.
Addresses PR 18538 by reed@reedmedia.net
 1.23  08-Dec-2001  wiz Sort sections, sort SEE ALSO, use .Pp instead of empty lines.
 1.22  04-Apr-2001  wiz kerberos(1) -> (8). Sort SEE ALSO.
 1.21  08-Mar-2001  fair Correct the HISTORY section, per PR 11192 and Robert Elz.
 1.20  10-Jan-2001  sjg If SU_INDIRECT_GROUP is defined (it is by default), then su will
consider that SUGROUP and ROOTAUTH group contain the names of
users and groups. If user is not found in the list check_ingroup()
recurses on each member until either user is found or end of chain
is reached.

The above allows su's use of the wheel group to be extended to a large
number of users without necessarily putting them in group wheel, and
in a way that will work over NIS that simply extending the line length
limit in getgrent.c cannot.
 1.19  10-May-2000  jdolecek branches: 1.19.4;
Add some examples of usage. Modelled after what is in Solaris manpage,
though no text has been actually copied from there (for legal reasons).
 1.18  11-Feb-2000  abs Set SU_FROM environment variable. This can be used to determine a 'su -'
shell from a real login shell (but only if you care).
 1.17  14-Jan-2000  mjl Implement login_cap capability lookup.
 1.16  27-Sep-1999  mjl Mention "-" is the same as "-l". Closes PR/8499 by Matthew Aldous.
 1.15  02-May-1999  kleink branches: 1.15.2;
Bring $PATH information in sync with _PATH_DEFPATH.
 1.14  19-Oct-1997  lukem branches: 1.14.4;
WARNSify, fix .Nm usage, deprecate register, getopt returns -1 not EOF
 1.13  02-Jul-1997  lukem As per discussion with mrg, back out parts of previous change.

The appropriate entry in /etc/group as returned by getgrnam() is
used to determine if 'su root' may be permitted, rather than
checking if membership exists in the result of getgroups().

The following changes were made regarding the behaviour of the special
group for 'su root'
* allow for definition of SUGROUP (defaults to "wheel") to override group name.
* use getgrnam(SUGROUP) instead of getgrgid(0).
* only scan getgrnam(SUGROUP)->gr_mem when checking for group membership.
* be more specific as to why 'su root' failed

NOTE: If a user's primary group is SUGROUP, and they're not a member
of SUGROUP in /etc/group, they will not be able to su.
 1.12  27-Jun-1997  lukem * Notify of impending password or account expiry (check against
_PASSWORD_WARNDAYS from <pwd.h>). For non-root users, enforce expiry when
it happens. From Simon Gerraty <sjg@zen.void.oz.au> in [bin/935].
* Check for group 0 in process's current group membership (as returned by
getgroups(2)), instead of just looking at the entry for wheel in /etc/group.
Based on code by Dan Caresone <dan@oink.geek.com.au> in [bin/792], and
also solves [bin/2466].
* Clean up to pass -Wall
 1.11  08-Mar-1997  mouse alternate -> alternative, per PR 2643
 1.10  31-Jan-1997  ghudson Document the recent change in group wheel semantics. Also, it wasn't
previously documented that anyone could su to root if group 0 didn't
exist.
 1.9  20-Jan-1997  cjs Add list of bugs: relies only on /etc/group for group membership,
sets policy in code.
 1.8  09-Jan-1997  tls Sync to 4.4BSD-Lite2
 1.7  05-Sep-1994  mycroft Document usage of additional arguments after login name, as suggested by
Peter da Silva (slightly edited).
 1.6  24-May-1994  deraadt add skey support
 1.5  11-Jan-1994  jtc Fix spelling errors.
 1.4  01-Aug-1993  mycroft Add RCS indentifiers.
 1.3  28-Jul-1993  jtc Back out last change until I can get an official interpretation.
 1.2  28-Jul-1993  jtc Update LOGNAME as well as USER environment variables to keep POSIX utilities
that only understand LOGNAME happy.
 1.1  21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2  10-Dec-1994  jtc imported from 4.4lite
 1.1.1.1  21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.14.4.2  18-Feb-2000  he Pull up revision 1.18 (requested by abs):
Have su set SU_FROM environment variable, and use to avoid
incorrect 'use su' warning in root's .login.
 1.14.4.1  08-Jan-2000  he Pull up revisions 1.15-1.16 (requested by kim):
Apply two minor corrections, one fixes PR#8499.
 1.15.2.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.19.4.1  26-Apr-2001  he Pull up revision 1.22 (requested by wiz):
Correct kerberos reference to kerberos(8). Sort SEE ALSO section.
 1.36.2.2  18-Jul-2005  riz Pull up revision 1.44 via patch (requested by kleink in ticket #2070):
Set LOGNAME in the new environment (in addition to USER);
fixes PR bin/30670 from Pavel Cahyna.
 1.36.2.1  29-Apr-2004  jmc branches: 1.36.2.1.2;
Pullup rev 1.37-1.38 (requested by cjep in ticket #210)

Fix typo's
 1.36.2.1.2.1  18-Jul-2005  riz Pull up revision 1.44 via patch (requested by kleink in ticket #2070):
Set LOGNAME in the new environment (in addition to USER);
fixes PR bin/30670 from Pavel Cahyna.
 1.40.2.2  29-Dec-2005  riz Pull up following revision(s) (requested by hubertf in ticket #1060):
usr.bin/su/su.1: revision 1.45 via patch
Give a general description what this command does before going into
all the details.
 1.40.2.1  09-Jul-2005  tron Pull up revision 1.44 via patch (requested by kleink in ticket #551):
Set LOGNAME in the new environment (in addition to USER);
fixes PR bin/30670 from Pavel Cahyna.
 1.45.12.1  06-Nov-2007  matt sync with HEAD
 1.49.12.1  25-Feb-2013  tls resync with head
 1.49.6.1  16-Jan-2013  yamt sync with (a bit old) head
 1.51.6.1  19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.52.12.1  05-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #174):
lib/libc/sys/chmod.2: revision 1.48
lib/libc/sys/stat.2: revision 1.59
lib/libc/sys/unlink.2: revision 1.30
lib/libc/sys/lseek.2: revision 1.25
lib/libc/sys/getuid.2: revision 1.18
lib/libc/sys/chown.2: revision 1.37
lib/libm/man/exp.3: revision 1.32
lib/libm/man/log.3: revision 1.7
lib/libc/sys/open.2: revision 1.60
lib/libc/stdio/fopen.3: revision 1.36
lib/libc/stdio/putc.3: revision 1.14
lib/libc/sys/mount.2: revision 1.51
share/man/man9/copy.9: revision 1.22
share/man/man9/uiomove.9: revision 1.20
lib/libc/sys/setuid.2: revision 1.23
lib/libc/sys/close.2: revision 1.18
sbin/init/init.8: revision 1.61
lib/libc/sys/write.2: revision 1.36
lib/libc/sys/read.2: revision 1.39
sbin/init/init.8: revision 1.62
lib/libc/sys/wait.2: revision 1.40
usr.bin/tty/tty.1: revision 1.10
lib/libc/sys/link.2: revision 1.33
usr.bin/du/du.1: revision 1.24
lib/libc/stdlib/exit.3: revision 1.17
usr.bin/su/su.1: revision 1.53
usr.bin/mail/mail.1: revision 1.66
lib/libc/sys/fork.2: revision 1.25
usr.bin/su/su.1: revision 1.54
usr.bin/mail/mail.1: revision 1.67
lib/libm/man/sin.3: revision 1.15
share/man/man9/intro.9: revision 1.26
share/man/man5/utmp.5: revision 1.17
lib/libc/compat-43/creat.3: revision 1.17
lib/libc/time/ctime.3: revision 1.61
lib/libcompat/4.1/stty.3: revision 1.10
usr.bin/dc/dc.1: revision 1.3
lib/libm/man/cos.3: revision 1.17
lib/libc/sys/chdir.2: revision 1.23
lib/libc/gen/exec.3: revision 1.30
lib/libc/gen/exec.3: revision 1.31
games/bcd/bcd.6: revision 1.18
games/bcd/bcd.6: revision 1.19
usr.bin/write/write.1: revision 1.7
usr.bin/wc/wc.1: revision 1.18
usr.bin/pr/pr.1: revision 1.24
usr.bin/who/who.1: revision 1.25
lib/libc/sys/mkdir.2: revision 1.30
lib/libc/stdio/getc.3: revision 1.13
usr.bin/sort/sort.1: revision 1.40
usr.bin/mesg/mesg.1: revision 1.11
share/man/man5/passwd.5: revision 1.34
sort was there since v1
https://www.bell-labs.com/usr/dmr/www/man61.pdf

dc was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

du was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mail was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mesg was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
Update URL

write was in v1
https://www.bell-labs.com/usr/dmr/www/man14.pdf
grammar

passwd(5) was in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

utmp(5) was present in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

Earliest version of wtmp I could find was in v3
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5

Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

create was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of exec()
Move statement on execlpe() & execvpe() to HISTORY section.

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf

getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

stty & gtty were around since v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
https://www.bell-labs.com/usr/dmr/www/man22.pdf

mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

start documenting history
exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putc & putw were in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putchar was in v4
https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which
version,
hence I've skipped mentioning it.
End sentence with a dot.
Remove superfluous Pp.
Remove superfluous Pp.
Remove superfluous Ns.
Remove superfluous Pp.
fetch(9) -> ufetch(9)
fetch(9) -> ufetch(9). Remove superfluous Pp.
fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.52.10.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411

RSS XML Feed