LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 04-27-2007, 04:36 AM   #1
bazzagazza
LQ Newbie
 
Registered: Apr 2007
Posts: 3

Rep: Reputation: 0
ps -ef shows UID rather than username


Hi,

I wonder if you guys can help out someone new to Linux.

We run a Symantec Performance application on one of our boxes. The application is invoked by a user called symantec_i3 and that user owns most of the processes of the application. The application guys here at work who support the application have come to me (a new Linux guy !!) and asked this question that I don't know the answer to :

Why is that when you type :

# ps -ef | grep symantec_i3

no output is produced.

However, if you type :

# ps -ef | grep 13821

all of the application processes are show ?

As you might guess 13821 is the UID of the symantec_i3 user. But usually the UID of a ps listing shows the username rather than the actual UID of the user. Any ideas ?

Mant thanks
 
Old 04-27-2007, 05:58 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

I don't think 13821 (where did you get this number from?) is a UID, it's probably the process id.
You can check this yourself: Take a look in the /etc/passwd file and check the uid that belongs to the symantec_i3 user (third field in /etc/passwd). If this is actually 13821 then you are correct.

It would have been easier for us if you posted the output of ps -ef | grep 13821, that way we could say for sure if this is the UID or pid.

If this number is the uid:
- Is there a valid entry in the passwd file for this user?,
- Does the application have a valid owner/group (does it show a number or the name),

Not much to go on, but maybe it helps.
 
Old 04-27-2007, 10:29 AM   #3
bazzagazza
LQ Newbie
 
Registered: Apr 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Druuna (et al)

Fair enough. I should have posted more info. Sorry about that. Here goes !! :

The third field of /etc/passwd is 13821

