[Samba] log file format

Rahul rahulsahadev at gmail.com
Wed May 9 12:29:53 GMT 2007

Hi list,
           Issue regarding the samba log files. In the samba configuration
file Global settings i have the parameter to
get log files of particular samba shares in the share_name.log format. For
that i have given the parameter as
        log file = /var/log/%S.log
According to the docs the log files will be generated for particular shares
in the /var/log and for %S the sharename has to come.
But for us its showing as %S.log itself. We have tried with %m and %U which
is replaced with the machine netbios name and the samba
username respectively.
Can anybody tell me why its not working with %S? Or i have to do something
more to get it work?
I am attaching Global Settings part of the samba configuration file here,

        server string=sanat server
        netbios name=sanat
        wins server=
        log level=2
        encrypt passwords=yes
        socket options=TCP_NODELAY
        read raw=yes
        write raw=yes
        level2 oplocks=no
        template shell=/bin/false
        unix extensions=no
        directory mask=0770
        create mask=0770
        root preexec=/usr/local/samba/bin/smb-preexec '%S' '%I' '%U' '%a'
        root preexec close=Yes
        root postexec=/usr/local/samba/bin/smb-postexec '%S' '%I' '%U' '%a'
        log file = /var/log/%S.log

Thanks in advance.

More information about the samba mailing list