- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Check to see how long it has been for a user t...
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-05-2000 04:57 AM
09-05-2000 04:57 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2000 05:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2000 05:00 AM
09-05-2000 05:00 AM
Re: Check to see how long it has been for a user to log in?
do 'man last'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2000 05:01 AM
09-05-2000 05:01 AM
Re: Check to see how long it has been for a user to log in?
The 'last' command. who if they are still logged in.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2000 05:01 AM
09-05-2000 05:01 AM
Re: Check to see how long it has been for a user to log in?
for history of succesfully logins use:
/usr/bin/last
for unsuccesfully logins use:
/usr/bin/lastb
NOTE: lastb only works if there is a file /var/adm/btmp
if you wish to use in future lastb just create the btmp file:
touch /var/adm/btmp
chmod 600 /var/adm/btmp
Regards
Andrew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2000 05:04 AM
09-05-2000 05:04 AM
Re: Check to see how long it has been for a user to log in?
# last -1
gives you a single entry of the most recent login for
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2000 05:08 AM
09-05-2000 05:08 AM
Re: Check to see how long it has been for a user to log in?
If you are wanting the info on a particular user, can use grep with the last command.
last | grep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2000 05:20 AM
09-05-2000 05:20 AM
Re: Check to see how long it has been for a user to log in?
At the end of the command, it says wtmp begins Fri Aug 18 08:22
What I was hoping to find is a list of all users and their last login....so if John Doe did not log in for 3 months, I would see user John Doe Fri MAY 18 and then I can research if John Doe still needs access to the system....etc.
Is there such a way?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2000 05:26 AM
09-05-2000 05:26 AM
Re: Check to see how long it has been for a user to log in?
for some reason the /var/adm/wtmp was deleted/truncated at 18 Aug.
To look for MAY you have to look at your backups of this file.
If you have HP-UX 11.00 you can restore the wtmp file to a different directory and use last -f
Look at your cronjobs for anything that possibly truncates the file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2000 05:35 AM
09-05-2000 05:35 AM
Re: Check to see how long it has been for a user to log in?
.profile (or /etc/profile).
The written date of the file would give you the last login time for that user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2000 05:46 AM
09-05-2000 05:46 AM
Re: Check to see how long it has been for a user to log in?
In addition to Andreas' suggestion to look at cron entries to see where/when truncation occured, check SAM's logs too.
You, or perhaps someone else, may have used SAM to trim the wtmp file. This will be recorded in SAM's logs. Browse for this possibilty by selecting Routine Tasks -> System Log Files -> Options -> View Sam Log.
...JRF...