- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to create a list of users that didn't logo...
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
Forums
Discussions
Discussions
Discussions
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
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
09-04-2010 04:50 AM
09-04-2010 04:50 AM
how to create a list of users that didn't logon for the past 6 months?
Thanks & Regards,
Kelvin
Solved! Go to Solution.
- Tags:
- last
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2010 05:56 AM
09-04-2010 05:56 AM
Re: how to create a list of users that didn't logon for the past 6 months?
If so, I have a script at the office that will do this for trusted systems.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2010 10:04 AM
09-04-2010 10:04 AM
Re: how to create a list of users that didn't logon for the past 6 months?
what do you mean by trusted system? it is HP-UX 11.0i production server
Thanks & Regards,
Kelvin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2010 10:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2010 10:28 AM
09-04-2010 10:28 AM
Re: how to create a list of users that didn't logon for the past 6 months?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2010 10:37 AM
09-04-2010 10:37 AM
Re: how to create a list of users that didn't logon for the past 6 months?
Trusted is one method of where the passwords are stored. If you don't know about that, it probably isn't enabled?
(Being trusted would allow you to collect this info easier.)
You could use last(1) and then find IDs that don't appear in the first 6 months.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2010 12:03 AM
09-05-2010 12:03 AM
Re: how to create a list of users that didn't logon for the past 6 months?
ll -d /tcb resulting /tcb not found
our system is NOT TRUSTED System
Hi Dennis,
You could use last(1) and then find IDs that don't appear in the first 6 months.
Kelvin: how? what is the argument?
Thanks & Regards,
Kelvin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2010 03:25 AM
09-05-2010 03:25 AM
Re: how to create a list of users that didn't logon for the past 6 months?
There really isn't any useful argument to last(1), you must write a script to process the output up to 6 months.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2010 04:38 AM
09-05-2010 04:38 AM
Re: how to create a list of users that didn't logon for the past 6 months?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2010 04:41 AM
09-05-2010 04:41 AM
Re: how to create a list of users that didn't logon for the past 6 months?
As already noted, you will need to examine the '/var/adm/wtmp' file [which is the data repository for login activity ' ].
If this file hasn't been trimmed during the last 6-months, it will have the user population that you want. Actually, it will contain records for users that *have* logged in.
One simplistic way to find the users who haven't logged in is to use 'last name' where 'name' is the account name read from '/etc/passwd'. If no records are found for the account name, then that account did not login within the time frame represented by the 'wtmp' file.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2010 08:51 PM
09-05-2010 08:51 PM
Re: how to create a list of users that didn't logon for the past 6 months?
Have a look at following threads:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=240819
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=150881
Regards,
Bhadersh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2010 06:29 AM
09-06-2010 06:29 AM
Re: how to create a list of users that didn't logon for the past 6 months?
Regards,
Kelvin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2010 10:31 AM
09-06-2010 10:31 AM
Re: how to create a list of users that didn't logon for the past 6 months?
Yes but very slow and it will have to read the file for each user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2010 11:50 AM
09-06-2010 11:50 AM
Re: how to create a list of users that didn't logon for the past 6 months?
> Dennis: Yes but very slow and it will have to read the file for each user.
Yes, of course. That's why i used the word "simplistic". For performance, I'd probably use a Perl hash (associative array) to hold the account names seen by running 'last()' once. Then, walk '/etc/passwd' testing each account name for its presence in the hash. Existence in the hash means that the account has had activity, so skip reporting it. The absence of an account in the hash signifies a user without activity and that's a name to list.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2010 10:57 PM
09-06-2010 10:57 PM
Re: how to create a list of users that didn't logon for the past 6 months?
# last > /tmp/last.file ## This run inside cron
# cat /tmp/last.file |awk '{print $1,$3,$4,$5}'| grep -E 'User_We_Look_For|Jun 23'
just an idea derived from JRF 's idea..