Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
05-28-2008, 07:34 PM
|
#1
|
Senior Member
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250
Rep: 
|
'ps aux' displays users as uids, instead of username
Dunno, but for some reason, after I updated Fedora 7, ps began showing uids instead of the username. I assume this means there is some disassociation between the username and uid in some file, but it is correct in /etc/passwd. It does show 'root' processes. So, where do I go next?
Last edited by SlowCoder; 05-28-2008 at 07:37 PM.
|
|
|
05-29-2008, 05:44 AM
|
#2
|
LQ 5k Club
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842
Rep: 
|
can you confirm that running
ps u
has no USER field please
|
|
|
05-29-2008, 05:45 AM
|
#3
|
Member
Registered: Feb 2008
Location: Rome, Italy
Distribution: OpenSuSE 11.x, vectorlinux, slax, Sabayon
Posts: 206
Rep:
|
What about the output of other commands like:
ps -o uid -o "%u %U" -A
or whoami or id ?
Maybe you aliased ps? Or have more than one version installed ("which -a ps" to verify)
|
|
|
05-29-2008, 05:52 AM
|
#4
|
LQ 5k Club
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842
Rep: 
|
if you have time you can check that your /bin/ps should have executable user function eg
Code:
su
strings /bin/ps | grep users
returns for me
strings /bin/ps | grep users
Please send bug reports to <feedback@lists.sf.net> or <albert@users.sf.net>
a all w/ tty, including other users -t by tty
r only running processes U processes for specified users
List of real users must follow --User.
List of effective users must follow --user.
List of users must follow -u.
List of users must follow U.
|
|
|
05-29-2008, 07:23 AM
|
#5
|
Senior Member
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250
Original Poster
Rep: 
|
Here is the output from the commands you all suggested:
Code:
$ ps u
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
500 23897 0.0 0.0 4820 1544 pts/1 Ss 08:09 0:00 -bash
500 23963 0.0 0.0 4512 940 pts/1 R+ 08:17 0:00 ps u
$ which -a ps
/bin/ps
$ whoami ; id
myusername
uid=500(myusername) gid=500(myusername) groups=500(myusername)
$ ps -o uid -o "%u %U" -A | tail
0 root root
0 root root
0 root root
500 500 myusername
500 500 myusername
0 root root
500 500 myusername
500 500 myusername
500 500 myusername
500 500 myusername
The last command does indicate that ps knows my username. So why does the standard 'ps aux' show my uid in the user field?
|
|
|
05-29-2008, 07:43 AM
|
#6
|
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
|
Did you check your aliases?
Is there any chance there is a PS_FORMAT environment variable messing you up?
Try running
Code:
alias | grep 'ps'
# &
set | grep '^PS'
|
|
|
05-29-2008, 08:22 AM
|
#7
|
Senior Member
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250
Original Poster
Rep: 
|
No, no aliases for ps.
Would it have anything to do with the length of the username?
|
|
|
05-29-2008, 08:37 AM
|
#8
|
LQ 5k Club
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842
Rep: 
|
when you upgraded, did you keep any old files from /etc?
2) did you change your login name....since you mention long username?
edit added (3)
do you have an entry for proc in /etc/fstab eg
none /proc proc defaults 0 0
Last edited by aus9; 05-29-2008 at 08:43 AM.
|
|
|
05-29-2008, 10:09 AM
|
#9
|
Senior Member
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250
Original Poster
Rep: 
|
1. I did not upgrade. I updated. Still Fedora 7. Didn't figure I'd need to back up etc files.
2. No login name change. But the user name is 10 characters long.
3. Yes. The proc entry is in fstab.
|
|
|
05-30-2008, 07:33 AM
|
#10
|
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
|
What about the PS_FORMAT environment variable I asked about?
|
|
|
05-30-2008, 07:59 AM
|
#11
|
LQ Newbie
Registered: May 2004
Location: sol 3 (3rd planet from sun)
Distribution: Redhat 9.0
Posts: 8
Rep:
|
Quote:
Originally Posted by SlowCoder
No, no aliases for ps.
Would it have anything to do with the length of the username?
|
Yes.
If a username is longer than 8 characters, then "ps aux" will substitute the uid for username.
Your username of "myusername" is clearly longer than 8-characters.
I ran into this a while back with the username of "Ajax4Hire", more than 8 and the only user to get truncated to a uid. Realized the problem and renamed myself to Ajax. boo-hoo.
|
|
|
05-30-2008, 08:28 AM
|
#12
|
Senior Member
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250
Original Poster
Rep: 
|
Quote:
Originally Posted by archtoad6
What about the PS_FORMAT environment variable I asked about?
|
Other than the PS1/2/3/4 variables, no environment variable exists that includes PS or FORMAT.
|
|
|
05-30-2008, 08:32 AM
|
#13
|
Senior Member
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250
Original Poster
Rep: 
|
Quote:
Originally Posted by Ajax4Hire
Yes.
If a username is longer than 8 characters, then "ps aux" will substitute the uid for username.
Your username of "myusername" is clearly longer than 8-characters.
I ran into this a while back with the username of "Ajax4Hire", more than 8 and the only user to get truncated to a uid. Realized the problem and renamed myself to Ajax. boo-hoo.
|
If this actually is the case, I'll have to assume that I simply didn't notice it until after I performed the update.
P.S. "myusername" is not the real name, but the real one is more than 8 characters.
|
|
|
05-31-2008, 04:35 AM
|
#14
|
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
|
Quote:
Originally Posted by Ajax4Hire
If a username is longer than 8 characters, then "ps aux" will substitute the uid for username.
|
HTH did you figure that out?
Is it documented? -- I couldn't find it in the man page, at least the one on my system.
|
|
|
05-31-2008, 10:40 AM
|
#15
|
LQ 5k Club
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842
Rep: 
|
well I have something in /usr/share/doc/procps....has a todo file in mdv 2008.1 version 3.2.7 and it mentions
under -----top----
don't truncate long usernames
in the news file same pathway I have
procps-3.2.2 --> procps-3.2.3
avoid truncating long usernames
-----------------------------------
of course that might explain a shortening of name and not change to uid....but its start.
|
|
|
All times are GMT -5. The time now is 01:59 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|