History log of /freebsd-9.3-release/usr.sbin/pw/pw.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 176474 22-Feb-2008 scf

Add the groupmod '-d' option to pw to allow the deletion of existing users
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


# 176473 22-Feb-2008 scf

style(9) (verified no object changes)

Approved by: wes (mentor)
MFC after: 5 days


# 168044 30-Mar-2007 le

Add home directory creation mode to pw.conf(5) and be a bit
more specific about the effect of the current umask on -M.


# 168043 30-Mar-2007 le

Add -M argument to usage() output.


# 167919 26-Mar-2007 le

Introduce the new option -M to allow to set the permissions of
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


# 162400 18-Sep-2006 maxim

o Fix groupadd getopt line and make 'pw groupadd -o' work.

PR: bin/100684
Submitted by: Devon H. O'Dell
MFC after: 3 weeks


# 124382 11-Jan-2004 iedowse

Add a `-H <fd>' option that is like `-h <fd>', but accepts an already
encrypted password on the specified file descriptor.

PR: bin/22033
MFC after: 2 weeks


# 79452 09-Jul-2001 brian

Fix the type of the NULL arg to execl()

Idea from: Theo de Raadt <deraadt@openbsd.org>


# 79292 05-Jul-2001 kris

Fix a harmless format string bogon and mark a function as __printflike().
There is still one instance of non-constant format string use inside that
function, but it's hard to fix.

MFC after: 1 week


# 74226 14-Mar-2001 dd

Document the lock and unlock commands. This fixes a segmentation fault.

PR: 25187
Approved by: nik


# 70486 29-Dec-2000 ben

Convert to use the <sys/queue.h> macros rather than fiddling with the queue
structure internals.

Reviewed by: markm


# 69793 09-Dec-2000 obrien

Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.


# 62034 24-Jun-2000 ache

Localize ctype too.
Add weekday to showuser expired fields


# 61957 22-Jun-2000 ache

Localize time/date.
Use ISO 8601 date in logs.
Fix wrong argument type in ctype functions.


# 61760 18-Jun-2000 davidn

Be a little more strict about handling command line args. This allows user and
group names like 'help' 'mod' 'user' 'group' etc. to work correctly without
requiring the -n style invocation.
PR: misc/17069


# 56000 14-Jan-2000 davidn

Portability fixes for other bsd4.4 derivatives.


# 52512 26-Oct-1999 davidn

Add new functionality "lock" and "unlock" to provide a simple password
locking mechanism for users. This works by prepending the string
"*LOCKED*" to the password field in master.passwd to prevent successful
decoding.


# 50479 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 44386 01-Mar-1999 davidn

Add the ability to print user records in unix version 7 (old) format.


# 44232 23-Feb-1999 davidn

Fix minor nit with command line parsing for pw -V DIR action.


# 44231 23-Feb-1999 davidn

Fix tpyo (sic) and missing 'else' (bad cut n' paste).


# 44229 23-Feb-1999 davidn

1) Do not blindly ignore file update errors which may occur due to concurrent
updating
2) Add -V <etcdir>, which allows maintaining user/group database in alternate
locations other than /etc.


# 42394 08-Jan-1999 davidn

Remove bogus file locking in main().


# 38112 04-Aug-1998 nate

- On second thought, attempt to get the read-only lock, but don't
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.)


# 38110 04-Aug-1998 nate

- Removed read-only lock from 'pw'. This removes portions of the FIX
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)


# 37711 16-Jul-1998 nate

Fix race condition in pw caused by multiple instances of pwd_mkdb being
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>


# 30259 10-Oct-1997 charnier

Use err(3) instead of local redefinition. Add rcsid string.


# 27474 17-Jul-1997 davidn

getuid() -> geteuid().


# 22997 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


# 22394 07-Feb-1997 davidn

Fix useage of MAXLOGNAME to include terminating NUL, by using
max(MAXLOGNAME-1,UT_NAMESIZE).
Tidy up "pretty" printing format for longer usernames.


# 21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

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.


# 21330 05-Jan-1997 davidn

Adds optional NIS passwd file updating and optionally rebuilding
NIS maps.

Suggested by: Peter Wemm


# 20303 10-Dec-1996 joerg

This commit was generated by cvs2svn to compensate for changes in r20302,
which included commits to RCS files with non-trunk default branches.


# 20302 10-Dec-1996 joerg

Copyright update by the author, to be more in line with our sample
copyright.

Submitted by: David Nugent


# 20267 09-Dec-1996 joerg

Upgrade from the author, reflecting all my wishes resulting out of the
sysinstall use of this tool (plus some bug fixes).

2.2 candidate...

Submitted by: David Nugent <davidn@nserver.usn.blaze.net.au>


# 20253 09-Dec-1996 joerg

pw(8) -- a backend utility to manage the user and group databases.

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>