0

On Debian and Ubuntu (probably on other GNU systems too), when ps lists a process' user, it normally resolves its name, but when a process is running as a user which has a dash in its name, the user's numeric ID is shown instead. I think this is very annoying.

Is there a reason for this behavior or is this a bug and needs to be reported?

aef
  • 1,745
  • 4
  • 25
  • 43
  • I can't say I've ever noticed this, are you talking about the UID column ? – user9517 Apr 13 '12 at 11:38
  • @lain yes, for example in ps au or ps -ef – aef Apr 13 '12 at 11:53
  • I don't see this. For example: `www-data 20183 27367 0 Feb28 ? 00:02:45 nginx: worker process www-data 20184 27367 0 Feb28 ? 00:02:58 nginx: worker process www-data 20185 27367 0 Feb28 ? 00:02:50 nginx: worker process www-data 20186 27367 0 Feb28 ? 00:02:48 nginx: worker process` – cjc Apr 13 '12 at 11:54
  • Do you have some weird alias or format option set? – cjc Apr 13 '12 at 11:55

1 Answers1

4

"ps" displays the UID number if the user name is too long for the display, On Debian systems which include the "Debian-exim" user it is common to see this as the UID instead. This is probably what you're seeing. The presence of a '-' is a red herring here, and it happens everywhere that uses procps, not just Debian and Ubuntu:

http://procps.sourceforge.net/faq.html

"Why do long usernames get printed as numbers?"

grifferz
  • 948
  • 5
  • 13
  • This had actually nothing to do with the dashes but with the length of the user names. Thanks for the information. – aef Aug 07 '12 at 13:51