Image

Imagenowinter wrote in Imagelinux

I have no name! :))))))

I've got my /etc/passwd file corrupted occasionally.. ..it happens. )) Seeing I can't make no move from that point, I booted a knoppix, chrooted to my system, and, risking on my own reason, just copied /etc/passwd- to /etc/passwd. From then on:

1) I can boot on kdm welcome screen with my user name
2) I can ssh the box using my name

But

1a) I got errors like "cannot find name for user ID 1000", particularly from whoami, but I think some others also
2a) I got "no such user" when issuing $id my_username
3a) I got "I have no name!" at shell prompt instead of my username. This is the funniest part. :))

As root, I can add users to the system either by useradd/usermod/etc ot by a handy superadduser script, and log as those users as well, but they also suffer from the problem. Somehow I still don't know where the id/username values are stored, except for /etc/passwd file; and in that file they are present:
"..
nowinter:x:1000:1000::/home/nowinter:/bin/bash
.."
man id and man who contain no info about such a file.

What can it be? The system is a somewhat gentoo-ish sabayon, with mostly "binarily" installed packages though.

possibly relevant EDIT:
There are none of the a) problems for root!!

definitely relevant UPDATE:
resolved by fixing permissions on /etc/passwd from 600 to 644.
Thanks: community.
Special thanks: Imageamaena
Dumb: guess who :)