Commit Graph

66 Commits

Author SHA1 Message Date
Eugene Grosbein
1cbe5012cf pw(8): fix combination of modes -N and -w random
The command "pw usermod nobody -Nw random" (or useradd)
generates random password and prints it in encrypted form
but skips choosen random string that makes not much sense
and contradicts the manual page pw.8

Fix it by showing random password in plain text with -N and
without it equally. Add yet another example of how to generate
pw-style random password.

MFC after:	2 weeks
2022-11-28 21:22:39 +07:00
Mateusz Piotrowski
adf9cd56fa pw.8: Refernece to openssl-passwd(1) and crypt(3)
It may be unclear how to generate an encrypted password hash for -H,
so point users to openssl-passwd(1) and crypt(3).

MFC after:	2 weeks
2022-07-21 20:08:05 +02:00
Mateusz Piotrowski
84733f2e96 pw.8: Do not specify full path to shell in examples
Providing a full path to a shell is discouraged in the description of
the -s flag. Let's follow the best practices in the examples.

MFC after:	1 week
2022-04-03 14:52:08 +02:00
Mateusz Piotrowski
5243e560f6 pw.8: Fix synopsis of NIS flags
MFC after:	1 week
2022-04-03 13:54:10 +02:00
Mateusz Piotrowski
a0177bd56a pw.8: Sorty synopsis flag
MFC after:	1 week
2022-04-03 13:54:10 +02:00
Mateusz Piotrowski
feb04c7b7c pw.8: Improve argument names
Arguments passed to flags like -d and -k had ambiguous names like "dir".
Change that to more descriptive names like "homedir".

Also, clarify that -u min,max is for UIDs and -i min,max for GIDs.

MFC after:	1 week
2022-04-03 13:54:09 +02:00
Mateusz Piotrowski
39245a7d45 pw.8: Sort flags in synopsis
MFC after:	1 week
2022-04-02 00:49:53 +02:00
Mateusz Piotrowski
77fd0356ef pw.8: Use more appropriate mdoc macros
MFC after:	1 week
2022-04-02 00:49:53 +02:00
Mateusz Piotrowski
61e11ed9bd pw.8: Improve use of mdoc macros in description section
MFC after:	1 week
2022-04-02 00:49:52 +02:00
Mateusz Piotrowski
5392b4fbb7 pw.8: Use Cm and Ar correctly in synopsis
MFC after:	1 week
2022-04-02 00:49:52 +02:00
Benedict Reuschling
60c81cf107 Add an example to pw.8 about how to add an existing user to a group.
Instead of using pw to modify group membership, users often edit
/etc/group by hand, which is discouraged.  Provide an example of
adding a user to the wheel group, which is a common use case.
I'm using a different user here as in the previous example as that
deleted the user (although the examples don't necessarily have to
be followed in order).

Reviewed by:	rgrimes,0mp
Approved by:	0mp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D19123
2019-02-08 22:10:40 +00:00
Eugene Grosbein
d30f122fa6 pw(8): correct expiration period handling and command line overrides
to preconfigured values for -e, -p and -w flags.

Use non-negative symbols instead of magic values
in passwd_val/pw_password functions.

PR:		223431
Submitted by:	Yuri Pankov (in part, patch for the manual)
Reported by:	mav (mentor)
MFC after:	3 days
Relnotes:	yes
2017-12-09 23:34:00 +00:00
Warren Block
bb00e5490b Add another badly-needed simple example to the pw(8) man page. 2016-09-13 02:18:29 +00:00
Warren Block
9b8a603ef0 Add a single example of adding a user that roughly corresponds with the
adduser example in the Handbook.

MFC after:	1 week
2016-04-23 22:57:54 +00:00
Warren Block
579a636f2a Adjust misleading wording of the -G option and simplify a few
surrounding sentences.  From a discussion on -ports.

Reviewed by:	David Wolfskill <david@catwhisker.org>
2016-03-28 02:05:35 +00:00
Devin Teske
1e4d5cf1d6 Clarify pw(8) manual w/respect to required arguments. Break long lines at
punctuation while here.

