LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-04-2009, 08:21 PM   #1
Toadman
Member
 
Registered: Aug 2002
Location: Copperas Cove, Texas
Distribution: Ubuntu 20.04 LTS
Posts: 304

Rep: Reputation: 21
Getting logcheck to run on Mandriva 2009


More than a week after upgrading from Mandrake 10.1 to Mandriva 2009 I'm still trying to iron out problems. One is running logcheck. In 10.1 I had this in my crontab:

0 * * * * root /usr/local/etc/logcheck.sh

which ran logcheck every hour. Now in 2009 I can't get it to run. It's the same version as I had before using the same config files. Using this command from the cli:

su -s /bin/bash -c "/usr/sbin/logcheck -d -t" logcheck

logcheck will run but gives me these errors:

logoutput called with file: /var/log/syslog
Running logtail: /var/log/syslog
error: Killing lockfile-touch - 20489
error: Removing lockfile: /var/lock/logcheck.lock
Error: Could not run logtail or save output
Cleanup: Removing - /var/tmp/logcheck.rHWifN

The output mailed to me is:

Warning: If you are seeing this message, your log files may not have been
checked!

Details:
Could not run logtail or save output

Check temporary directory: /var/tmp/logcheck.lapCCo

declare -x DISPLAY=":0.0"
declare -x ENV="/root/.bashrc"
declare -x GCONF_TMPDIR="/tmp"
declare -x G_FILENAME_ENCODING="@locale"
declare -x HISTCONTROL="ignoredups"
declare -x HISTSIZE="1000"
declare -x HOME="/etc/logcheck"
declare -x HOSTNAME="localhost"
declare -x INPUTRC="/etc/inputrc"
declare -x LANG="en_US.UTF-8"
declare -x LANGUAGE="en_US.UTF-8:en_US:en"
declare -x LC_ADDRESS="en_US.UTF-8"
declare -x LC_COLLATE="en_US.UTF-8"
declare -x LC_CTYPE="en_US.UTF-8"
declare -x LC_IDENTIFICATION="en_US.UTF-8"
declare -x LC_MEASUREMENT="en_US.UTF-8"
declare -x LC_MESSAGES="en_US.UTF-8"
declare -x LC_MONETARY="en_US.UTF-8"
declare -x LC_NAME="en_US.UTF-8"
declare -x LC_NUMERIC="en_US.UTF-8"
declare -x LC_PAPER="en_US.UTF-8"
declare -x LC_SOURCED="1"
declare -x LC_TELEPHONE="en_US.UTF-8"
declare -x LC_TIME="en_US.UTF-8"
declare -x LESS="-MM"
declare -x LESSCHARSET="utf-8"
declare -x LESSKEY="/etc/.less"
declare -x LESSOPEN="|/usr/bin/lesspipe.sh %s"
declare -x LOGNAME="logcheck"
declare -x LS_COLORS="rs=0:di=01;34:ln=01;36i=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01r=01;05;37;41: mi=01;05;37;41:su=37;41:sg=30;43:tw=30;42w=34;42:st=37;44:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=0 1;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31: *.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;3 1:*.tbz2=01;31:*.tz=01;31:*.lzma=01;31:*.tlz=01;31:*.deb=01;31:*.rpm=01;31:*.cpio=01;31:*.jar=01;31: *.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.iso=01;31:*.jpg=01;35:*.jpe g=01;35:*.JPG=01;35:*.JPEG=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=0 1;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01; 35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35: *.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmv b=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;3 5:*.yuv=01;35:*.divx=01;35:*.xvid=01;35:*.asf=01;35:*.wmv=01;35:*.mp4=01;35:*.3gp=01;35:*.flv=01;35: *.ico=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.m pc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.mp2=00;36:*.mod=00;36:*.xm=00;36:*.s3m=00;36:*.it=00;3 6:*.wma=00;36:*~=47;30:*.bak=47;30:*.swp=47;30:*.bck=47;30:*.bk=47;30:*.old=47;30:*.tmp=47;30:*.save =47;30:*.rpmsave=47;30:*.rpmnew=47;30:"
declare -x MAIL="/var/spool/mail/root"
declare -x MDV_MENU_STYLE="mandriva"
declare -x META_CLASS="download"
declare -x MPIRUN_HOME="/usr/bin"
declare -x NLSPATH="/usr/share/locale/%l/%N"
declare -x OLDPWD
declare -x PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin"
declare -x PWD="/root"
declare -x PYTHONPATH="/usr/lib/ooo-3.0/basis-link/program"
declare -x PYTHONSTARTUP="/etc/pythonrc.py"
declare -x QT4DOCDIR="/usr/share/doc/qt4/doc"
declare -x QTDIR="/usr/lib/qt3/"
declare -x QTINC=""
declare -x QTLIB=""
declare -x SCREENDIR="/root/tmp"
declare -x SECURE_LEVEL="3"
declare -x SHELL="/bin/bash"
declare -x SHLVL="3"
declare -x TERM="xterm"
declare -x TMP="/root/tmp"
declare -x TMPDIR="/var/tmp/logcheck.lapCCo"
declare -x USER="logcheck"
declare -x USERNAME="root"
declare -x XAUTHORITY="/etc/logcheck/.xauthLiJyUb"
declare -x XDG_DATA_DIRS="/usr/share:/opt/kde3/share"

