- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: difference between last and lastb
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
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
тАО05-07-2009 06:44 AM
тАО05-07-2009 06:44 AM
what is the difference between last and lastb.
i think both are used to view the last logged in users.
Because "last" show one month login report (May 2009 only). but "lastb" is showing last 8 months rport.
how it is possible?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2009 06:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2009 06:51 AM
тАО05-07-2009 06:51 AM
Re: difference between last and lastb
The lastb command searches backwards through the database file
/var/adm/btmp to display bad login information.
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.
see man page last.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2009 06:52 AM
тАО05-07-2009 06:52 AM
Re: difference between last and lastb
last command searches backwards through the file /var/adm/wtmp which contains a record of all logins and logouts.
lastb command searches backwards through the database file /var/adm/btmp which contains bad login informations.
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2009 07:04 AM
тАО05-07-2009 07:04 AM
Re: difference between last and lastb
(login database) for its functioning.lastb shows the unsuccessful login attempts uses /var/adm/btmp(bad login database)
>>>how it is possible?
its clear that somebody trimmed your wtmp file one month back and your btmp file is unaffected still now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2009 07:08 AM
тАО05-07-2009 07:08 AM
Re: difference between last and lastb
as described by Pete last reads wtmp file and lastb btmp file. If you see last command just showing last month it could be that someone zeroed it one month ago and didn't touch btmp, something like:
> /var/adm/wtmp
I saw to do that when the wtmp file grows up so much to fill up the /var filesystem, in that case zeroing this kind of file usually is a good action to free space from /var.
HTH.
Best regards,
Fabio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2009 08:43 AM
тАО05-07-2009 08:43 AM
Re: difference between last and lastb
Like it or worked !! Click kudos !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2009 12:28 AM
тАО05-11-2009 12:28 AM
Re: difference between last and lastb
last command searches backwards through the file /var/adm/wtmp which contains a record of all logins and logouts.
lastb command searches backwards through the database file /var/adm/btmp which contains bad login informations.
Rgds-Kranti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2009 01:00 AM
тАО05-11-2009 01:00 AM
Re: difference between last and lastb
last, lastb - show listing of last logged in users
last searches backwards through file /etc/wtmp (which contains a record of all logins and logouts) for information about a user, a tty, or any group of users and ttys.
Lastb is the same as last, except that by default it shows a log of the file /var/log/btmp, which contains all the bad login attempts.
Suraj