summaryrefslogtreecommitdiffstats
path: root/pw
Commit message (Collapse)AuthorAgeFilesLines
* Missed statement in password update relating to the previous changeDavid Nugent1999-10-261-1/+1
| | | | to fileupdate() which prevented pwd_mkdb(1) from being run.
* Clean up error handling in fileupdate(), which now returns 0 on successDavid Nugent1999-10-265-62/+117
| | | | | | | | | | | | 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]
* Only do a full pwd_mkdb for deletions; other operations may use the -uSheldon Hearn1999-08-301-2/+6
| | | | | | | option as an optimization. PR: 13346 Submitted by: Neil Blakey-Milner <nbm@rucus.ru.ac.za>
* $Id$ -> $FreeBSD$Peter Wemm1999-08-2823-23/+23
|
* Remove some more warnings.David Nugent1999-07-282-4/+6
|
* Fix date parsing to allow '0' (none) date value.David Nugent1999-03-151-3/+2
|
* Add the ability to print user records in unix version 7 (old) format.David Nugent1999-03-022-11/+19
|
* Fix minor nit with command line parsing for pw -V DIR action.David Nugent1999-02-231-2/+2
|
* Fix tpyo (sic) and missing 'else' (bad cut n' paste).David Nugent1999-02-231-13/+13
|
* 1) Do not blindly ignore file update errors which may occur due to concurrentDavid Nugent1999-02-2314-155/+725
| | | | | | 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>
* Remove bogus file locking in main().David Nugent1999-01-081-13/+1
|
* -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>
* Fix the spelling of `FreeBSD'.Joerg Wunsch1998-12-271-2/+2
| | | | Submitted by: Peter Philipp <pjp@bsd-daemon.net>
* Remove useless `BINOWN=root' now that it is the default.David E. O'Brien1998-09-191-2/+1
|
* Fix inappropriate use of .Ql macro.Joseph Koshy1998-09-181-2/+2
| | | | | PR: docs/7905 Submitted by: kuma@jp.freebsd.org
* The `group{del,mod,show}' take require a '[group|gid]' argument.Joseph Koshy1998-08-311-1/+4
| | | | PR: docs/7788
* - On second thought, attempt to get the read-only lock, but don'tNate Williams1998-08-041-1/+16
| | | | | | | consider it a exit failure if it doesn't work. This means that root processes can safely get the lock, but normal processes can still use the 'pw' utility to get information (which may change out from under them.)
* - Removed read-only lock from 'pw'. This removes portions of the FIXNate Williams1998-08-041-22/+1
| | | | | | | | from PR/6787, but allow non-root users to use pw to get password information. However, this should be safe since the fixes for disallowing multiple instances from modifying the DB are still intact. Bug noted by: dima@best.net (Dima Ruban)
* Fix race condition in pw caused by multiple instances of pwd_mkdb beingNate Williams1998-07-163-7/+39
| | | | | | | | | | | | | | | | | run at the same time. Notes: The fileupdate function is still somewhat broken. Instead of returning a failure code if it can't modify the original file it renames the .new file and continues as though nothing is wrong. This will cause the lock on the original file to be lost and could lead to a similar race condition. I left that portion of the code alone since I feel that the maintainer of the code would have a better concept of how he wants to handle errors in that function than I do. PR: bin/6787 Submitted by: Craig Spannring <cts@internetcds.com>
* .Nm pw -> .Nm.Philippe Charnier1998-03-231-2/+2
|
* Overhaul this manpage - removing typos, awkward phrasing, and addressingSteve Price1998-02-141-111/+123
| | | | | | | a few technical faults. PR: 5692 Submitted by: dannyman@arh0300.urh.uiuc.edu
* pwd_mkdb option '-c' was renamed to -C some weeks ago.Wolfram Schneider1998-02-111-4/+4
| | | | | PR: bin/5715 Submitted by: dannyman <dannyman@arh0300.urh.uiuc.edu>
* Use consistent spelling,Tim Vanderhoek1997-12-251-2/+2
| | | | | | | | writeable -> writable (recall prior debate over this? :-) initialise -> initialize recognise -> recognize Merry Christmas! :)
* Use err(3) instead of local redefinition. Add rcsid string.Philippe Charnier1997-10-1017-216/+228
|
* Unquote default group in pw.conf.David Nugent1997-09-011-1/+2
| | | | | PR: 4365 Submitted by: "Andrew L. Moore" <alm@mclink.com>
* Fix -p switch.David Nugent1997-08-011-2/+2
|
* getuid() -> geteuid().David Nugent1997-07-171-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
|
* Typo fix 'and' -> 'an'.Daniel O'Callaghan1997-03-041-2/+2
| | | | This is a 2.2 candidate.
* 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-2222-22/+22
|
* Yet another formatting consistency check.David Nugent1997-02-071-1/+1
|
* Fix useage of MAXLOGNAME to include terminating NUL, by usingDavid Nugent1997-02-072-3/+12
| | | | | max(MAXLOGNAME-1,UT_NAMESIZE). Tidy up "pretty" printing format for longer usernames.
* Sort cross references.Wolfram Schneider1997-01-202-4/+4
|
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-1422-22/+22
| | | | | | | | 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-058-22/+202
| | | | | | NIS maps. Suggested by: Peter Wemm
* Remove duplicated #include.David Nugent1997-01-051-2/+1
|
* Fix reference /etc/acct/pw.conf -> /etc/pw.conf.David Nugent1997-01-051-2/+2
| | | | Pointed-Out-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-219-290/+472
| | | | | | | 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-194-16/+37
| | | | | to the mangpage explaining the consequences (to be updated at a later date after login class conf support is added).