I've made a user 'logcheck' in group 'logcheck' as I've seen suggested elsewhere. The above output is when run from the command line. When run from a cronjob this is all I see:

standard in must be a tty

I can't figure out why it ran so easily in 10.1 but won't in 2009.
Any advice would be greatly appreciated.

Chris
 
Old 01-04-2009, 09:51 PM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Logcheck must have privileges adequate to read /var/log/syslog. As far as I know this means 'root' privileges. I believe the logcheck group should be a 'system' group, and tre user should be a system user, versus a real user, with a username and password. System accounts grab root privileges as needed, usually.

The permissions are not adequate for creating the lockfile, and so, although the syslog tail starts, it never completes. This could be due to the permissions on the lockfile directory itself. I do have to say, logcheck is a bummer of a program. To try and keep up with it, if certain other packages are installed, is a nightmare.

But, if logcheck is what you want, check out what I advised. It could also be a bug in the distro, in which case it should be reported to the Mandriva team. Reporting bugs is frequently the fastest fix.
 
Old 01-04-2009, 10:01 PM   #3
Toadman
Member
 
Registered: Aug 2002
Location: Copperas Cove, Texas
Distribution: Ubuntu 20.04 LTS
Posts: 304

Original Poster
Rep: Reputation: 21
Quote:
Originally Posted by AwesomeMachine View Post
Logcheck must have privileges adequate to read /var/log/syslog. As far as I know this means 'root' privileges. I believe the logcheck group should be a 'system' group, and tre user should be a system user, versus a real user, with a username and password. System accounts grab root privileges as needed, usually.

The permissions are not adequate for creating the lockfile, and so, although the syslog tail starts, it never completes. This could be due to the permissions on the lockfile directory itself. I do have to say, logcheck is a bummer of a program. To try and keep up with it, if certain other packages are installed, is a nightmare.

But, if logcheck is what you want, check out what I advised. It could also be a bug in the distro, in which case it should be reported to the Mandriva team. Reporting bugs is frequently the fastest fix.
Thanks Awsome, I'll look into this tomorrow. I may just give up on it and try logwatch instead. I did like the hourly syslog snip I got from logcheck. I'm not exactly though what you mean by 'system group' and 'system user'. It seems much harder to get this 2009 install up an running again as opposed to the 10.1 I'd been using before.

Thanks for the reply
Chris
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble with Mandriva One 2009 shea1roh Mandriva 8 02-05-2009 06:08 AM
Mandriva 2009 for amd 64? Abraxis Mandriva 7 01-05-2009 09:32 AM
digiKam in Mandriva 2009 jancyclops Linux - Software 0 12-13-2008 04:21 PM
Cannot boot Mandriva 2009 hayzhold Linux - Software 2 10-15-2008 06:54 PM
Mandriva 2009 - no networking. Keithj Mandriva 9 09-06-2008 05:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration