- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Find the user not login
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2010 05:56 PM
тАО06-03-2010 05:56 PM
Find the user not login
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2010 06:06 PM
тАО06-03-2010 06:06 PM
Re: Find the user not login
Well there are a couple of ways the simples may be to check wtmp file
#last|awk '{print $1}'|sort|uniq
it would show u all the users logged in, check if you have login data for 180 days.
BR,
Kapil+
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2010 06:12 PM
тАО06-03-2010 06:12 PM
Re: Find the user not login
use "last" command to find out the same.
The last command searches backwards through the file /var/adm/wtmp (which contains a record of all logins and logouts) for information about a user, a tty, or any group of users and ttys.
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2010 06:58 PM
тАО06-03-2010 06:58 PM
Re: Find the user not login
I tried your method , but it only show the user list , can advise how to use the command ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2010 07:06 PM
тАО06-03-2010 07:06 PM
Re: Find the user not login
Rest of the user in etc passwd have not logged in for X days :)
to make it easy do
#cat /etc/passwd|awk '{print $1}'|sort
and #last .......
the difference is the user who have not logged for X days
X is the number of days your wtmp file is looging.
BR,
Kapil+
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2010 08:11 PM
тАО06-03-2010 08:11 PM
Re: Find the user not login
sorry to my fool , i still not understand how to use it , when i use the command you provide , do I need to add parameter ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2010 08:15 PM
тАО06-03-2010 08:15 PM
Re: Find the user not login
yes , I know the wtmp and last may check it , but I don't prefer to run the same command for 800 times , can advise what is the simplest way to check it ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2010 08:29 PM
тАО06-03-2010 08:29 PM
Re: Find the user not login
run
#cat /etc/passwd|awk '{print $1}'|sort
put all 800 users in XL file
run
# last|awk '{print $1}'|sort|uniq
Put whatever come in the XL sheet.
Compare.
The user which are in 2nd output have logged in recently to the server
the users which are not in 2nd out and there in first output are the user who have not logged in.
BR,
Kapil+
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2010 09:22 PM
тАО06-03-2010 09:22 PM
Re: Find the user not login
/usr/lbin/getprpw
check for or cut the last successfull field when last time user enter the system ,here even you can check the status of the user account .