1752842 Members
3560 Online
108789 Solutions
New Discussion юеВ

Find the UID & GID

 
Anoop Sivan
Frequent Advisor

Find the UID & GID

Hi Team

Please help me to find the owner of the directory /mtt/dss/dsprofiles

root@zgifqassa:/etc > ls -ld /mtt/dss/dsprofiles
drwxr-xr-x 9 511 152 1024 Jul 26 07:37 /mtt/dss/dsprofiles
root@zgifqassa:/etc > grep 511 /etc/passwd
root@zgifqassa:/etc > grep 152 /etc/group
root@zgifqassa:/etc > ypcat passwd | grep -i 511
ypcat: the domainname hasn't been set on this machine.
root@zgifqassa:/etc >
5 REPLIES 5
Patrick Wallek
Honored Contributor

Re: Find the UID & GID

If the UID and GID are showing up like that then the user and group that used to have those have probably been deleted.

In that case, the only way to find them may be to go back to some old backups and see if they existed in the past. The problem is knowing how far back to go.

This is one reason that some places never delete users. They inactivate/lock them, give them an invalid password and/or set their shell to /bin/false, so that no one can ever log in as that user. Then when issues like this come up, you know who/what owned a file.
Anoop Sivan
Frequent Advisor

Re: Find the UID & GID

Let me check if any old passwd back-up is there.
Dennis Handly
Acclaimed Contributor

Re: Find the UID & GID

Are you using NIS? If the NIS server goes south, you won't have the proper names.

If you are using ypcat, that may be the problem. The fix may be:
# /sbin/init.d/nis.client stop
# /sbin/init.d/nis.client start
Vipin Kumar
Occasional Advisor

Re: Find the UID & GID

Hi Anoop,

What about the /mtt/ path.
Is it a shared storage FS mountpoint/ NFS mountpoint??
The source server user ID's may not be there in this machine.

This is possible while doing backup restoration also, where username and group name cannot be resolved from passwd / group file and will remain as the ID's.

Vipin.
nightwich
Valued Contributor

Re: Find the UID & GID

Hi Anoop


You need to give more details.

This could happen in a lot of situations

- Copy those files by another server maintaining the ID's
- NFS File System
- Remove those user's



Best Regards.