Hostname and IP address logging for Samba clients
Kurt Wall
kwall
Sun Sep 5 06:30:27 PDT 2004
In a 1.0K blaze of typing glory, Brian Simper wrote:
> I am new to Samba but I set up a server and I am trying to get the
> logging to my liking.
> In /var/log/samba the entries are of the format:
>
> date.ipaddress.ipaddress
>
> I would prefer the logging to be:
>
> date.ipaddress:hostname
>
> Is there a way to do this in Samba? With dhcp in use on my network I
> would have no
> good clue about which machine is making transactions. Since Windows
> machines connect
> to this server I need to know if one of them is inadvertantly passing
> viruses to me.
>
> Inside /etc/samba/smb.conf I am currently using:
>
> log file = /var/log/samba/log.%m:%I:%U
>
> I wanted to have a log file to track each client but I can't get the
> hostname to appear, only the
> ip address which is not as helpful with dhcp clients.
Use the %M parameter, which gives you the client host name.
Kurt
--
Q: How many heterosexual males does it take to screw in a light bulb
in San Francisco?
A: Both of them.
More information about the Linux-users
mailing list