summaryrefslogtreecommitdiff
path: root/usr.sbin/user
AgeCommit message (Collapse)Author
2015-09-12use .Cm for fixed string argumentsIngo Schwarze
2015-08-20stdlib.h is in scope; do not cast malloc/calloc/realloc*Theo de Raadt
ok millert krw
2015-04-24read_defaults has the thing for strtonum to chew on in cp, notDavid Gwynne
optarg. fixes a segfault introduced by the atoi to strtonum change and reported by ajacatout@
2015-04-23Replace atoi() usage with strtonum(). OK deraadt@Todd C. Miller
2015-03-13remove the first comma from constructs like ", and," and ", or,": you can useJason McIntyre
"and" and "or" to join sentence clauses, and you can use commas, but both hinders reading;
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
2014-12-01use reallocarray() deep inside an macro ugly as sinTheo de Raadt
2014-08-27Add missing capability to handle new $2b version of blowfish passwordSebastian Reitenbach
encryption for usermod and friends. OK millert@, seems reasonable for now tedu@
2014-07-20Make sure the correct errno is reported by warn* or err* and notPhilip Guenther
the errno of an intervening cleanup operation like close/unlink/etc. Diff from Doug Hogan (doug (at) acyclic.org)
2013-11-23unsigned char casts for ctype; ok jcaTheo de Raadt
2013-09-10Move the chown and chmod out of copydotfiles() and add an explicitTodd C. Miller
check for skeldir set to the empty string. Fixes a problem where the owner/mode is not set on the user's homedir if the specified skeldir does not exist. OK ajacoutot@
2013-08-06Write uids/gids as unsigned in the passwd file and error messages.Todd C. Miller
This matches what pw_scan() expects. OK deraadt@
2013-07-16use .Mt for email addresses; from Jan Stary <hans at stare dot cz>; ok jmc@Ingo Schwarze
2013-04-02for parsing time values, fall back to atoll() for time_tTheo de Raadt
ok guenther
2013-03-04When locking/unlocking an account, never touch passwords that are "*"Antoine Jacoutot
or 13*. Also make sure to never endup with an empty password. cluebat and ok miod@
2013-02-16Fix unlocking on 32bits arch where it would fuck up the shell...Antoine Jacoutot
Do not try to (un)lock system users; people wanting to do so (???) will know what they do and use vipw(8). unlocking issue reported by Andre Stobe on tech@ cluesticks and ok miod@, ok deraadt@
2012-09-20Be consistent with what the installer and useradd(8) do and put newlyAntoine Jacoutot
created users into their own primary group. This does not change existing installations that already have a usermgmt.conf(5). ok todd@ beck@
2012-09-18Add 2 new knobs to usermod(8):Antoine Jacoutot
-U to unlock an account -Z to lock an account Locking means adding a '*' prefix to the encrypted password and appending a '-' to the user's shell... and obviously the opposite for unlocking. some inputs from sthen@, otto@ and deraadt@ ok todd@
2012-01-29fix previous: grp is unused here just check the return valueAntoine Jacoutot
spotted by Jeremie Courreges-Anglas
2012-01-28Make it possible to remove a user from all secondary groups by using:Antoine Jacoutot
usermod -S '' username Original patch from jca at wxcvbn dot org. Added a comment to the man page. man tweaks and ok jmc@ ok miod@
2012-01-28When setting the groups (`-S'), make sure all provided groups exist inAntoine Jacoutot
the system otherwise we may end up removing all groups from a user. ok miod@
2012-01-12fgets(3) returns a pointer, so compare against NULL, not integer 0.Antoine Jacoutot
from Michael W. Bombardieri ok miod@
2011-12-31Remove the EXTENSIONS ifdef danse; it might have made sense in the pastAntoine Jacoutot
but user(8) behaviour has become OS specific in time so there's no sense keeping this. We are OpenBSD and we use BSD EXTENSIONS unconditionally. ok miod@ millert@ deraadt@
2011-12-30Fix a warning.Antoine Jacoutot
inputs from and ok miod@
2011-12-27Follow adduser(8) behaviour (as well as what the pkg tools and ourAntoine Jacoutot
installer do) and do not append the user to its primary group name in /etc/group. ok miod@
2011-12-24-p requires an argument; from Stefan PetterssonJason McIntyre
ok krw
2011-12-04Add a new '-S' option to _set_ the user's secondary group(s) (which alsoAntoine Jacoutot
permits to remove a user from a group). It uses the same syntax as `-G'. In practice this works like `-G' on Linux; it was decided not to modify our `-G' option because people rely on the existing behavior (which works like `-aG' on Linux, i.e. append to group). Reworked from scratch from a submission by Frank Brodbeck. man page bits reviewed by jmc@ ok miod@
2011-07-18Sync user(8) SYNOPSIS to useradd(8) and userinfo(8)Ingo Schwarze
as suggested by Glen Anderson <g dot s dot anderson at gmail dot com>; while here, add a few missing "[,group,...]", do not lump punctuation into .Ar, and drop useless .Li from "..". OK jmc@
2011-04-17improve line breaking in the SYNOPSIS section.Igor Sobrado
as noted by schwarze@, the semantics of the .Bk macro is slightly different now to conform with modern groff releases; using a command-line option (.Op) macro, instead of its multiline version, while preserving the .Bk/.Ek block makes our manual pages compatible with mandoc, new groff and even groff-1.15. ok jmc@, schwarze@
2011-04-16remove trailing whitespace, no binary change.Igor Sobrado
2011-04-16rephrase argument to -g for consistency not only with useradd(8)Igor Sobrado
and usermod(8) but also with the notational conventions used in other manual pages. ok jmc@
2011-04-08- avoid nasty line wrap in SYNOPSISJason McIntyre
- put -G in the right place
2011-04-06Avoid using NULL in non-pointer contexts: use 0 for integer values and '\0'Miod Vallat
for chars.
2010-09-19more wacky macro fixing;Jason McIntyre
2010-09-03add an EXIT STATUS section for /usr/sbin;Jason McIntyre
2010-07-26- use warnx instead of warn when skipping large lines, as errno isMiod Vallat
nonsensical in that case (and usually zero). - when altering the groups file, preserve a single "+" line instead of complaining it is incorrect and removing it. ok fgsch@ millert@ ray@
2009-02-08deal with potential empty string fgets can returnCharles Longeau
use strcspn to properly overwrite '\n' in fgets returned buffer ok ray@ jaredy@ looks ok gilles@ long time ago on a similar diff
2009-01-21paragraphs and sentences start with uppercase letters; synchronizeIgor Sobrado
the synopsis and usage of user(8) related commands; sort the options list in the DESCRIPTION section of the manual pages; spacing. ok jmc@
2009-01-19replace standardized text concerning the exit values of applicationsIgor Sobrado
with the right mdoc macros.
2008-12-20- various improvements from Ingo Schwarze;Jason McIntyre
- remove non-functional -v option from docs/usage() feedback/ok millert otto
2008-12-16strptime() never sets tm_isdst, so set it to -1 before passing thePhilip Guenthe
struct tm to mktime() so that the calculation will follow the local DST rules ok millert@ otto@
2008-10-09When adding a new user, do not move a potential yp line (+:*:::0:0::::) to theMiod Vallat
end of the file, for this would make logins coming after the yp line (such as nomadic or fallback accounts) to come back before the yp line and take precedence. Found the hard way installing packages needing a user to be created. ok deraadt@
2007-08-02catch a few truncation cases instead of silently ignoring them. one of theTheo de Raadt
fixes is from pr 5554. ok millert, ray
2007-05-31convert to new .Dd format;Jason McIntyre
2007-04-05remove some extra tests, from charles longeauTed Unangst
2007-03-02Check if group exists before checking if group is local.Ray Lai
OK millert@.
2007-03-02Replace regex(3) routines with simple string searching and comparisonRay Lai
routines. OK millert@.
2007-02-21put -L and -G in the right place;Jason McIntyre
2007-02-21put -G in the right place; from Igor SobradoJason McIntyre
2007-02-06fix some dodgy displays;Jason McIntyre