Bug 75002
Summary: | ps -ef shows uid not username | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | ethane <ethan+redhat> |
Component: | procps | Assignee: | Alexander Larsson <alexl> |
Status: | CLOSED NOTABUG | QA Contact: | Brian Brock <bbrock> |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | 7.3 | CC: | kevin_myer |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2002-10-03 15:27:22 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
ethane
2002-10-03 15:27:16 UTC
This is a feature, not a bug. If you're parsing ps output you can't rely on a username if it can be truncated, so it's printed as a uid instead. So let me see if I have this logic right: if uid<=8, display username, else display numeric uid. If I'm parsing ps output, I'd say returning a numeric uid is just as bad as returning a truncated username (in other words, the whole USER field can't be relied on in ps output, unless usernames are less than 8 characters). Since you're not enforcing an 8 character username anywhere that I can find, it would seem that the proper response would be to modify ps to support >8 character usernames. If I'm not mistaken, useradd supports usernames up to 256 characters. What am I missing here?? At the very least, I'd like to see a command line option to force display of >8 character usernames. Ideally, I'd like to see the USER column expanded to at least 16 characters (actually making it dynamically grow to the length of the longest username would be great but I know terminals are only 80 characters wide too...) Times have changed - its unreasonble to believe that usernames are < 8 characters so lets update our utilities output and embrace that fact :) If the problem is that scripts will break, then quoting from the procps NEWS: "Scripts that make assumptions about character position are and were broken because fields may overflow. Scripts should parse by whitespace and use -o to get the best results." My sentiments exactly.. Kevin (who just wants to easily see who has a connection to our netatalk server by running ps, instead of having to run ps, then do an ldapsearch for that numeric uid...) PS: Anyone perusing these reports who wants to see more of the username, simply patch procps-2.0.X/ps/output.c: find the line that reads {"user", "USER", pr_euser, sr_euser, 8, 0, U98, USER}, /* BSD n forces this to UID */ and change the 8 to whatever length you want the username to appear as. You might have to use the "w" switch with ps to get wide screen output as the command field might get truncated but this is far better for me than the current behaviour - hrm feature request for 8.1?? If you really want this you have to ask for an opinion upstream. Mail to procps-list. (More info at http://www.surriel.com/procps/). I can't make these kind of changes in the stuff i package. It would make it incompatible with upstream. |