Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 540
  • Last Modified:

Unix Owner Number to User ID

I can see the 5 digit owner number on a file, as well as Group number. I would like to find out who this owner and group are.

id can be used to go from a user id to a gid.

How do I go from a gid to a user id?
0
gswitz
Asked:
gswitz
  • 2
  • 2
1 Solution
 
woolmilkporcCommented:
If you see just numbers with ls -l the user and group are not in your /etc/passwd resp. /etc/group files, and thus your local machine doesn't know anything about them.

I assume the filesystem in question is NFS mounted, and the remote user who created the file is the one you're looking for.

So examine the remote system(s) for matching ids, e.g. with

grep 1234 /etc/passwd # 1234 = user id
or
grep 4567 /etc/group # 4567 = group id
0
 
gswitzAuthor Commented:
Thanks!

I just used this successfully on the uid I found 2 names for my UID, one of which was me and one was another user.

I take this is normal?

Thanks!

Geoff
0
 
gswitzAuthor Commented:
I just used this successfully on the uid I found 2 names for my UID, one of which was me and one was another user.

I take this is normal?
0
 
woolmilkporcCommented:
No, this is not normal. User IDs should better be unique, as you can see by this issue.
0

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now