Operating System - Linux
1821638 Members
3085 Online
109633 Solutions
New Discussion юеВ

Unrecognized name for user ID

 
SOLVED
Go to solution
Francis Ancheta
Frequent Advisor

Unrecognized name for user ID

For no apparent reason all my linux users cannot be recognized by linux. When I logon I have the following error. "id: cannot find name for user ID 500" where my id is 500. What could be wrong.
11 REPLIES 11
Francis Ancheta
Frequent Advisor

Re: Unrecognized name for user ID

by the way I am using RH9.
Mark Grant
Honored Contributor

Re: Unrecognized name for user ID

Check /etc/passwd. It sounds like you might have a little bug in there. Have a look at your particular entry, it should look like

yourid:password or *:500:group id:some descriptive text:/bin/bash

Never preceed any demonstration with anything more predictive than "watch this"
Huc_1
Honored Contributor

Re: Unrecognized name for user ID

Check /etc/passwd as adviced by Mark Grant and also check /etc/group the user your are looking for should be enter there with group 500.

Also check on/in the user directory to see who is the owner of file "most would normaly be owned by 'username 500'

Keep us informed.

J-P
Smile I will feel the difference
Francis Ancheta
Frequent Advisor

Re: Unrecognized name for user ID

Nothing seems to be wrong with my passwd, I checked this before hand. When I login as root I do not encounter this error but when I logon as a diff user other than root this error message occurs. I am puzzled.
Francis Ancheta
Frequent Advisor

Re: Unrecognized name for user ID

Another thing I observed is that when I create a new user it issues the same error. Where does linux keep its record of its users? What files?
Alexander Chuzhoy
Honored Contributor

Re: Unrecognized name for user ID

it keeps the record of it's users in:
/etc/passwd
/etc/groups
and in case you use shadow (this is the default) /etc/shadow
Huc_1
Honored Contributor

Re: Unrecognized name for user ID

Do you get error when you create a new user ?
how do you create this new user?

Also make sure the /etc/groups is not corrupted

J-P
Smile I will feel the difference
Francis Ancheta
Frequent Advisor

Re: Unrecognized name for user ID

I use the "adduser" to add a new user and also I use webmin. I do not encounter errors when I create a new user. I checked on /etc/group and /etc/passwd and so far I can open and edit it. What could be wrong?
Mark Grant
Honored Contributor

Re: Unrecognized name for user ID

Francis,

User names are not used in linux only user ID's. When an applciation needs to show you a user name (e.g. "ls -l") then it will take the user id and match it against a user name in either NIS or /etc/passwd depending on the values defined in /etc/nsswitch.conf

do you have NIS running. If you do, then it could be that your NIS maps are broken and you should get new maps from the NIS server or if this is a standalone machine stop using NIS.

Check /etc/nsswitch.conf to make sure the OS is check /etc/passwd first and then NIS .
Never preceed any demonstration with anything more predictive than "watch this"
Huc_1
Honored Contributor
Solution

Re: Unrecognized name for user ID

protection of /etc/group
and /etc/passwd look like this on my system

-rw-r--r-- root root /etc/group
-rw-r--r-- root root /etc/passwd

and protection on home look like this

drwxr-xr-x 5 root root 4096 Sep 25 14:44 home

the directory of username set up like this

drwx------ 83 'username' 500 8192 Oct 8 10:40 'username'

This is all I can think of for now

Keep use informed

J-P
Smile I will feel the difference
Francis Ancheta
Frequent Advisor

Re: Unrecognized name for user ID

You got it Huc, I checked on the file permission and it lacks the read flag for all users. Thanks a lot guys ... more power to you.