[K12OSN] smbldap logs

Brian Chivers brian at portsmouth-college.ac.uk
Tue Nov 8 13:54:56 UTC 2005


Mark Gumprecht wrote:
> Where is the log that smbldap uses for logging users time in and time 
> log off and from what machine?
> I've tried who,w,finger, I've checked the regular log files, 
> messages,secure. I looked through the config files for the logfile 
> setting, I looked in the samba logs. I'm sure I missed it somewhere. It 
> is a k12ltsp4.2.1EL machine.
> TIA
> Mark
> 
I don't think it does by default. I've added this to my smb.conf so I have this info

[homes]
     comment = Home Directories
     root preexec = csh -c 'echo "`date`: %u connected from %m (%I)" >> /var/log/samba/login.log'
     root postexec = csh -c 'echo "`date`: %u disconnected from %m (%I)" >> /var/log/samba/login.log'

I've setup logrotate so the file doesn't get too big. A friend has also written a little php file 
that reads the file so you can easily see who's logged in. Only problem is that we have so much 
traffic that it would never finish so I've just setup a cron job that copies the login.log file 
every 5 minutes and pointed the php file at that.

Brian Chivers
Portsmouth College

---------------------------------------------------------------
    The views expressed here are my own and not necessarily 
                the views of Portsmouth College             




More information about the K12OSN mailing list