LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Linux - Embedded & Single-board computer (http://www.linuxquestions.org/questions/forumdisplay.php?f=78)
-   -   whoami: unknown uid 1000 (http://www.linuxquestions.org/questions/showthread.php?t=4175447881)

Lobinho 01-30-2013 01:34 PM

whoami: unknown uid 1000
 
Hi,

When I log in my telnet server (mini2440 board) I'm getting a 'no user' problem. (Kernel 2.6.32-2).

$ telnet 192.168.1.230
> login: eduardo
> Password: *****
Code:

[@FriendlyARM eduardo]# whoami
whoami: unknown uid 1000

The id command also shows that my user is not correctly configured...
Code:

[@FriendlyARM eduardo]# id
uid=1000 gid=1000(eduardo) groups=1000(eduardo)

my /etc/passwd file is:
Code:

root:$1$YHaEEVEZ$xfpczPKB2HMSfXlL2vRhR0:0:0:root:/:/bin/sh
bin:!*:1:1:bin:/bin:
daemon:!*:2:2:daemon:/sbin:
nobody:!*:99:99:Nobody:/:
sshd:*:30:30:sshd privsep:/var/empty:/sbin/nologin
eduardo:$1$3qCVXcy4$FiFQRDbPnXb4V3wgJ97Wp0:1000:1000:Linux User,,,:/home/eduardo:/bin/sh


This happens every time that I add a new user on the system.

The group is correctly shown on the last line of /etc/group file:
"eduardo:*:1000:"

User "root" is OK, but the "eduardo" user not.

Is there any other file on the linux system that stores the uid's of the users?

AlucardZero 01-30-2013 03:50 PM

What are the permissions on /etc/passwd ? They should be 644.

Lobinho 01-31-2013 04:25 AM

I can't believe I missed that.
I thought that the problem was the permission, then, I set the permission 777, but that didn't solve.

But with 644 it's fine. Thanks AlucardZero!


More info about /etc/passwd file could be find here: http://www.cyberciti.biz/faq/underst...d-file-format/


Is there any explanation about why telnet the system doesn't read the user id when the permission is wrong (777 for example)?


All times are GMT -5. The time now is 06:21 PM.