summaryrefslogtreecommitdiffstats
path: root/pw/pw_user.c
Commit message (Collapse)AuthorAgeFilesLines
* Use %c for expire/change datesAndrey A. Chernov2001-03-211-2/+2
|
* Switch from using rand() or random() to a stronger, more appropriate PRNGKris Kennaway2001-03-051-19/+2
| | | | | | (random() or arc4random()) Reviewed by: bde
* Convert to use the <sys/queue.h> macros rather than fiddling with the queueBen Smithurst2000-12-291-2/+2
| | | | | | structure internals. Reviewed by: markm
* Add working and easy crypt(3)-switching. Yes, we need a whole new APIBrian Feldman2000-08-221-1/+20
| | | | | | | | | | | | | | for crypt(3) by now. In any case: Add crypt_set_format(3) + documentation to -lcrypt. Add login_setcryptfmt(3) + documentation to -lutil. Support for switching crypt formats in passwd(8). Support for switching crypt formats in pw(8). The simple synopsis is: edit login.conf; add a passwd_format field set to "des" or "md5"; go nuts :) Reviewed by: peter
* Move test for -w flag outside of the code dealing with -D (defaults).David Nugent2000-07-201-2/+2
| | | | | | | This should cause -w's argument not to be ignored in the usermod case, so it will affect modification of the user's password instead of using the pw.conf (or internal default=no '*') password method. PR: bin/11168
* Allow -g with an empty argument in the -D case. This allows -g "" to setDavid Nugent2000-07-201-5/+8
| | | | | no default group (and thus fall back to user-based groups instead). PR: bin/5717
* Fix another missed case where usermod would not set the "modified" flag:David Nugent2000-07-201-3/+6
| | | | | | -h - to set no password. But only mark modified if the account is not already locked (i.e. first char of crypt password field is '*'). PR: bin/19999
* Fix breakage introduced by bypassing update for additional 'mod'David Nugent2000-07-031-0/+1
| | | | | | | functionality when nothing had actually changed; -d changes would not set the 'something had changed flag'. Actually test for a change in homedir. PR: bin/19649
* Localize ctype too.Andrey A. Chernov2000-06-241-2/+2
| | | | Add weekday to showuser expired fields
* Localize time/date.Andrey A. Chernov2000-06-221-10/+10
| | | | | Use ISO 8601 date in logs. Fix wrong argument type in ctype functions.
* Fix obvious braino in assignment statement. usermod -g should work again.David Nugent2000-06-181-1/+1
| | | | | PR: 17877 Submitted by: pius@zyan.com
* Fix a long-standing bug in the rename case previously masked by another bugDavid Nugent2000-06-181-2/+10
| | | | just fixed in .db file updating.
* Portability fixes for other bsd4.4 derivatives.David Nugent2000-01-151-10/+12
|
* Don't try updating the passwd file if no data has changed. This allows thingsDavid Nugent1999-10-261-39/+102
| | | | | | like "pw usermod <name> -m" to work for non-local NIS users; since no attempt is made to update the password entry, the home directory will be created and populated as expected without error.
* Add new functionality "lock" and "unlock" to provide a simple passwordDavid Nugent1999-10-261-2/+31
| | | | | | locking mechanism for users. This works by prepending the string "*LOCKED*" to the password field in master.passwd to prevent successful decoding.
* Clean up error handling in fileupdate(), which now returns 0 on successDavid Nugent1999-10-261-21/+49
| | | | | | | | | | | | instead of a boolean. This replicated through he front-end sub-functions relating to add, delete, modify entries in passwd & group files Errno is now preserved so output of errc()/warnc() will be less obfuscated by subsequent errors when reporting the problem. Add more intelligent error handling when attempting to modify/delete NIS entries with no corresponding local database entry. [MFC to stable in a couple of weeks to keep both in sync]
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
|
* Remove some more warnings.David Nugent1999-07-281-2/+3
|
* Add the ability to print user records in unix version 7 (old) format.David Nugent1999-03-021-8/+15
|
* 1) Do not blindly ignore file update errors which may occur due to concurrentDavid Nugent1999-02-231-83/+89
| | | | | | updating 2) Add -V <etcdir>, which allows maintaining user/group database in alternate locations other than /etc.
* Don't assume a_name is a number just because the first characterDag-Erling Smørgrav1999-02-081-2/+4
| | | | | | | is a digit. PR: bin/9484 Submitted by: Matthew D. Fuller <fullermd@futuresouth.com>
* -Clarification of last commit-Bill Fumerola1999-01-041-1/+1
| | | | | | | The char that the random letters and numbers are being pulled from is ended with a '\0'. Using sizeof() includes this '\0' in the 'pool' of possible characters. This patch decrements by one the size so we don't accidently end the new password prematurly.
* Let's make sure we're at the end of the password string before we apply a \0Bill Fumerola1999-01-021-2/+2
| | | | | | | | | and terminate it. This patch ensures passwords will be the correct length of 8, which is what is implied in the source (but not reflected in the man page). PR: bin/7817 Reviewed by: Alfred Perlstein <bright@hotjobs.com> Submitted by: Hiroshi Nishikawa <nis@pluto.dti.ne.jp>
* Use err(3) instead of local redefinition. Add rcsid string.Philippe Charnier1997-10-101-48/+52
|
* Fix -p switch.David Nugent1997-08-011-2/+2
|
* Remove srandomdev fallback codeAndrey A. Chernov1997-06-141-5/+7
|
* Fixes skeleton directory test-it-is-a-directory logic.David Nugent1997-05-241-2/+2
| | | | | | | PR: 3666 Reviewed by: Submitted by: iaint@css.tuu.utas.edu.au Obtained from:
* Initialize RNG only onceAndrey A. Chernov1997-03-241-23/+18
| | | | Use srandomdev() now
* Fix srandom arg according to Lite2Andrey A. Chernov1997-03-111-3/+3
|
* Back out MAXLOGNAME fix, Bruce points that copyinstr require NULAndrey A. Chernov1997-03-031-2/+2
|
* Fix MAXLOGNAME usage, the code has wrong assumption thatAndrey A. Chernov1997-03-021-3/+3
| | | | it must be NUL terminated
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
|
* Fix useage of MAXLOGNAME to include terminating NUL, by usingDavid Nugent1997-02-071-2/+11
| | | | | max(MAXLOGNAME-1,UT_NAMESIZE). Tidy up "pretty" printing format for longer usernames.
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Adds optional NIS passwd file updating and optionally rebuildingDavid Nugent1997-01-051-3/+25
| | | | | | NIS maps. Suggested by: Peter Wemm
* Implemented /home -> /usr/home symlink kludge.David Nugent1997-01-031-11/+28
| | | | | If home basedir would be created in the root partition, create it under /usr instead, and symlink /basedir -> /usr/basedir.
* 1) Base home directory is created if it does not already exist ifDavid Nugent1996-12-301-35/+65
| | | | | | | | useradd -m or useradd -D -b are used. 2) Hyphen allowed in username if not first character. Fix trivial bug in error fmt string. 3) /etc/skeykeys updating changed to do 'inplace' update, commenting out a username rather than removing it completely.
* Correct file modes on updated /etc/skeykeys.David Nugent1996-12-231-2/+2
|
* 1) 200 users per group limitation removed and pwDavid Nugent1996-12-211-13/+66
| | | | | | | will handle lines of any length in /etc/group. 2) Fixed bug with usermod -d not updating user's home directory. 3) Minor formatting display changes/fixes with *show -P.
* Bugfix (cosmetic) for output of generated passwords.David Nugent1996-12-201-3/+3
|
* Allow 8-bit characters in the passwd gecos field, and adds a paragraphDavid Nugent1996-12-191-11/+11
| | | | | to the mangpage explaining the consequences (to be updated at a later date after login class conf support is added).
* Changes to password generator: fallback to MD5 generator disabledDavid Nugent1996-12-171-32/+66
| | | | | | (/dev/urandom used by default under FreeBSD), and implemented a "portable" but less secure generator for other systems. Add display of expiry/password change dates in -P user display.
* Submitted by: proff@iq.orgDavid Nugent1996-12-171-2/+2
| | | | Minor fix for security patch.
* Reviewed by: davidn@blaze.net.auDavid Nugent1996-12-161-4/+50
| | | | | Submitted by: proff@iq.org Security patch for better random password generation.
* Update from David, reflecting Wolfram's wishes regarding limitation ofJoerg Wunsch1996-12-111-5/+8
| | | | | | the allowable character set. Submitted by: David Nugent
* Copyright update by the author, to be more in line with our sampleJoerg Wunsch1996-12-101-12/+6
| | | | | | copyright. Submitted by: David Nugent
* Upgrade from the author, reflecting all my wishes resulting out of theJoerg Wunsch1996-12-091-50/+103
| | | | | | | | sysinstall use of this tool (plus some bug fixes). 2.2 candidate... Submitted by: David Nugent <davidn@nserver.usn.blaze.net.au>
* pw(8) -- a backend utility to manage the user and group databases.Joerg Wunsch1996-12-091-0/+849
sysinstall's new User&group menu will use it, hence it's a 2.2 candidate despite of providing new functionality. Submitted by: David L. Nugent, <davidn@blaze.net.au>