On Sat, Nov 03, 2001 at 11:19:29AM +0530, Dr.K.S.Sangunni wrote:
>
> Hello
>
> I ran in to a problem. I found in /var/log the file messages
> and secure has grown big. I removed messages and secure. In
> secure I found lot of ftp activities reported. This is exp-
> ected because all the students will be ftping files and it is
> local network. What the secure do? Can I stop this log ?
No idea what /var/log/secure is .. No comments.
> What is wtmp? Can I remove this also?
The wtmp file records all logins and logouts. wtmp is maintai-
ned by login, and init and some versions of getty. Neither of
these programs creates the file ... so if it is removed record
keeping is turned off. Many utils depend upon this info.
Normally, it is not a good idea to delete messages or wtmp on
a running system, in case write process is on at the time you
execute the deletion. A better strategy would be to execute a
script like this as root:
----<snip>-------------------------------
#!/bin/sh
#########################################
# Script to manage /var/log file sizes
#########################################
PD=`pwd`
# Get into /var/log
cd /var/log
# Save last 50 lines of /var/log/messages
tail -50 messages > mesg.temp
# And move this instead of deleting messages
mv mesg.temp messages
# Zero out /var/log/wtmp instead of deleting
cat /dev/null > wtmp
# And get back to where you came from
cd $PD
exit 0
----</snip>--------------------------------
HTH
Bish
--
:
####[ Linux One Stanza Tip (LOST) ]###########################
Sub : links console browser LOST #035
Links browser, supports frames and tables ...
For a reasonably good Console based browser visit here:
http://artax.karlin.mff.cuni.cz/~mikulas/links/
####<[EMAIL PROTECTED]>#######################################
:
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help