[Samba] Logging the hostname with a Samba share connection

Gerald (Jerry) Carter jerry at samba.org
Wed Sep 8 16:19:44 GMT 2004

Hash: SHA1

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
| I tried to do this with the /etc/samba/smb.conf setting:
|      log file = /var/log/samba/%m:%M:%I.log
| The man page seems to indicate that either %m or %M
| should include the hostname but I keep just getting
| the IP address only.

Set 'hostname lookups = yes' ( and make sure you reverse
DNS lookups work correctly).

| I have tried setting "security = user" and I then
| get the hostname but it asks for a password to connect
| the share.  With "security = share" I don't get the
| password request but it then only logs the IP address.

I don't recommend security = share unless you really
know what you are doing and why you want to use it.
'security = user' is much more intuitive.

| This is supposed to be a publicly available share.
| I don't want to ask for a password but I do want
| to get hostname information for

See the 'map to guest' parameter and possibly 'force user'

cheers, jerry
- ---------------------------------------------------------------------
Alleviating the pain of Windows(tm)      ------- http://www.samba.org
GnuPG Key                ----- http://www.plainjoe.org/gpg_public.asc
"If we're adding to the noise, turn off this song"--Switchfoot (2003)
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the samba mailing list