- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: ps output shows UID number instead of name
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2010 10:31 AM
тАО06-11-2010 10:31 AM
Any idea what could cause this ??
=> id
uid=602(infdukperf) gid=601(infinys) groups=601(infinys)
=> ps -fuinfdukperf
UID PID PPID C STIME TTY TIME CMD
602 1356 1 0 Jun10 ? 00:00:00 /opt/infdukperf/infinys/RB/bin/DConfigAgent
602 1361 1356 0 Jun10 ? 00:00:02 procSitter -T -N VPA01Domain
602 3806 23299 0 14:00 pts/1 00:00:00 /bin/ksh /opt/infdukperf/APS/IRB/tools/Query.ksh
602 5371 5370 0 14:25 pts/2 00:00:00 -ksh
602 5966 5371 0 14:30 pts/2 00:00:00 ps -fuinfdukperf
602 23299 23298 0 10:34 pts/1 00:00:00 -ksh
602 25832 1 0 11:15 ? 00:00:00 TM -u geneva_admin -p geneva_admin -s dkprft11
# grep ":602:" /etc/passwd
infdukperf:x:602:601:Infinys Duke Performance Test ID:/home/infdukperf:/bin/ksh
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2010 11:10 AM
тАО06-11-2010 11:10 AM
Re: ps output shows UID number instead of name
For example, if the /etc/passwd line located just before user 602 has been corrupted somehow, it might cause problems in mapping the UID 602 back to username.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2010 11:14 AM
тАО06-11-2010 11:14 AM
Re: ps output shows UID number instead of name
# pwck
user adm: directory /var/adm does not exist
user news: directory /etc/news does not exist
user uucp: directory /var/spool/uucp does not exist
user gopher: directory /var/gopher does not exist
user ftp: directory /var/ftp does not exist
user pcap: directory /var/arpwatch does not exist
user avahi-autoipd: directory /var/lib/avahi-autoipd does not exist
user sabayon: directory /home/sabayon does not exist
user oprofile: directory /home/oprofile does not exist
pwck: no changes
#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2010 02:47 AM
тАО06-12-2010 02:47 AM
SolutionWait... the user name "infdukperf" is 10 characters long, longer than the 8 characters available for the field in the "ps -fu" listing.
The description of the EUSER field in the ps command manpage says:
---
euser EUSER effective user name.
This will be the textual user ID, if it can be obtained and the field width permits, or a decimal representation otherwise. The n option can be used to force the decimal representation. (alias uname, user).
---
If the same algorithm is used in the UID field of the standard "ps -f" format listing, this would explain the behaviour.
Try a custom list format with a wider "username" field:
ps -o user:10,pid,ppid,c,stime,tty,time,cmd -u infdukperf
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2010 03:38 AM
тАО06-12-2010 03:38 AM
Re: ps output shows UID number instead of name
The username specified in the PS command "infdukperf" is more than 8
characters i.e. 10 characters long.
As per the Unix/Posix standards, the username/groupname gets printed as
decimal integers when there is no space in the column to display the
username. Truncating a username and displaying would cause confusion
when there are multiple user with same characters in the first few letters of
the username.
To solve the problem specify the width of the username display in the
PS command using the -o option.
Check the following link for more details -
https://bugzilla.redhat.com/show_bug.cgi?id=166431
Try this and let us know if the problem is solved.
Regards,
Murali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2010 09:33 AM
тАО06-12-2010 09:33 AM