26

In my FTP client I can see files' owner ID (99).

How do I find out which user is the owner of these files?

Peter Mortensen
  • 2,318
  • 5
  • 23
  • 24
Mohammad Ali Akbari
  • 1,763
  • 5
  • 20
  • 24

3 Answers3

36

Shorter getent version (as long as you don't need just the username)

$ getent passwd 99
nobody:x:99:99:Nobody:/:/sbin/nologin

Works on at least CentOS 5.6 - will take username or uid as key.

Paul Haldane
  • 4,517
  • 1
  • 21
  • 32
12
$ getent passwd | awk -F: '$3 == 99 { print $1 }'
nobody
Ignacio Vazquez-Abrams
  • 45,939
  • 6
  • 79
  • 84
7

The quickest way to check it (if you have a shell access) is to: cat /etc/passwd | grep 99

Btw UID 99 usually belongs to "nobody" user.

Piotr
  • 89
  • 2