Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Looking at the files in /etc/:

/etc/master.passwd:lbutler:$6$s..../:1005:1005::0:0:L Butler:/home/lbutler:/bin/bash
/etc/passwd:lbutler:*:1005:1005:L Butler:/home/lbutler:/bin/bash


$ passwd lbutler
passwd: lbutler: no such user

Also, files in /home/lbutler/ show up as uid 1005 and gid lbutler

The other users in /etc/passwd do not appear to have a problem

share|improve this question

It seems that some corrupts haved occured with your /etc/master.passwd. You can restore it to normal state, try:

  • vipw to edit /etc/master.passwd.
  • Save it with no changes.

You can also use pwd_mkdb to update password database.

share|improve this answer
+1: The OP may be a Linux user, and is thinking that the OS actually pays attention to /etc/passwd as a primary source. On FreeBSD, the DB files generated from /etc/passwd and such are the actual primary source of truth. – Warren Young Apr 6 '14 at 17:46
OP please use vipw in the future then you don't have to manage the details. – Winny Apr 6 '14 at 20:55
Using vipw and save unchanged did not make a difference. I did look at the backups and the user password for the user listed before this one in the master.passwd file changed right about the time butler stopped being able to login. I can restore the master.passwd should I run pwd_mkdb /etc/master.passwd? @winny: I've never directly edited a passwd file – lbutlr Apr 6 '14 at 21:11
This should be the right invocation arguments: pwd_mkdb -p /etc/master.shadow – Winny Apr 6 '14 at 23:10
up vote 1 down vote accepted

I noticed that the user immediately before lbutler had a UID and GID of 10014 (instead of the expected 1014). That user changed her password and after that, UID 1015 could not login. Using vipw I reversed the two lines and saved the file. Both users can now login and ownerships appear correctly. Thanks for the pointers.

share|improve this answer

Try pwd_mkdb -p /etc/master.passwd. From man pwd_mkdb:

 -p    Create a Version 7 style password file and install it into
share|improve this answer

FreeBSD does use the database files for looking up the passwords and users and so on. So the /etc/passwd and also the master.passwd is there only for compatibility and informational reasons. One should never rely on that. I do not know if there is a way to ask that database files directly. Maybe they should provide some kind of SQL interface to it so that ppl can check out what users are on the system and so on. Then they could abolish /etc/passwd and master.passwd completely.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.