Solved

log rotate of tacacs+ in redhat6

Posted on 2004-08-12
6
1,140 Views
Last Modified: 2013-12-16
I just install tacacs on RH6 and it work and have log of tacacs is "/var/log/tac_plus.log" ,so I want to make it rotate every day in 1 week...

tac_plus.log
tac_plus.log.6
tac_plus.log.5
tac_plus.log.4
tac_plus.log.3
tac_plus.log.2
tac_plus.log.1

 how can I start it same as /var/log/messages
I try to make it by use command
“logrotate -f /etc/logrotate.d/tac_plus”
result is not create only 1 file and don't create new file in every day. There're have another command to set it up?
0
Comment
Question by:ahchun
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 11

Expert Comment

by:lbertacco
ID: 11791175
add a file "tacacs" in dir /etc/logrotate.d like the following

/var/log/tac_plus.log {
           rotate 7
           weekly
           nocompress
           missingok
}

then try logrotate -f /etc/logrotate.d/tacacs

See also "man logrotate" for options you can specify in this file. In particular you might need to restart or signal the tacacs daemon when you rotate the log file
0
 

Author Comment

by:ahchun
ID: 11817250
I done it, result it have new file after use 'logrotate -f /etc/logrotate.d/tac_plus' (I create file name to be tac_plus)

but when next day com'in a log file is not rotate.
Please advice.
0
 
LVL 11

Accepted Solution

by:
lbertacco earned 50 total points
ID: 11824141
what do you have in your /etc/logrotate.d/tac_plus file? With "weekly" logfile is rotate only every other week. If you want it to be rotate every day, use "daily"
0
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 

Author Comment

by:ahchun
ID: 11827142
OK, I do it thank you. :)
Will saw the result in next day.

====================================
1. [root@localhost root]# more /etc/logrotate.d/tac_plus
/var/log/tac_plus.log {
           rotate 7
           daily
           nocompress
           missingok
}

2. logrotate -f /etc/logrotate.d/tac_plus
====================================
0
 

Author Comment

by:ahchun
ID: 11842232
so, I have /etc/logrotate.d/tac_plus
but it can't rotate everyday....it not start rotate.
0
 
LVL 11

Expert Comment

by:lbertacco
ID: 11844400
Wait until tomorrow. If still doesn't work it will need some investigation (but I'm going on vacation for one week so I'm not sure I'll be able to help)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question