1823920 Members
3198 Online
109667 Solutions
New Discussion юеВ

UID to name mapping

 
SOLVED
Go to solution
Anshumali
Esteemed Contributor

UID to name mapping

Hi folks,

I am suffering from a strange issue. Some how i see my 11.11 lost UID to names mapping for all users other than root. Whenever, i switch to any user and issue ls -ltr, it just shows the UID in owner and group.

VELSD2N0#ls -ltr /etc/passwd
-r--r--r-- 1 root sys 791 Jun 1 16:53 /etc/passwd

VELSD2N0#su - oracle
$ id
uid=108() gid=106()

System is not trusted.
It is all ok for root....

Any suggestions? :)

Thanks,
Anshu
Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!
7 REPLIES 7
TTr
Honored Contributor

Re: UID to name mapping

Your /etc/passwd is not readable by non-root.

The permissions should be -r--r--r-- or 400.
Dennis Handly
Acclaimed Contributor

Re: UID to name mapping

Are you using NIS? I have this happening every once in awhile.
What's in /etc/passwd, just enough to point to NIS?
Try this:
/sbin/init.d/nis.client stop
/sbin/init.d/nis.client start

See these threads:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1184911
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1222063
Jeeshan
Honored Contributor

Re: UID to name mapping

Hi Anshu

check your /etc/default files and from SAM check the UID is unique to all users.
a warrior never quits
TTr
Honored Contributor
Solution

Re: UID to name mapping

> VELSD2N0#ls -ltr /etc/passwd
> -r--r--r-- 1 root sys 791 Jun 1 16:53 /etc/passwd

Right in front of my eyes!!

Anyway, just in case check if /etc itself is cd-able by non-root and verify what the other people suggested.

Did you run any hardening or auditing scripts on this server and can you correlate to some event when this problem started?

Re: UID to name mapping

Do you have an /etc/nsswitch.conf file?

What are the contents?

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Anshumali
Esteemed Contributor

Re: UID to name mapping

Thanks all.
It was closed. The issue was with permission on /etc

Cheers!
Anshu
Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!
Anshumali
Esteemed Contributor

Re: UID to name mapping

/etc/ was set to 600, it was changed back to 555
Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!