summaryrefslogtreecommitdiffstats
path: root/pw/pw.c
Commit message (Collapse)AuthorAgeFilesLines
* Add the groupmod '-d' option to pw to allow the deletion of existing usersSean Farley2008-02-231-1/+2
| | | | | | | | | | from a group without the need to perform the same operation by replacing the existing list via the '-M' option. The '-M' option requires someone to fetch the existing members with pw, deleting the undesired members from the list and sending the altered list back to pw. Approved by: wes (mentor) MFC after: 5 days
* style(9) (verified no object changes)Sean Farley2008-02-231-1/+1
| | | | | Approved by: wes (mentor) MFC after: 5 days
* Add home directory creation mode to pw.conf(5) and be a bitLukas Ertl2007-03-301-0/+1
| | | | more specific about the effect of the current umask on -M.
* Add -M argument to usage() output.Lukas Ertl2007-03-301-0/+2
|
* Introduce the new option -M to allow to set the permissions ofLukas Ertl2007-03-261-3/+2
| | | | | | | | the user's newly created home directory. If omitted, it's derived from the current umask. PR: bin/16880, bin/83253 (partially), bin/104248 MFC in: 1 month
* o Fix groupadd getopt line and make 'pw groupadd -o' work.Maxim Konovalov2006-09-181-1/+1
| | | | | | PR: bin/100684 Submitted by: Devon H. O'Dell MFC after: 3 weeks
* Add a `-H <fd>' option that is like `-h <fd>', but accepts an alreadyIan Dowse2004-01-111-4/+6
| | | | | | | encrypted password on the specified file descriptor. PR: bin/22033 MFC after: 2 weeks
* Fix the type of the NULL arg to execl()Brian Somers2001-07-091-1/+1
| | | | Idea from: Theo de Raadt <deraadt@openbsd.org>
* Fix a harmless format string bogon and mark a function as __printflike().Kris Kennaway2001-07-051-1/+1
| | | | | | | There is still one instance of non-constant format string use inside that function, but it's hard to fix. MFC after: 1 week
* Document the lock and unlock commands. This fixes a segmentation fault.Dima Dorfman2001-03-141-0/+10
| | | | | PR: 25187 Approved by: nik
* 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 `_PATH_DEVZERO'.David E. O'Brien2000-12-091-1/+1
| | | | Use _PATH_* where where possible.
* Localize ctype too.Andrey A. Chernov2000-06-241-1/+1
| | | | Add weekday to showuser expired fields
* Localize time/date.Andrey A. Chernov2000-06-221-0/+3
| | | | | Use ISO 8601 date in logs. Fix wrong argument type in ctype functions.
* Be a little more strict about handling command line args. This allows user andDavid Nugent2000-06-181-4/+6
| | | | | | group names like 'help' 'mod' 'user' 'group' etc. to work correctly without requiring the -n style invocation. PR: misc/17069
* Portability fixes for other bsd4.4 derivatives.David Nugent2000-01-151-1/+4
|
* Add new functionality "lock" and "unlock" to provide a simple passwordDavid Nugent1999-10-261-4/+10
| | | | | | locking mechanism for users. This works by prepending the string "*LOCKED*" to the password field in master.passwd to prevent successful decoding.
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
|
* Add the ability to print user records in unix version 7 (old) format.David Nugent1999-03-021-3/+4
|
* 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-231-16/+96
| | | | | | updating 2) Add -V <etcdir>, which allows maintaining user/group database in alternate locations other than /etc.
* Remove bogus file locking in main().David Nugent1999-01-081-13/+1
|
* - 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-161-2/+23
| | | | | | | | | | | | | | | | | 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>
* Use err(3) instead of local redefinition. Add rcsid string.Philippe Charnier1997-10-101-52/+26
|
* getuid() -> geteuid().David Nugent1997-07-171-2/+2
|
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
|
* Fix useage of MAXLOGNAME to include terminating NUL, by usingDavid Nugent1997-02-071-1/+1
| | | | | 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-10/+46
| | | | | | NIS maps. Suggested by: Peter Wemm
* 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-36/+54
| | | | | | | | 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/+321
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>