Can not find name for user ID XXX in unix
I installed Sendmail mail daemon in my linux machine. It took some time to configure the mail server. I was able to send mails to users using (as root),
mail –s “hi” username
data
.
I also can check the mail of the users using
mail –u username
But when I login to machine as that user I can not see any mails, I also noticed that id commands doesn’t return the use name, but also shows the id of the user.
>id
uid=3880 gid=124(e2m) groups=124(e2m),200(cvsusers)
I also checked that while login to system using username other then root. I get error message like,
id: cannot find name for user ID 3880
After searching a lot in internet I found many solutions but they all were regarding ldap and all thing. I do not use any ldap in my machine. After a lot of search I found a very easy solution. Permission of my /etc/passwd file was set to -rw——- instead of -rw-r–r–.
I changed the permission and my problem is solved.
chmod 644 /etc/passwd
I thought this to share with other guys who might face this problem in future..












Leave your response!