]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
pw(8): fix combination of modes -N and -w random
authorEugene Grosbein <eugen@FreeBSD.org>
Mon, 28 Nov 2022 14:22:39 +0000 (21:22 +0700)
committerEugene Grosbein <eugen@FreeBSD.org>
Mon, 28 Nov 2022 14:22:39 +0000 (21:22 +0700)
commit1cbe5012cfe10226dd365af325a01de5d4c15f5d
tree062049c3739f76ac371383ce9e25eeaf392dca00
parent0078721898754f6e71063e1f566c8671288a2218
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
usr.sbin/pw/pw.8
usr.sbin/pw/pw_user.c