wtmpx file


 
Thread Tools Search this Thread
Operating Systems Solaris wtmpx file
# 1  
Old 02-04-2010
wtmpx file

What could possibly happen if wtmpx file got deleted by mistake?

Thanks,
# 2  
Old 02-04-2010
Quote:
Originally Posted by Pouchie1
What could possibly happen if wtmpx file got deleted by mistake?

Thanks,
the world, as we know it, might just stop to exist... or nothing...

as far as i remember the "last" log goes to this file?! so if this file is deleted, there is no last log...
# 3  
Old 02-04-2010
I set up a cronjob to truncate this file on some servers,

Code:
> /var/adm/wtmpx

because I got bored doing it myself Smilie

I've no idea who logged in now, but nothing bad ever happened.
# 4  
Old 02-05-2010
scott likes to live "la vida loca"
# 5  
Old 02-24-2010
Thanks all for your reply
# 6  
Old 02-24-2010
Hmm. The dynamic record of who is logged in now is in utmpx . Don't mess with utmpx or the "who" command could not work.
The file wtmpx is historical connection information and the file used by unix command "last". It is a common dodge to routinely copy wtmpx to an archive filename and then null the original file as described. This does not break the process.
Actually deleting the wtmpx file is not a good idea. Many posts on this site describe deleting system accounting files and not getting the disc space back because the file is still open. Even after a reboot the file has to be created manually with the correct permissions to get system accounting running again.
Take care.
# 7  
Old 02-24-2010
Quote:
Originally Posted by methyl
Hmm. The dynamic record of who is logged in now is in utmpx . Don't mess with utmpx or the "who" command could not work.
The file wtmpx is historical connection information and the file used by unix command "last". It is a common dodge to routinely copy wtmpx to an archive filename and then null the original file as described. This does not break the process.
Actually deleting the wtmpx file is not a good idea. Many posts on this site describe deleting system accounting files and not getting the disc space back because the file is still open. Even after a reboot the file has to be created manually with the correct permissions to get system accounting running again.
Take care.
Totally agree, which is why I nulled the file (wtmp), and, as permissions go, why I would prefer
Code:
do_something > tmpfile
cp tmpfile orgfile && rm tmpfile

over
Code:
do_something > tmpfile
mv tmpfile orgfile

As for utmp... yes, best leave that be!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Getting information from the wtmpx file

Hi, I tried running the command "last" in the server to check the users that were last logged into the system. However, I get this error : root@csidblog:# last /var/adm/wtmpx: Value too large for defined data type How do I proceed to get this info? I read some forums suggesting to use... (2 Replies)
Discussion started by: anaigini45
2 Replies

2. Solaris

Wtmpx File Permissions Question

Hi all, I have been tasked to change permissions on the wtmpx file to 640. Currently the permissions are at 644. My question is will anything be affected if I change the permissions as shown? Thanks in advance. Derek (2 Replies)
Discussion started by: Derk Berk
2 Replies

3. Solaris

Something is removing/deleting my wtmpx file?

hi, we have a solaris 10 box that was handled by a different sysadmin before & now it is turned over to us for system administration. our concern is that if we issue the "last" command, it usually says "wtmp begins current day current month date 02:30". just like this "wtmp begins Thu Mar 7... (6 Replies)
Discussion started by: booghaw
6 Replies

4. UNIX for Advanced & Expert Users

Not logging ftp connections in /var/adm/wtmpx file (in last command output)

Hi all, I have F5 load balancer on my system and checking service status by opening an ftp session in every 30 seconds. These ftp sessions are being logged in /var/adm/wtmpx and filling up the file. when i run the last command most of the output is this ftp session. I was wondering if there is a... (1 Reply)
Discussion started by: cepxat
1 Replies

5. Solaris

WTMPX File corrupted

Hi All I work on solaris 8, 9 and 10 platforms and have encountered an error which is my wtmpx files appear to be corrupted as all entries contain the date 1970 (the birth of unix). Now this is obviously not the case, so my query is: 1 - Can the existing wtmpx files be manipulated to... (6 Replies)
Discussion started by: drestarr96
6 Replies

6. UNIX for Advanced & Expert Users

wtmpx file is not updating

Hi in my solaris 9 system wmptx file is not updating so it is not recording any login or logout or any other entry. can any one tell me how to solve this problem (0 Replies)
Discussion started by: aaysa123
0 Replies

7. Solaris

wtmpx file is too big

Hi, I am using Sun Solaris 5.9 OS. I have found a file called wtmpx having a size of 5.0 GB. I want to clear this file using :>/var/adm/wtmpx. My query is, would it cause any problem to the running live system. Could anyone suggest the best method to clear the file without causing problem to... (6 Replies)
Discussion started by: Vijayakumarpc
6 Replies

8. UNIX for Dummies Questions & Answers

wtmpx file

Hello everybody: the wtmpx file on my Sol8 machine, got so big (2GB), that my root partition is almost full now, can I empty that file, I read about it that it contains database of user access and auditing, so in case I emptied it will it affect my system?? Thanks alot (3 Replies)
Discussion started by: aladdin
3 Replies

9. UNIX for Advanced & Expert Users

how to delete entry in file "wtmpx"(/var/adm/wtmpx)

Do someone know how to delete entry(some lines) in file "wtmpx" that command "last" use it. this file is binary so I cannot edit directy. ========================= #last root pts/1 noc Fri Mar 3 22:04 still logged in root pts/1 noc Fri Mar 3 22:01 - 22:02 ... (4 Replies)
Discussion started by: arm_naja
4 Replies

10. UNIX for Dummies Questions & Answers

wtmpx

Platform sol 8 I had wtmpx growing very large(1.2 G). I copied the file and compressed it the did a "cat /dev/null > /var/adm/wtmpx" to zero out the file and not close any doors to any processes. (After searching this seemed like the right method) This is a box that gets accessed from other... (5 Replies)
Discussion started by: finster
5 Replies
Login or Register to Ask a Question