| Summary: | pw(8) '-h -' option does not disable password [PATCH] | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Andy Farkas <andyf> |
| Component: | bin | Assignee: | davidn |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
Responsible Changed From-To: freebsd-bugs->davidn David's interested in these. :-) State Changed From-To: open->closed Fixed by: /home/ncvs/src/usr.sbin/pw/pw_user.c,v <-- pw_user.c new revision: 1.40; previous revision: 1.39 Thanks for the bug report! |
According to the man page for pw(8) you can disable a password (ie. set the pasword to '*') by giving the '-h -' option. This option is currently broken. See patch. Fix: Cut/pasted, sorry: /*--6Ror18y3zSisHIzO48g0Xz9Qvn5CtHXsYjRkMZvqOGVPZecI Content-Type: text/plain; name="file.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="file.diff" --- pw_user.c.orig Tue Jul 18 14:20:31 2000 +++ pw_user.c Tue Jul 18 14:04:27 2000 @@ -624,8 +624,8 @@ if (!*line) errx(EX_DATAERR, "empty password read on file descriptor %d", fd); pwd->pw_passwd = pw_pwcrypt(line); - edited = 1; } + edited = 1; } How-To-Repeat: Execute 'pw usermod -n <username> -h -' and notice that the user can still login. Confirm by checking in /etc/master.passwd that username still has a password and not a '*'.