- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: last command / wtmp file
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
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
12-16-2003 06:09 AM
12-16-2003 06:09 AM
last command / wtmp file
i1317 rexecd Tue Dec 16 11:00 still logged in
i1317 rexecd Tue Dec 16 11:00 still logged in
i1317 rexecd Tue Dec 16 10:58 still logged in
i1317 rexecd Tue Dec 16 10:58 still logged in
i1317 rexecd Tue Dec 16 10:58 still logged in
i1317 rexecd Tue Dec 16 10:58 still logged in
1) Even though the NT servers show that these commands were completed, I show them still logged in. Will this cause problems?
2) Is there any way of purging this file and keeping only 3 months.
3) Is there any way of purging the user i1317 out of this file?
4) Is there a way to extract only the last login of every user, instead of extracting every login of every user?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2003 06:17 AM
12-16-2003 06:17 AM
Re: last command / wtmp file
2. The file /var/adm/wtmp, /var/adm/btmp should be purged periodically. You can SAM for this. These files can be nulled out as follows.
cp /dev/null /var/adm/wtmp
cp /dev/null /var/adm/btmp
3.Purge user i1317 out of wtmp
last|grep -v i1317.
OR
check man page of fwtmp. With this you can create a text file from wtmp, view/modify it and again convert it to wtmp again.
4.last|grep "user_name"|head -1
and similar command combinations to view what you want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2003 06:22 AM
12-16-2003 06:22 AM
Re: last command / wtmp file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2003 07:39 AM
12-16-2003 07:39 AM
Re: last command / wtmp file
Further to what has already been said get your sql programmer to sort out his script and do an elegant logout.
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2003 07:48 AM
12-16-2003 07:48 AM
Re: last command / wtmp file
to add a little to question no. 3: you can edit the wtmp file by extracting an ascii version of it and perform the editing in that version. After editing, the modified ascii version can be read in as current wtmp file. An example, execute as root:
# /usr/sbin/acct/fwtmp < /etc/wtmp > /tmp/wtmp.txt
which retrieves an ascii version of /etc/wtmp to /tmp/wtmp.txt
Modify this file with your favourite vi-editor. When finished, read in the modified /tmp/wtmp.txt as current i/etc/wtmp file:
# /usr/sbin/acct/fwtmp -ic < /tmp/wtmp.txt > /etc/wtmp
regards,
John K.