Operating System - HP-UX
1833838 Members
2569 Online
110063 Solutions
New Discussion

file owner is number not name

 
Neil Truby
Occasional Contributor

file owner is number not name

Hi

Following 11i upgrade i merged the 11:00 passwd and group files with the new 11:11 files (there are no duplicates). Now i get UID as number and not a name?

any pointers please
9 REPLIES 9
Charles Harris
Super Advisor

Re: file owner is number not name

Hi,

This usually happens when you've got both duplicate uid / group id's or you have references to group id's in the passwd file that don't exist in the groups file and vise versa.

Hope this is of some use!


Cheers,

-ChaZ-
T G Manikandan
Honored Contributor

Re: file owner is number not name

check your /etc/passwd file.
1.check the permissions of the /etc/passwd file

Make sure that the permissions are r--r--r--

2.check the permissions of the /usr file system.
dr-xr-xr-x bin bin /usr
dr-xr-xr-x bin bin /usr/bin


I think there is no user associated with that UID number in the password file.

Map that UID for that appropriate user in the /etc/passwd file.




Thanks
Peter Kloetgen
Esteemed Contributor

Re: file owner is number not name

Hi Neil,

this normally happens if you delete a user, or change UID of a user. Also it is possible that you have a corrupted /etc/passwd file.

Run the following command:

pwck

Allways stay on the bright side of life!

Peter
I'm learning here as well as helping
Leif Halvarsson_2
Honored Contributor

Re: file owner is number not name

Hi
This means there is no user in the passwd file (or in NIS) with this number. If it is passwd and group file change owner to root:sys.
V. V. Ravi Kumar_1
Respected Contributor

Re: file owner is number not name

hi,

u are saying merged, is this true for all the files or some of the files.

regds
Never Say No
V. V. Ravi Kumar_1
Respected Contributor

Re: file owner is number not name

hi,

u are saying merged, is UID showing the number for all the files or some of the files.

regds
Never Say No
Daimian Woznick
Trusted Contributor

Re: file owner is number not name

Assuming this is not a permission problem on the passwd file itself, you could go back to the old passwd files that you merged to determine which user should own the file. Then just do a chmod on the files to that account name.

As a note, you should periodically check your file systems for files that do not have owners associated with them. You can do this with the following command:

find / -nouser -exec ls -ald {} \;

The items found could either be regular cleanup or a possible attacker was on the system and missed some cleanup.
Neil Truby
Occasional Contributor

Re: file owner is number not name

hi

thanks for your suggestions, problem was solved by removing a blank line form /etc/passwd file


cheers
Martin
Bill Hassell
Honored Contributor

Re: file owner is number not name

A good command to use after editing the passwd file: pwck (and grpck)

All files have numbers for users and groups. The ll command decodes these numbers by searching through the passwd file to associate the number with a user ID (same for group file). If no match, then the number is shown.


Bill Hassell, sysadmin