Linux - NewbieThis 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.
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.
I have a Fedora 8 system, updated with the latest packages. When I run then "ps -ef" command from a gnome-terminal, the user-name of user logged in is not displayed, but instead the associated user-id. For instance:
In this case, the user-name associated with user-id 500 is known. Similarly when I run gnome's "System Monitor" tool and examine the processes running on the system, the user-name associated with each process is displayed correctly.
When I run "ps -u MyUserId", all of the processes being run by this user are displayed.
Thus is it possible that 'ps' command has a bug? Or am I merely doing something wrong? I've been using the "ps -f" command for years and have only seen this problem when the user-name is not properly listed in /etc/passwd. From the evidence I am seeing, my system's /etc/passwd file appears to be fine.
Here's the relevant entry in /etc/passwd:
Code:
MyUserId:x:500:500:My Real Name:/home/MyUserId:/bin/bash
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986
Rep:
That's a clue. When I run whoami, it shows my username AND my userID. When I run id, I get my username, not my userID. Are you sure your user doesn't happened to be named '500'? LOL
Dumb question, but did you try rebooting? Try creating a new user, log in as the dummy user, and see if it has the same problem
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986
Rep:
Okay, at least we can say that there's something wrong with your account, not the system or ps. Other than that, I have no idea why your original account can't display your name. Is it that big of a deal, and is it affecting anything else?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.