- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: /etc/wtmp
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
тАО10-31-2001 10:35 AM
тАО10-31-2001 10:35 AM
- Tags:
- wtmps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2001 10:43 AM
тАО10-31-2001 10:43 AM
SolutionThe easy way is to do a cat
cat /dev/null >/etc/wtmp
here is a thread for some additional info.
http://us-support.external.hp.com/cki/bin/doc.pl/sid=6831053f02947ad6b6/screen=ckiDisplayDocument?docId=200000053199208
Hope this helps.
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2001 10:52 AM
тАО10-31-2001 10:52 AM
Re: /etc/wtmp
DATE=`date +%m%d%Y`
cp wtmp wtmp.$DATE
cat /dev/null > wtmp
gzip wtmp.$DATE (This may depend on the size of the file)
Just my thoughts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2001 11:00 AM
тАО10-31-2001 11:00 AM
Re: /etc/wtmp
If you want to completely null the file, then:
# cat /dev/null > /var/adm/wtmp
Note that /etc/wtmp is a link to /var/adm/wtmp.
If, on the otherhand, you want to keep some of its contents, you must do something like this:
# /usr/sbin/acct/fwtmp < /var/adm/wtmp > /tmp/wtmp
This converts the binary file to an ASCII formatted one which you may edit and convert back to binary:
# /usr/sbin/acct/fwtmp -ic < /tmp/wtmp > /var/adm/wtmp
You can perform similar manipulations with the 'btmp' data for "bad" logins.
If you wish to totally stop logging to either the 'wtmp' or 'btmp' file, *remove* the file(s) you don't want.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2001 11:47 AM
тАО10-31-2001 11:47 AM
Re: /etc/wtmp
wtmp holds useful info
on user login/logout activity.
So, instead of deleting or
trimming it, make a copy
of the file and then zero it.
#cp /etc/wtmp /etc/wtmp.OLD
#>/etc/wtmp
-raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2001 03:02 PM
тАО11-02-2001 03:02 PM
Re: /etc/wtmp
Another way not mentioned is to go into Sam and edit you system files under Routine task when you highlight the individual line than click your tab key select actions, trim, you can choose to trim it back to zero or to a percentage so you do have some documentation on logins
Hope this helps
DKD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2001 03:17 PM
тАО11-02-2001 03:17 PM