Commit Graph

97 Commits

Author SHA1 Message Date
ru
20a25d49d2 mdoc(7) police: simplify bogus ``.Ql Fl'' constructs. 2001-03-16 14:11:41 +00:00
dd
acf093cb10 Document the lock and unlock commands. This fixes a segmentation fault.
PR:		25187
Approved by:	nik
2001-03-14 03:24:30 +00:00
dd
2da390d77c Document the lock and unlock commands.
PR:		25187
Approved by:	nik
2001-03-14 03:22:28 +00:00
kris
279e311e78 Switch from using rand() or random() to a stronger, more appropriate PRNG
(random() or arc4random())

Reviewed by:	bde
2001-03-05 02:15:38 +00:00
ru
606eb8b7a4 mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:44:04 +00:00
ru
b1e891e706 Prepare for mdoc(7)NG. 2001-01-16 09:39:23 +00:00
peter
b0fe93c364 Fix typo: s/memberhip/membership/
Submitted by:  Peter Avalos <pavalos@theshell.com>
2001-01-02 04:01:59 +00:00
ben
5a90713c4b Convert to use the <sys/queue.h> macros rather than fiddling with the queue
structure internals.

Reviewed by:	markm
2000-12-29 18:04:54 +00:00
dougb
8e77d321e4 Make the comment generated in /etc/pw.conf match reality
PR:				misc/23451
Submitted by:	Ben Rosengart, ben@narcissus.net
2000-12-18 01:35:56 +00:00
obrien
46d04a9db4 Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
2000-12-09 09:35:55 +00:00
ru
c3189e713e mdoc(7) police: use the new features of the Nm macro. 2000-11-20 20:10:44 +00:00
green
83520f8d05 Add working and easy crypt(3)-switching. Yes, we need a whole new API
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
2000-08-22 02:15:54 +00:00
davidn
1f768cbbec Move test for -w flag outside of the code dealing with -D (defaults).
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
2000-07-20 05:11:56 +00:00
davidn
cce226e47d Allow -g with an empty argument in the -D case. This allows -g "" to set
no default group (and thus fall back to user-based groups instead).
PR:		bin/5717
2000-07-20 04:37:00 +00:00
davidn
e9e5da853a Fix another missed case where usermod would not set the "modified" flag:
-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
2000-07-20 00:09:29 +00:00
davidn
7dabcf9e7b Catch up to the fact that we now have tcsh in the tree. 2000-07-16 01:46:26 +00:00
davidn
384de53cd1 Support propogation of file flags when building a homedir from the
skeleton directory.
sprintf() -> snprintf() cleanup.
PR:		bin/8756
Submitted by:	"Nickolay N. Dudorov" <nnd@itfs.nsk.su>
2000-07-13 23:52:49 +00:00
davidn
381c8d4d3d Fix breakage introduced by bypassing update for additional 'mod'
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
2000-07-03 12:13:10 +00:00
davidn
829538c234 Don't dereference NULL in the userdel case. 2000-06-26 01:11:44 +00:00
ache
ec30366657 Localize ctype too.
Add weekday to showuser expired fields
2000-06-24 13:36:13 +00:00
ache
2046ad945b Localize time/date.
Use ISO 8601 date in logs.
Fix wrong argument type in ctype functions.
2000-06-22 16:48:41 +00:00
davidn
9e5a20b332 Fix obvious braino in assignment statement. usermod -g should work again.
PR:		17877
Submitted by:	pius@zyan.com
2000-06-18 02:48:56 +00:00
davidn
f94831dd05 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
2000-06-18 02:39:17 +00:00
davidn
3b8f4fc741 Fix a long-standing bug in the rename case previously masked by another bug
just fixed in .db file updating.
2000-06-18 02:18:15 +00:00
davidn
4b82909d77 Second and hopefully final fix to .db sync when renaming a user; we must run
a full reindex in this case to remove the old record. #ifdef -u capability
since this is available on FreeBSD only.
PR: bin/16418
Problem pointed out by:	Masachika ISHIZUKA <ishizuka@ish.org>
2000-06-18 02:16:07 +00:00
davidn
3d0a7386e4 Fix db syncronization when username is changed with -l under usermod.
pw(8) was calling pwd_mkdb -u oldusername instead of newusername, so
the update appears to have failed until the next full pwd_mkdb
syncronization.

