LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-09-2009, 02:30 PM   #1
aspedisca
LQ Newbie
 
Registered: Dec 2008
Posts: 20

Rep: Reputation: 0
Understanding auth.log


Hi I have the auth.log given below and I do not understand most of it. I googled around for a while to understand the cron:sessions happening regularly but I could not find anything useful. Also the successful su for www-data is another thing. If anybody could explain what is causing these it would be great. By the way I was sleeping while this auth.log is occuring so I did not get online. Thank you...

P.S:I am using debian lenny. Installed a couple of weeks ago...


Jan 9 06:09:01 hdd CRON[2116]: pam_unix(cron:session): session opened for user root by (uid=0)
Jan 9 06:09:01 hdd CRON[2116]: pam_unix(cron:session): session closed for user root
Jan 9 06:17:01 hdd CRON[2127]: pam_unix(cron:session): session opened for user root by (uid=0)
Jan 9 06:17:01 hdd CRON[2127]: pam_unix(cron:session): session closed for user root
Jan 9 06:25:01 hdd CRON[2132]: pam_unix(cron:session): session opened for user root by (uid=0)
Jan 9 06:25:03 hdd su[2147]: Successful su for www-data by root
Jan 9 06:25:03 hdd su[2147]: + ??? root:www-data
Jan 9 06:25:03 hdd su[2147]: pam_unix(su:session): session opened for user www-data by (uid=0)
Jan 9 06:25:03 hdd su[2147]: pam_unix(su:session): session closed for user www-data
Jan 9 06:25:03 hdd su[2151]: Successful su for www-data by root
Jan 9 06:25:03 hdd su[2151]: + ??? root:www-data
Jan 9 06:25:03 hdd su[2151]: pam_unix(su:session): session opened for user www-data by (uid=0)
Jan 9 06:25:04 hdd su[2151]: pam_unix(su:session): session closed for user www-data
Jan 9 06:26:02 hdd CRON[2132]: pam_unix(cron:session): session closed for user root

Last edited by aspedisca; 01-09-2009 at 02:31 PM.
 
Old 01-09-2009, 05:00 PM   #2
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
well, the CRON lines are for a cron job that runs as root.

the "su" lines are when a user needs to do something as another user. Here, it appears that root's cron that executed at Jan 9 06:25:01 had to do some stuff with apache (so it does it as the 'www-data' user to be safe).... notice the 06:25:01 CRON entry says "session opened for root" then a bunch of other "su" stuff, then @ 06:26:02 you see another CRON entry with "session closed for root"... So all that was what happened in root's cron. In other words, nothing to worry about.
 
Old 01-09-2009, 05:01 PM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
The auth.log messages are normal and created by the pam module.
It would seem you have a cron job running under the 'www-date' userid.
Check the system and www-data user cron jobs to determine what's running:
sudo crontab -u www-data -l
sudo cat /etc/crontab
 
Old 01-09-2009, 05:39 PM   #4
aspedisca
LQ Newbie
 
Registered: Dec 2008
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by repo View Post
The auth.log messages are normal and created by the pam module.
It would seem you have a cron job running under the 'www-date' userid.
Check the system and www-data user cron jobs to determine what's running:
sudo crontab -u www-data -l
sudo cat /etc/crontab
thanx for the advice but
# crontab -u www-data -l says
no crontab for www-data

Isn't that weird??
Actually my root device is a usb disk and I do not want that regular messages to appear. I do not want my usb disk to wear out soon. Any advice to prevent those messages?

Last edited by aspedisca; 01-09-2009 at 05:50 PM.
 
Old 01-09-2009, 06:18 PM   #5
aspedisca
LQ Newbie
 
Registered: Dec 2008
Posts: 20

Original Poster
Rep: Reputation: 0
#17 * * * * root cd / && run-parts --report /etc/cron.hourly
#25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --repo$
#47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --repo$
#52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --repo$

I commented those lines. I think this will disable the messages happening again. Is that ok what I do in here?
 
Old 01-10-2009, 03:02 AM   #6
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
I commented those lines. I think this will disable the messages happening again. Is that ok what I do in here?
These have nothing to do with the messages in auth.log, they are used by the system
cron jobs also live in /etc/cron.*

Do you have apache running ?
 
Old 01-11-2009, 12:03 AM   #7
aspedisca
LQ Newbie
 
Registered: Dec 2008
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by repo View Post
These have nothing to do with the messages in auth.log, they are used by the system
cron jobs also live in /etc/cron.*

Do you have apache running ?
No I use lighttpd instead. I found the problem by the way. It was in cron.d. It was php5 and closing sessions in every 30 mins 9,39 so I commented that line also. After that the problem solved. No more lines like that but I do not know if it causes a problem for me.
 
  


Reply



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
Help understanding auth.log entries someone trying root access? jimdaworm Linux - Security 4 12-16-2008 03:27 AM
/var/log/auth.log doens't have correct date and hostname (Solution) alfmarius Linux - Newbie 0 10-07-2008 06:09 AM
suspicious entry in /var/log/auth.log buehler Linux - Security 5 04-27-2005 05:11 PM
/var/log/auth.log entries buehler Linux - Security 1 04-23-2005 04:45 PM
weird stuff in /var/log/auth.log bschiett Linux - Security 3 03-12-2005 08:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:54 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