LinuxQuestions.org
Support LQ: Use code LQCO20 and save 20% on CrossOver Office
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 10-23-2009, 11:22 AM   #1
abhijeetdutta
Member
 
Registered: Aug 2009
Posts: 110

Rep: Reputation: 16
user login details


hi

how can i know in rhel that which user has login how many times in the server.

abhi
 
Old 10-23-2009, 11:38 AM   #2
mail4vijay
Member
 
Registered: Oct 2009
Location: Delhi
Distribution: CentOS , RHEL
Posts: 202

Rep: Reputation: 33
Quote:
Originally Posted by abhijeetdutta View Post
hi

how can i know in rhel that which user has login how many times in the server.

abhi
The fields output are the user's login name, the name of the terminal the user is on, the host from which the user is logged in, the time the user logged on, the time since the user last typed anything, and the name and arguments of the current process
Code:
$ w
radm    pS 66.90.90.102     Sun01PM  1day -bash
raj     pW 192.168.1.100.  7:42AM     5 ssh root@202.54.1.20
miku    pX a80-186-82-84.el  7:28AM    10 screen irssi
vivek   pY 196.15.193.111    4:11AM     0 nano -w hireme
rani    q0 dslbr0.bsnl.in    7:32AM    12 lynx http://slashdot.org/
jadmin  q2 dslbr5.bsnl.in    7:33AM     0 ssh jadmin@host.cyberciti.info
gad     q3 dslbr76.bsnl.in   7:40AM     0 -ksh
bencs   q5 dslbr22.bsnl.in   7:44AM     5 -zsh
vivek   q6 gw11-vsnl.in      7:47AM    11 -bash
You can use the ps command shows you processes that are running on the system:
Code:
$ ps -au | more
$ ps -au | less
 
Old 10-23-2009, 11:40 AM   #3
vikas027
Senior Member
 
Registered: May 2007
Distribution: RHEL, CentOS
Posts: 1,167

Rep: Reputation: 90
Thumbs up

Quote:
Originally Posted by abhijeetdutta View Post
hi

how can i know in rhel that which user has login how many times in the server.

abhi
last command shows the users which have logged in that month.

For .e.g. To see how many times root has logged in
Code:
-sh-3.00$ last | grep root | wc -l
36
 
Old 10-23-2009, 11:41 AM   #4
abhijeetdutta
Member
 
Registered: Aug 2009
Posts: 110

Original Poster
Rep: Reputation: 16
through w command you can only know which user is currently working..
i am not asking that i want to know which user has logged at which time and logout time..
 
Old 10-23-2009, 11:44 AM   #5
abhijeetdutta
Member
 
Registered: Aug 2009
Posts: 110

Original Poster
Rep: Reputation: 16
why you guys not understanding i am having 250 user and i want to know how many times they logged and logged out...
 
Old 10-23-2009, 11:56 AM   #6
vikas027
Senior Member
 
Registered: May 2007
Distribution: RHEL, CentOS
Posts: 1,167

Rep: Reputation: 90
Thumbs up

Quote:
Originally Posted by abhijeetdutta View Post
why you guys not understanding i am having 250 user and i want to know how many times they logged and logged out...
Excuse me, we people expect polite language to be used in forums. We are not paid to help you.


Quote:
Originally Posted by abhijeetdutta View Post
how can i know in rhel that which user has login how many times in the server.
I understand English well and I have answered your question with an example which was in your first post.

Now, you need to know the logged in and logged out time. Here it is. You can use this command, to find logged in and logged out time of user rajeev_k. Second Column is the logged in time and third column is logged out time.

Code:
-sh-3.00$ last | grep rajeev_k | awk '{print $1 " " $7 "  " $9}'
rajeev_k 14:19  15:56
rajeev_k 22:18  22:33
rajeev_k 18:27  20:47
rajeev_k 17:41  20:49
rajeev_k 17:06  20:48
rajeev_k 17:03  20:48
rajeev_k 16:57  20:49
rajeev_k 16:50  16:55
rajeev_k 14:31  14:36
rajeev_k 00:06  04:06
rajeev_k 21:43  23:49
Hope this helps.
 
Old 10-23-2009, 12:35 PM   #7
abhijeetdutta
Member
 
Registered: Aug 2009
Posts: 110

Original Poster
Rep: Reputation: 16
its my mistake...i apologize...and thanks for the help too...
 
Old 10-24-2009, 04:09 AM   #8
vikas027
Senior Member
 
Registered: May 2007
Distribution: RHEL, CentOS
Posts: 1,167

Rep: Reputation: 90
Thumbs up

Quote:
Originally Posted by abhijeetdutta View Post
its my mistake...i apologize...and thanks for the help too...
Nice spirit , I request you to mark the thread as Solved. Follow TIPS from signature if in case you find any problem.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Login details dellthinker Debian 2 04-28-2008 08:39 AM
Grub Options - Forgot login details IndianMaverick Red Hat 7 02-18-2008 07:34 AM
Where can i get details of last login to the machine amit_joshi Linux - Newbie 2 10-08-2007 09:14 AM
Configuring Previous Login Details ryanlum Linux - Server 1 08-06-2007 03:39 AM
login Details in Redhat ES 5 vimalvallikkat Linux - Desktop 1 05-09-2007 02:40 AM


All times are GMT -5. The time now is 10:06 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration