ps does not convert uid to user name

Bug #42084 reported by sam on 2006-04-29
12
Affects Status Importance Assigned to Milestone
procps (Ubuntu)
Medium
Unassigned

Bug Description

# grep haldaemon /etc/passwd
haldaemon:x:113:113:Hardware abstraction layer,,,:/var/run/hal:/bin/false

# ps -fu haldaemon
UID PID PPID C STIME TTY TIME CMD
113 4041 1 0 00:56 ? 00:00:02 /usr/sbin/hald
113 4047 4042 0 00:56 ? 00:00:00 /usr/lib/hal/hald-addon-acpi
113 4097 4042 0 00:56 ? 00:00:00 /usr/lib/hal/hald-addon-keyboard
113 4111 4042 0 00:56 ? 00:00:00 /usr/lib/hal/hald-addon-storage
113 4112 4042 0 00:56 ? 00:00:00 /usr/lib/hal/hald-addon-storage

as you can see the uid (113) is listed not the user name, however for other users the name is listed

# ps -fusam|head -2
UID PID PPID C STIME TTY TIME CMD
sam 6452 4452 0 01:13 ? 00:00:00 /usr/bin/gnome-session

sam (earlgreykde) wrote :

using dapper beta, DISTRIB_RELEASE=6.06
procps version 3.2.6-2ubuntu4

Dave Gilbert (ubuntu-treblig) wrote :

I've seen this on other distributions as well when the username is longer than 8 characters.
It is possible the right thing here is to say there really shouldn't be a default user with such a long username.
(Giving the uid may well be a preferable answer to giving a truncated username).

Alexandre Otto Strube (surak) wrote :

I tested the following here in Kurumin, a knoppix derivative:
# useradd testwithauserwithmore (more than eight chars)
# su - testwithauserwithmore
$ ps xua
testwit 5793 0.0 0.1 2484 864 ttyp0 R+ 16:18 0:00 ps xua

So, this is a ubuntu bug (or feature). Let's confirm it as ubuntu-related for now. I am more to take this as a feature (the kurumin show me a invalid user, anyway).

Changed in procps:
status: Unconfirmed → Confirmed
Marco Rodrigues (gothicx) wrote :

Fixed on Feisty...

Changed in procps:
status: Confirmed → Fix Released
status: Fix Released → Confirmed
Marco Rodrigues (gothicx) wrote :

Not fixed.. the hal username show the UID

Marco Rodrigues (gothicx) wrote :

Not fixed on Gutsy Tribe-5

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers