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.
Your /etc/passwd is broken? Can you post the contents – warl0ckJan 31 at 2:06
What's your id command in current shell when you get whoami?. – Mohsen PahlevanzadehJan 31 at 3:16
5
(1) Which linux distribution? (2) What is output of pwck and grpck? (3) Does file /etc/shadow exist? – John SiuJan 31 at 4:34
If you have ltrace installed, try ltrace whoami. You should see a call to getpwuid() there. – ott--Jan 31 at 17:09
4
Also, have you set up (or attempted to) directory services of some sort (LDAP, NIS, etc.)? Have you touched /etc/nsswitch.conf? – derobertJan 31 at 17:09
id commandincurrent shellwhen you get whoami?. – Mohsen Pahlevanzadeh Jan 31 at 3:16pwckandgrpck? (3) Does file/etc/shadowexist? – John Siu Jan 31 at 4:34ltraceinstalled, tryltrace whoami. You should see a call togetpwuid()there. – ott-- Jan 31 at 17:09/etc/nsswitch.conf? – derobert Jan 31 at 17:09