LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 07-10-2014, 03:26 AM   #1
byran cheung
Member
 
Registered: Sep 2013
Posts: 321

Rep: Reputation: Disabled
user status


In my system , we didn't have housekeeping task , there are many obsoleted user ID in it , I would like to list it out .

I would like to list all the user list which the last login date over 180 days , what can I do ? thanks
 
Old 07-10-2014, 04:56 AM   #2
eklavya
Member
 
Registered: Mar 2013
Posts: 636

Rep: Reputation: 142Reputation: 142
We can solve it in reverse way.
List out users who have logged into the system in last 180 days :
Code:
lastlog -b 0 -t 180
Except these users, no user has been logged into the system in last 180 days.
=============================================================================
Users who did not loginto system in last 180 days
Code:
lastlog -b 180
But it lists the users who never logged in.... so do not print the users who never logged in...
Code:
lastlog -b 180 | grep -iv "never"

Last edited by eklavya; 07-10-2014 at 05:25 AM.
 
  


Reply



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
[SOLVED] If Statement for User Status SecureScript Linux - Newbie 8 11-30-2011 07:44 AM
[SOLVED] Check User Account Status in Solaris devUnix Solaris / OpenSolaris 1 03-28-2011 03:15 PM
Workarea Issue - - Notify user with status sahil.jammu Linux - Newbie 1 04-03-2009 08:24 AM
Postfix status=SOFTBOUNCE unknown user:* gabsik Linux - Server 0 01-30-2009 06:33 PM
User logging status shankarjha Linux - Newbie 2 04-17-2006 03:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:36 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