• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 556
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

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