- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- redirecting the "last" command
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
тАО09-18-2002 01:47 PM
тАО09-18-2002 01:47 PM
The man pages do not indicate this is a valid option.
I'm trying to have a script read the wtmp across multiple machines to see who is logged in on each one of them.
Is there an easier way? Should I sym link the systems all to the same wtmp?
I'm looking for ideas.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-18-2002 01:54 PM
тАО09-18-2002 01:54 PM
SolutionThe 'var/adm/wtmp' file is a binary file. 'last' knows how to read it and you could pipe its output to a 'read'.
Another, easier approach, is to convert the binary file to an ascii one with 'fwtmp' (see "man 1M fwtmp"). In fact this is the approach used when the 'wtmp' database is corrupted -- you use 'fwtmp' to convert it to ascii format; edit the ascii file; and convert the ascii format back to binary.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-18-2002 01:55 PM
тАО09-18-2002 01:55 PM
Re: redirecting the "last" command
Is that what you are looking for?
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-18-2002 01:56 PM
тАО09-18-2002 01:56 PM
Re: redirecting the "last" command
This example will convert a file from any system it to an ASCII file from your other systems, should you choose to copy them.
#/usr/sbin/acct/fwtmp < /var/adm/wtmp > /tmp/file
You can then get you information
Have a look at the 'fwtmp' man page for further information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-18-2002 01:58 PM
тАО09-18-2002 01:58 PM
Re: redirecting the "last" command
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-19-2002 10:43 PM
тАО09-19-2002 10:43 PM
Re: redirecting the "last" command
If you system is connected to a public network, try installing OpenSSH on all your systems and use the "captive"-ssh commands, together with public keys.
In this way you will have all the flexibility of the "r" commands, but without the security holes.
See www.openssh.com for details.