summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pw
Commit message (Collapse)AuthorAgeFilesLines
* Don't try updating the passwd file if no data has changed. This allows thingsdavidn1999-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 passworddavidn1999-10-264-8/+47
| | | | | | locking mechanism for users. This works by prepending the string "*LOCKED*" to the password field in master.passwd to prevent successful decoding.
* Missed statement in password update relating to the previous changedavidn1999-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 successdavidn1999-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 -usheldonh1999-08-301-2/+6
| | | | | | | option as an optimization. PR: 13346 Submitted by: Neil Blakey-Milner <nbm@rucus.ru.ac.za>
* $Id$ -> $FreeBSD$peter1999-08-2823-23/+23
|
* Remove some more warnings.davidn1999-07-282-4/+6
|
* Fix date parsing to allow '0' (none) date value.davidn1999-03-151-3/+2
|
* Add the ability to print user records in unix version 7 (old) format.davidn1999-03-022-11/+19
|
* Fix minor nit with command line parsing for pw -V DIR action.davidn1999-02-231-2/+2
|
* Fix tpyo (sic) and missing 'else' (bad cut n' paste).davidn1999-02-231-13/+13
|
* 1) Do not blindly ignore file update errors which may occur due to concurrentdavidn1999-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 characterdes1999-02-081-2/+4
| | | | | | | is a digit. PR: bin/9484 Submitted by: Matthew D. Fuller <fullermd@futuresouth.com>
* Remove bogus file locking in main().davidn1999-01-081-13/+1
|
* -Clarification of last commit-billf1999-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 \0billf1999-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'.joerg1998-12-271-2/+2
| | | | Submitted by: Peter Philipp <pjp@bsd-daemon.net>
* Remove useless `BINOWN=root' now that it is the default.obrien1998-09-191-2/+1
|
* Fix inappropriate use of .Ql macro.jkoshy1998-09-181-2/+2
| | | | | PR: docs/7905 Submitted by: kuma@jp.freebsd.org
* The `group{del,mod,show}' take require a '[group|gid]' argument.jkoshy1998-08-311-1/+4
| | | | PR: docs/7788
* - On second thought, attempt to get the read-only lock, but don'tnate1998-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 FIXnate1998-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 beingnate1998-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.charnier1998-03-231-2/+2
|
* Overhaul this manpage - removing typos, awkward phrasing, and addressingsteve1998-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.wosch1998-02-111-4/+4
| | | | | PR: bin/5715 Submitted by: dannyman <dannyman@arh0300.urh.uiuc.edu>
* Use consistent spelling,hoek1997-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.charnier1997-10-1017-216/+228
|
* Unquote default group in pw.conf.davidn1997-09-011-1/+2
| | | | | PR: 4365 Submitted by: "Andrew L. Moore" <alm@mclink.com>
* Fix -p switch.davidn1997-08-011-2/+2
|
* getuid() -> geteuid().davidn1997-07-171-2/+2
|
* Remove srandomdev fallback codeache1997-06-141-5/+7
|
* Fixes skeleton directory test-it-is-a-directory logic.davidn1997-05-241-2/+2
| | | | | | | PR: 3666 Reviewed by: Submitted by: iaint@css.tuu.utas.edu.au Obtained from:
* Initialize RNG only onceache1997-03-241-23/+18
| | | | Use srandomdev() now
* Fix srandom arg according to Lite2ache1997-03-111-3/+3
|
* Typo fix 'and' -> 'an'.danny1997-03-041-2/+2
| | | | This is a 2.2 candidate.
* Back out MAXLOGNAME fix, Bruce points that copyinstr require NULache1997-03-031-2/+2
|
* Fix MAXLOGNAME usage, the code has wrong assumption thatache1997-03-021-3/+3
| | | | it must be NUL terminated
* Revert $FreeBSD$ to $Id$peter1997-02-2222-22/+22
|
* Yet another formatting consistency check.davidn1997-02-071-1/+1
|
* Fix useage of MAXLOGNAME to include terminating NUL, by usingdavidn1997-02-072-3/+12
| | | | | max(MAXLOGNAME-1,UT_NAMESIZE). Tidy up "pretty" printing format for longer usernames.
* Sort cross references.wosch1997-01-202-4/+4
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-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 rebuildingdavidn1997-01-058-22/+202
| | | | | | NIS maps. Suggested by: Peter Wemm
* Remove duplicated #include.davidn1997-01-051-2/+1
|
* Fix reference /etc/acct/pw.conf -> /etc/pw.conf.davidn1997-01-051-2/+2
| | | | Pointed-Out-By: Peter Wemm.
* Implemented /home -> /usr/home symlink kludge.davidn1997-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 ifdavidn1996-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.davidn1996-12-231-2/+2
|
* 1) 200 users per group limitation removed and pwdavidn1996-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.
OpenPOWER on IntegriCloud