PR:		bin/16418
2000-06-06 07:33:00 +00:00
jake
5e208b0c18 Back out the previous change to the queue(3) interface.
It was not discussed and should probably not happen.

Requested by:		msmith and others
2000-05-26 02:09:24 +00:00
jake
1d685644e0 Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct.

Suggested by:	phk
Reviewed by:	phk
Approved by:	mdodd
2000-05-23 20:41:01 +00:00
sheldonh
c0e8952a50 Remove more single-space hard sentence breaks. 2000-03-02 14:54:02 +00:00
sheldonh
840cf958b8 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 14:09:25 +00:00
davidn
8ec6947593 Portability fixes for other bsd4.4 derivatives. 2000-01-15 00:20:22 +00:00
peter
96af418f42 Revert the libcrypt/libmd stuff back to how it was. This should not have
happened as it was working around problems elsewhere (ie: binutils/ld
not doing the right thing according to the ELF design).  libcrypt has
been adjusted to not need the runtime -lmd.  It's still not quite right
(ld is supposed to work damnit) but at least it doesn't impact all the
users of libcrypt in Marcel's cross-build model.
1999-12-18 13:55:17 +00:00
marcel
3239491159 Add libmd (or move it after libcrypt). We don't want the linker to be
smart because it will definitely get it wrong. This popped up during
cross-linking.
1999-12-16 10:55:45 +00:00
davidn
f7ccb2973e Don't try updating the passwd file if no data has changed. This allows things
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.
1999-10-26 15:07:20 +00:00
davidn
1eb57a5aee 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.
1999-10-26 08:34:09 +00:00
davidn
d846dabde7 Missed statement in password update relating to the previous change
to fileupdate() which prevented pwd_mkdb(1) from being run.
1999-10-26 08:30:20 +00:00
davidn
81f9461104 Clean up error handling in fileupdate(), which now returns 0 on success
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]
1999-10-26 04:27:14 +00:00
sheldonh
fd1054a4b0 Only do a full pwd_mkdb for deletions; other operations may use the -u
option as an optimization.

PR:	13346
Submitted by:	Neil Blakey-Milner <nbm@rucus.ru.ac.za>
1999-08-30 10:35:38 +00:00
peter
b6784c4210 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
davidn
fc1c90c001 Remove some more warnings. 1999-07-28 12:49:34 +00:00
davidn
606c2612fb Fix date parsing to allow '0' (none) date value. 1999-03-15 08:16:01 +00:00
davidn
c01a7e63d1 Add the ability to print user records in unix version 7 (old) format. 1999-03-02 00:53:33 +00:00
davidn
8e69beb04e Fix minor nit with command line parsing for pw -V DIR action. 1999-02-23 11:01:50 +00:00
davidn
91b9d16383 Fix tpyo (sic) and missing 'else' (bad cut n' paste). 1999-02-23 10:35:47 +00:00
davidn
dc804219b0 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.
1999-02-23 07:15:11 +00:00
des
30e1d1ca5e Don't assume a_name is a number just because the first character
is a digit.

PR:		bin/9484
Submitted by:	Matthew D. Fuller <fullermd@futuresouth.com>
1999-02-08 21:26:44 +00:00
davidn
7f23232c65 Remove bogus file locking in main(). 1999-01-08 10:52:38 +00:00
billf
2bd2de496a -Clarification of last commit-
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.
1999-01-04 14:07:53 +00:00
billf
d727ae5c4c Let's make sure we're at the end of the password string before we apply a \0
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>
1999-01-02 04:37:46 +00:00
joerg
5ccfff9699 Fix the spelling of `FreeBSD'.
Submitted by:	Peter Philipp <pjp@bsd-daemon.net>
1998-12-27 12:01:07 +00:00