Differential Revision:	https://reviews.freebsd.org/D2700
Reviewed by:	wblock, bapt
MFC after:	3 days
X-MFC-to:	stable/10
2015-08-03 21:19:31 +00:00
Baptiste Daroussin
4369c82dc6 Change the documentation to reflect where the -V option should be used
Suggested by:	kientzle
2015-06-14 21:50:38 +00:00
Baptiste Daroussin
3bfc59e83b backout remove of -q option for pw [user|group] next
While the return code is broken, some corner case usage depends on the
functionnality, so backout until we get better regression tests covering those
corner case usage.
2015-06-08 05:27:34 +00:00
Baptiste Daroussin
0958dffde2 Remove '-q' support for pw [user|group] next
the intent of -q in this command is to return as exit status the value of the
next group/user id, which does not make sense given exit status are limited to
values between 0 and 255.
2015-06-07 21:57:20 +00:00
Glen Barber
a5b912ff43 Document pw(8) '-R' option, added in r283961.
MFC after:	1 week
X-MFC-after:	r283961
Sponsored by:	The FreeBSD Foundation
2015-06-03 19:17:45 +00:00
Baptiste Daroussin
fb2db03194 Teach pw(8) about how to use pw/gr API to reduce code duplication
MFC after:	2 months
2012-10-30 08:00:53 +00:00
Eitan Adler
19e1bf2997 - document the -l option to usermod
PR:		docs/161588
Submitted by:	"Luchesar V. ILIEV" <luchesar.iliev@gmail.com>
Approved by:	gjb
MFC after:	1 week
2011-12-22 03:36:54 +00:00
Ulrich Spörlein
0d9deed52c mdoc: drop redundant .Pp and .LP calls
They have no effect when coming in pairs, or before .Bl/.Bd
2010-10-08 12:40:16 +00:00
Sean Farley
bc991a6d5f 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
2008-02-23 01:25:22 +00:00
Mike Makonnen
40ab104eaa Clarify in what formats the grouplist for the '-G' switch may be accepted.
Submitted by: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
2008-01-25 15:54:14 +00:00
Lukas Ertl
85204142eb Add home directory creation mode to pw.conf(5) and be a bit
more specific about the effect of the current umask on -M.
2007-03-30 11:23:10 +00:00
Lukas Ertl
eebbeceec9 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
2007-03-26 23:29:20 +00:00
Tom Rhodes
fd59f59ae3 Better mdoc(7). Bump doc date.
Kicked by:	ru
2006-10-09 19:01:02 +00:00
Tom Rhodes
31e224dd37 Note the naming convention of files in share/skel and explain the "dot"
prefix is removed.

PR:	103828
2006-10-09 17:57:40 +00:00
Ruslan Ermilov
59a3c79da6 Sort sections. 2005-01-18 20:02:45 +00:00
Ruslan Ermilov
a866e17077 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
Ruslan Ermilov
07bfccd71e Mechanically kill hard sentence breaks. 2004-07-02 23:13:00 +00:00
Ian Dowse
87d6b5caf6 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
2004-01-11 18:28:08 +00:00
Tom Rhodes
0603fbc3ae Add information about the log file.
PR:		35575
Submitted by:	"Simon L. Nielsen" <simon@nitro.dk> (original version)
2003-05-08 00:28:36 +00:00
Ruslan Ermilov
8d5d039f80 Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
Philippe Charnier
490d5836b5 The .Nm utility 2002-07-14 14:47:15 +00:00
Dima Dorfman
d5a3b1ed7d Lists follow a colon, not a semicolon. 2002-06-30 04:51:04 +00:00
SADA Kenji
f587582238 `pw useradd' could be used with -w without -D option.
PR:		docs/39770
Submitted by:	sada
Approved by:	dd
2002-06-26 05:09:12 +00:00
Dima Dorfman
466c257c1f In the words of the submitter:
This patch explains -F for usershow and groupshow.  Because "groupmod
 ... -F" doesn't do anything, the patch also drops that from groupmod's
 command line args.

PR:		35955
Submitted by:	Mike DeGraw-Bertsch <mbertsch@radioactivedata.org>
2002-04-05 08:39:31 +00:00
Dima Dorfman
4731d0764a Document the -7 option for usershow.
PR:		36735
Submitted by:	Mike DeGraw-Bertsch <mbertsch@radioactivedata.org>
2002-04-05 08:31:17 +00:00
Giorgos Keramidas
16b4ad5200 Merge a duplicate description of the -L option into the first one.
PR:		docs/34782
MFC after:	1 week
2002-03-08 00:36:36 +00:00
Dima Dorfman
f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
Dima Dorfman
70d51341bf mdoc(7) police: remove extraneous .Pp before and/or after .Sh. 2001-07-09 09:54:33 +00:00
Ruslan Ermilov
08657612d8 mdoc(7) police: simplify bogus ``.Ql Fl'' constructs. 2001-03-16 14:11:41 +00:00
Dima Dorfman
e468afb48d Document the lock and unlock commands.
PR:		25187
Approved by:	nik
2001-03-14 03:22:28 +00:00
Ruslan Ermilov
610a5778c5 mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:44:04 +00:00
Ruslan Ermilov
e97407b4f2 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 20:10:44 +00:00
Sheldon Hearn
4e86fcacf6 Remove more single-space hard sentence breaks. 2000-03-02 14:54:02 +00:00
Sheldon Hearn
f2e366a105 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
Peter Wemm
97d92980a9 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00