Operating System - HP-UX
1836311 Members
1929 Online
110099 Solutions
New Discussion

id doesn't show user name

 
Supporto Unix
Occasional Advisor

id doesn't show user name

hi,
on a 11.11 host, the output of id command doesn't show user name :
[hostname]/# id
uid=0() gid=3(sys) groups=0(root)
[h3mih108]/#
**************************************
[hostname]/# id -un

[hostname]/#
**************************************
[hostname]/# id bin
uid=2() gid=2(bin)
[hostname]/#

Has anyone a suggestion?

thanks in advance

Luigi
13 REPLIES 13
John Poff
Honored Contributor

Re: id doesn't show user name

Hi,

The 'id' command uses the 'logname' command, which calls the 'getlogname' function, which reads it from /etc/utmp. So maybe it is a permissions problem on /etc/utmp?

JP
Pete Randall
Outstanding Contributor

Re: id doesn't show user name

Luigi,

My 11.11 L-class shows:

root# uname -a
HP-UX manitoba B.11.11 U 9000/800 165901597 unlimited-user license
root# id
uid=0(root) gid=3(sys) groups=20(support),5(daemon),1(other),6(mail),22(sna),4(a
dm),2(bin),7(lp),10(tty),0(root)
root# id -un
root

What's your patch level?

Pete

Pete
Martin Johnson
Honored Contributor

Re: id doesn't show user name

Have you checked the permissions for /etc/passwd and /etc/group?

You you have pseudo root accounts (UID=0)? Multiple accounts with the same UID are not supported. You can experience problems with who, finger, and id if you have multiple accounts with the same UID.


HTH
Marty
Darrell Allen
Honored Contributor

Re: id doesn't show user name

Has root's entry in /etc/passwd been removed? That's one possibility.

Don't logout as root before you verify there's a superuser account in /etc/passwd.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Darrell Allen
Honored Contributor

Re: id doesn't show user name

Re-read your post. If my theory is correct then the entry for bin has been removed also.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Supporto Unix
Occasional Advisor

Re: id doesn't show user name

[h3mih108]/# ll /etc/passwd
-r--r--r-- 1 0 sys 1841 Nov 15 11:51 /etc/passwd
[h3mih108]/# ll /etc/group
-r--r--r-- 1 2 bin 290 Nov 13 17:44 /etc/group
[h3mih108]/# ll /etc/utmp
-rw-r--r-- 1 0 root 3840 Nov 15 17:36 /etc/utmp
[h3mih108]/# whoami
Intruder alert.
[h3mih108]/# uname -a
HP-UX h3mih108 B.11.11 U 9000/800 182454681 unlimited-user license
[h3mih108]/#

i have /var full too...

that's all.
suggestions???

thanks

Jean-Louis Phelix
Honored Contributor

Re: id doesn't show user name

hi,

This message means that your /etc/passwd file is corrupted. Try a pwck.

Regards
It works for me (© Bill McNAMARA ...)
Supporto Unix
Occasional Advisor

Re: id doesn't show user name

Someone suggests me to do the following things:

[h3mih108]/var/spool/pwgr# ll
total 6
srwxrw-rw- 1 0 root 0 Jun 27 10:04 daemon
-rw------- 1 0 root 0 Nov 13 17:44 grp_gid_hash.dir
-rw------- 1 0 root 1024 Nov 13 17:44 grp_gid_hash.pag
-rw------- 1 0 root 0 Nov 13 17:44 grp_name_hash.dir
-rw------- 1 0 root 1024 Nov 13 17:44 grp_name_hash.pag
-rw------- 1 0 root 0 Nov 15 11:51 pwd_name_hash.dir
-rw------- 1 0 root 0 Nov 15 11:51 pwd_name_hash.pag
-rw------- 1 0 root 0 Nov 15 11:51 pwd_uid_hash.dir
-rw------- 1 0 root 0 Nov 15 11:51 pwd_uid_hash.pag
-rw-r--r-- 1 0 root 532 Nov 15 17:40 status
[h3mih108]/var/spool/pwgr# ps -ef|grep pwgrd
0 1092 1 2 Jun 27 ? 8:45 /usr/sbin/pwgrd
0 1159 5480 2 17:41:13 ttyp2 0:00 grep pwgrd
[h3mih108]/var/spool/pwgr# kill 1092
[h3mih108]/var/spool/pwgr# ps -ef|grep pwgrd
root 9398 5480 0 17:41:31 ttyp2 0:00 grep pwgrd
[h3mih108]/var/spool/pwgr# /usr/sbin/pwgrd
0 2534 5480 1 17:44:32 ttyp2 0:00 grep pwgrd
0 12950 1 39 17:41:39 ? 0:00 /usr/sbin/pwgrd
[h3mih108]/var/spool/pwgr#
[h3mih108]/var/spool/pwgr# whoami
Intruder alert.
[h3mih108]/var/spool/pwgr#

and nothing is changed.
i've tried to rm 3 file of 1.5GB under /var , it succeded, but bdf shown me /var 100% and du -k of /var show me more free space...
Darrell Allen
Honored Contributor

Re: id doesn't show user name

Your ll output shows the uid is not being resolved. Same symptom as the id output.

Have you verified root's passwd entry?

All indications are that something's wrong with /etc/passwd.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Martin Johnson
Honored Contributor

Re: id doesn't show user name

The problem is that /var is full. Never let /var become full. It causes all sorts of nasty problems.

You need to make space in /var (either delete files or add space). You will have to do a reboot to clear up your problems.

HTH
Marty
Martin Johnson
Honored Contributor

Re: id doesn't show user name

Re: id doesn't show user name

I had the same problem not so long ago.
Please do pwck . I have discovered a blank line at the and /etc/passwd and a couple of other things. Fix your /etc/passwd first.
Hope that helps.

Dimitry.
Omololu Shobayo
Frequent Advisor

Re: id doesn't show user name

Is your problem related to the problem stated below? if yes follow the steps below.



Problem Description

I receive the following output
when I use the id command on a slave
YP server:

uid=112()

The user name is not appearing between
the parenthesis as expected.

The command does return the proper output,
however, when run on the master YP server.

What can I do to resolve this?

Configuration Info

Operating System - HP-UX
Version - 10.20
Hardware System - HP 9000
Series - K420

Solution

We recommend that you re-initialize the
slave server with ypinit -s to
correct this problem.