Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Looking at the files in /etc/:

/etc/group:lbutler:*:1005:
/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

But:

$ 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

2 Answers 2

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

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
4  
+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 at 17:46
    
OP please use vipw in the future then you don't have to manage the details. –  Winny Apr 6 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 at 21:11
    
This should be the right invocation arguments: pwd_mkdb -p /etc/master.shadow –  Winny Apr 6 at 23:10

Your Answer

 
discard

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.