[Samba] Re: Samba - root preexec & login scripts

Walter Mautner rentuam_retlaw at hotmail.com
Wed Oct 30 19:47:01 GMT 2002


> Last night at home, and on a second system today at work, I
> tried putting in the sample preexec statement contained in
> the smb.conf man page to check it's effect on the domain
> logons. Just like the preexec for the perl script it kills
> domain logons. As that script is right in the smb.conf man
> page I'd certainly expect that to work.
>
> As one final shot at this I'll post my smb.conf for some of
> you to examine. I've removed all the comments in an effor to
> minimize size. The preexec statement is in the netlogon section.
>
> Thanks.
>
> --
> Mike Rambo
> mrambo at lsd.k12.mi.us
>
>
> #======================= Global Settings
> =====================================
> [global]
>
>    workgroup = IMCDOMAIN
>    netbios name = linuxts1
>    server string = Samba PDC %v
>    hosts allow = 192.168.3. 127.
>    printcap name = /etc/printcap
>    load printers = yes
>    log file = /var/log/samba/log.%m
>    log level = 5
>    max log size = 50
>    security = user
>    encrypt passwords = yes
>    smb passwd file = /etc/samba/smbpasswd
>    unix password sync = Yes
>    passwd program = /usr/bin/passwd %u
>    passwd chat = *New*UNIX*password* %n\n
> *ReType*new*UNIX*password* %n\n
> *passwd:*all*authentication*tokens*updated*successfully*
>    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192
> SO_SNDBUF=8192
>    interfaces = 192.168.3.1/24
>    os level = 63
>    domain master = yes
>    preferred master = yes
>    domain logons = yes
>    domain admin group = @adm
>    add user script = /usr/sbin/useradd -d /dev/null -g
> machines -c 'Machine Account' -s /bin/false -M %u
>    logon script = %U.bat
>    logon path = \\%L\Profiles\%U
>    logon home = \\%L\%U\.profile
>    logon drive = L:
>    wins support = yes
>    dns proxy = no
>
> #============================ Share Definitions
> ============================== [homes]
>    comment = Home Directories
>    browseable = no
>    writable = yes
>    create mask = 0750
>    directory mask = 0750
>
> [netlogon]
>    comment = Network Logon Service
>    path = /home/netlogon
>    guest ok = yes
>    read only = yes
>    browseable = no
>    printable = no
>    write list = @adm
>    share modes = no
> #   root preexec = perl /home/netlogon/netlogon.pl %U
>    preexec = echo \"%u connected to %S from %m (%I)\" >> /tmp/log
>
Probably it's too simple: you have to supply absolute paths to
your commands :)




More information about the samba mailing list