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-20-2000 03:32 PM
09-20-2000 03:32 PM
Users
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2000 03:43 PM
09-20-2000 03:43 PM
Re: Users
#last | grep username | tail -1
where username is the username you want to find out about and of course the tail can be changed if you want to find out more than the last time!
cheers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2000 04:42 PM
09-20-2000 04:42 PM
Re: Users
Most directly:
# last -1
will return the last (most recent) one (1) logon, directly. See man last.
last -2 root would return the last 2-logins for root.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2000 05:42 PM
09-20-2000 05:42 PM
Re: Users
last -R $(/usr/bin/whoami) 5
This shows not only your last 5 logins but also the hostname (or IP address if it cannot be resolved). This is quite useful in case an unexpected login is seen when you login.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2000 06:47 PM
09-20-2000 06:47 PM
Re: Users
Many neat scripts can be developed using the command and it alows you to keep an eye on who is logged in and when.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2000 03:38 AM
09-21-2000 03:38 AM
Re: Users
BTW, 'last' presents output by searching backwards through /var/adm/wtmp. Thus the most recent sessions are presented first.
'blast' works similarly to 'last' but returns bad logins. blast uses /var/adm/btmp.
Both wtmp and btmp grow without bound and should be periodically trimmed with SAM or by cat /dev/null > /var/adm/[w|b]tmp
If you don't want logins and/or bad logins tracked, then remove the corresponding file. This will disarm the tracking.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2000 04:32 AM
09-21-2000 04:32 AM
Re: Users
I go with the suggestions in the previous posts.
Just be careful not to let the /var/adm/wtmp files to grow too large or the last command will take a while to run and if running this from the user's .profile they may see a significant pause before they are able to log in ( saw this on a 4 way T500 with ~400 users)
Regards, Trevor Dyson