1833883 Members
2363 Online
110063 Solutions
New Discussion

Re: Login problem?!

 
Stanley_8
Advisor

Login problem?!

I use command 'who|grep user1'
to find the user1 login information.
it return a line as follows:

user1 pts/ta May 12 13:36

But I use command 'ps -ef|user1' to find the detail.
It return nothing?
why?
7 REPLIES 7
Pete Randall
Outstanding Contributor

Re: Login problem?!

I'm not sure what you're trying to accomplish but piping the output of "ps -ef" to user1 isn't going to do much. Maybe you mean to do something like "ps -ef |grep user1"?


Pete

Pete
Stanley_8
Advisor

Re: Login problem?!

oh.. sorry..
That's typing error.
It's 'ps -ef|grep user1'.
And the problem is going on...
Francisco J. Soler
Honored Contributor

Re: Login problem?!

Hi, you can try to find the detail like Pete says in his answer. Another possibility is to pass the terminal argument to the ps -ef and find what proccess are using the terminal (pts/ta in your example):

ps -ef | grep `who | grep user1 | awk '{print $2}'`

Frank.
Linux?. Yes, of course.
Stanley_8
Advisor

Re: Login problem?!

I describe my question again.
command test-------------------------
#who -u |grep user1

USER1 pts/t6 May 12 16:21 1:07 25229 10.X.X.X

#ps -ef|grep 25229
#
-------------------------
Is that much clear?
john korterman
Honored Contributor

Re: Login problem?!

Hi,
it is clear, and is due to the fact that the information is retrieved from two different areas: ps information from the process table, which is probably more correct than "who", which gets its information from utmp and wtmp. The information in wtmp and utmp may show strange things because the applications used by users may not log off properly.

regards,
John K.
it would be nice if you always got a second chance
T G Manikandan
Honored Contributor

Re: Login problem?!

Just checked the patch database and found that there is a patch which addresses this issue.

PHSS_27869 hpux11.0
PHSS_27877 10.20
PHSS_27872 11.11


Revert once the patch is applied and fixed.


Thanks
T G Manikandan
Honored Contributor

Re: Login problem?!

The above patches are for CDE.
Are you facing the problem with CDE.

This could be for also a corrupted /etc/utmp file.

Also do check these hp docs.

http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000041197062
http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000058669385