[root@hunda root]#
[root@hunda root]#
[root@hunda root]# ps -ef | grep symantec_i3
root 27825 27576 0 16:25 pts/6 00:00:00 grep symantec_i3
[root@hunda root]#
[root@hunda root]# grep symantec /etc/passwd
symantec_i3:x:13821:13821::/home/symantec_i3:/bin/ksh
[root@hunda root]#
[root@hunda root]# ps -ef | grep 13821
13821 23269 1 0 Apr24 ? 00:00:00 ./infra/bin/psin_sentry
13821 23278 1 0 Apr24 ? 00:00:01 ./infra/bin/psin_listener IN 202
13821 23468 1 0 Apr24 ? 00:02:22 ./products/www/filter/etc/statia
13821 23499 1 0 Apr24 ? 00:00:10 ./bin/psww_filter_col
13821 23501 1 0 Apr24 ? 00:00:07 ./bin/psww_filter_poll -i WebOn1
13821 23692 1 0 Apr24 ? 00:02:21 ./products/www/filter/etc/statia
13821 23723 1 0 Apr24 ? 00:00:06 ./bin/psww_filter_poll -i WebAp1
13821 23764 1 0 Apr24 ? 00:00:00 /bin/ksh -c ../bin/psi_os
13821 10667 1 0 Apr25 ? 00:01:54 ./products/www/filter/etc/statia
13821 10698 1 0 Apr25 ? 00:00:08 ./bin/psww_filter_col
13821 10700 1 0 Apr25 ? 00:00:06 ./bin/psww_filter_poll -i WebOn1
13821 10900 1 0 Apr25 ? 00:01:55 ./products/www/filter/etc/statia
13821 10931 1 0 Apr25 ? 00:00:05 ./bin/psww_filter_poll -i WebAp1
root 27835 27576 0 16:26 pts/6 00:00:00 grep 13821
[root@hunda root]#
[root@hunda root]# ps -ef | grep 13821
13821 23269 1 0 Apr24 ? 00:00:00 ./infra/bin/psin_sentry
13821 23278 1 0 Apr24 ? 00:00:01 ./infra/bin/psin_listener IN 207
02
13821 23468 1 0 Apr24 ? 00:02:22 ./products/www/filter/etc/statis
tics/../../../../../java/1.4.2/JRE/bin/java -cp java/1.4.2/lib/psaiSharedUtil.ja
rroducts/www/filter/lib/psww_filterinitconf.jarroducts/www/filter/lib/psww_i
nstancestatistics.jar:java/1.4.2/lib/psinSharedDB.jar:java/1.4.2/lib/psinUtil.ja
13821 23499 1 0 Apr24 ? 00:00:10 ./bin/psww_filter_col
13821 23501 1 0 Apr24 ? 00:00:07 ./bin/psww_filter_poll -i WebOnH
u01
13821 23692 1 0 Apr24 ? 00:02:21 ./products/www/filter/etc/statis
tics/../../../../../java/1.4.2/JRE/bin/java -cp java/1.4.2/lib/psaiSharedUtil.ja
rroducts/www/filter/lib/psww_filterinitconf.jarroducts/www/filter/lib/psww_i
nstancestatistics.jar:java/1.4.2/lib/psinSharedDB.jar:java/1.4.2/lib/psinUtil.ja
13821 23723 1 0 Apr24 ? 00:00:06 ./bin/psww_filter_poll -i WebApi
Hu01
13821 23764 1 0 Apr24 ? 00:00:00 /bin/ksh -c ../bin/psi_os
13821 10667 1 0 Apr25 ? 00:01:54 ./products/www/filter/etc/statis
tics/../../../../../java/1.4.2/JRE/bin/java -cp java/1.4.2/lib/psaiSharedUtil.ja
rroducts/www/filter/lib/psww_filterinitconf.jarroducts/www/filter/lib/psww_i
nstancestatistics.jar:java/1.4.2/lib/psinSharedDB.jar:java/1.4.2/lib/psinUtil.ja
13821 10698 1 0 Apr25 ? 00:00:08 ./bin/psww_filter_col
13821 10700 1 0 Apr25 ? 00:00:06 ./bin/psww_filter_poll -i WebOnH
u01
13821 10900 1 0 Apr25 ? 00:01:55 ./products/www/filter/etc/statis
tics/../../../../../java/1.4.2/JRE/bin/java -cp java/1.4.2/lib/psaiSharedUtil.ja
rroducts/www/filter/lib/psww_filterinitconf.jarroducts/www/filter/lib/psww_i
nstancestatistics.jar:java/1.4.2/lib/psinSharedDB.jar:java/1.4.2/lib/psinUtil.ja
13821 10931 1 0 Apr25 ? 00:00:05 ./bin/psww_filter_poll -i WebApi
Hu01
root 27845 27576 0 16:26 pts/6 00:00:00 grep 13821
[root@hunda root]#
[root@hunda root]#
[root@hunda root]# cat /etc/group
root::0:root
bin::1:root,bin,daemon
daemon::2:root,bin,daemon
sys::3:root,bin,adm
adm::4:root,adm,daemon
tty::5:
disk::6:root
lp::7:daemon,lp
mem::8:
kmem::9:
wheel::10:root
mail::12:mail
news::13:news
uucp::14:uucp
man::15:
games::20:
gopher::30:
dip::40:
ftp::50:
lock::54:
nobody::99:
users::100:
rpm:x:37:
floppy:x:19:
vcsa:x:69:
utmp:x:22:
slocate:x:21:
nscd:x:28:
sshd:x:74:
rpc:x:32:
rpcuser:x:29:
nfsnobody:x:65534:
mailnull:x:47:
smmsp:x:51:
pcap:x:77:
xfs:x:43:
ntp:x:38:
gdm:x:42:
desktop:x:80:
apache:x:48:
webalizer:x:67:
squid:x:23:
named:x:25:
csi:!:500:
dba:x:204:
i3apm:x:508:
admin:x:509:
sc373:x:13812:
ss232:x:13813:
sp236:x:13814:
sl161:x:13815:
sg189:x:13816:
ms390:x:13817:
nmk01:x:13818:
tg060:x:13819:
symantec_i3:x:13821:
[root@hunda root]#
[root@hunda root]#
 
Old 04-27-2007, 11:45 AM   #4
zulfilee
Member
 
Registered: Apr 2004
Location: India
Distribution: Redhat,Fedora
Posts: 430

Rep: Reputation: 39
to see if the username is properly resolved to uid check this
$ id symantec_id

This should show the proper uid for the user.if not then some issue`s there.

Also try

$ ps -ux
and see if the username is displayed.
 
Old 04-27-2007, 11:51 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Two more things I can ask:

1) How was this user created? If you use shadow: take a look at pwck and pwconv (man pwck and man 8 pwconv).
2) Are the use and group for the startup file (and symantic application files) displayed correctly when you do a ls on them?
 
Old 05-10-2007, 04:16 AM   #6
bazzagazza
LQ Newbie
 
Registered: Apr 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Hi Zulfilee and Druuna,

Thanks for your replies.
# id symantec_id shows correctly
# ps -ux shows 13821 as the user

We do use the shadow file but pwck shows it to be OK
pwconv does not seem appropriate in this case.
The user and group for the startup file display correctly when using ls
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Obtaining uid from username JPrieSL Programming 4 04-20-2007 08:31 AM
OpenLdap PAM UID vs Username Authentication zerovice Linux - Enterprise 0 12-05-2005 09:38 PM
FREEBSD5.3 platform: PHP setcookie() successful, but $uid = $_COOKIE['uid']; fail tclwp Programming 1 03-30-2005 08:05 PM
BitchX identd shows number instead of my username?? How come? sys7em Slackware 13 01-09-2005 01:57 PM
Getting uid and/or username of logged in user rjstephens Programming 5 09-23-2004 05:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration