Hi. I'm tesing Samba 3.0.7-a on Debian Sarge with Debian kernel 2.6.8. I am working on auto-creation of logon scripts, & am using a root preexec on the netlogon share for this. In testing I have passed the user ID to the script, and have used echo to test output. The netlogon service parameters and other info are below. The output from the script occurs twice in the output file, leading me to believe that my script is being run twice by the root preexec command (if I run the script manually there is only one instance of the output). Note that after each test I have deleted the text file to ensure it is not being appended to. I have tried raising the log level to 5 and cannot see any reference to the root preexec in any of the logs. Am I getting something wrong here or is this a possible bug? [netlogon] comment = Network Logon Service path = /home/samba/netlogon browseable = no guest ok = yes writable = no share modes = no root preexec = /home/samba/scripts/create-login-script.sh %u --- Test Script --- #!/bin/bash SAMBAUSER=$1 echo $SAMBAUSER >> /tmp/smbtest.txt echo ----- >> /tmp/smbtest.txt exit 0 --- End Test Script --- --- smbtest.txt --- adrian.h ----- adrian.h ----- --- End smbtest.txt --- Adrian Hicks -- MIS & Facilities Manager Auston Int'l Group Ltd 45 Middle Rd, #01-00 Auston Unicentre Singapore 188954 Tel: (65) 6334 5900 ext. 229 Fax: (65) 6339 7600
[netlogon] is a special share. I would guess Windows mounts it more than once when user logins but you should see it then with 'log level = 5' as 'cmd=/home/samba/scripts/create-login-script.sh adrian.h' line in smbd logs. Have you tried to put this 'root preexec' into [home] share instead? Igor Adrian Hicks wrote:> Hi. > > I'm tesing Samba 3.0.7-a on Debian Sarge with Debian kernel 2.6.8. > > I am working on auto-creation of logon scripts, & am using a root preexec > on the netlogon share for this. > > In testing I have passed the user ID to the script, and have used echo to > test output. The netlogon service parameters and other info are below. > > The output from the script occurs twice in the output file, leading me to > believe that my script is being run twice by the root preexec command (if > I run the script manually there is only one instance of the output). Note > that after each test I have deleted the text file to ensure it is not > being appended to. > > I have tried raising the log level to 5 and cannot see any reference to the > root preexec in any of the logs. > > Am I getting something wrong here or is this a possible bug? > > > [netlogon] > comment = Network Logon Service > path = /home/samba/netlogon > browseable = no > guest ok = yes > writable = no > share modes = no > root preexec = /home/samba/scripts/create-login-script.sh %u > > > > --- Test Script --- > #!/bin/bash > SAMBAUSER=$1 > > echo $SAMBAUSER >> /tmp/smbtest.txt > echo ----- >> /tmp/smbtest.txt > > exit 0 > --- End Test Script --- > > --- smbtest.txt --- > adrian.h > ----- > adrian.h > ----- > --- End smbtest.txt --- > > > > Adrian Hicks
Apparently Analagous Threads
- getent not showing domain users and groups with winbind but works with sssd
- trouble with german special chars on smb shares
- getent not showing domain users and groups with winbind but works with sssd
- getent not showing domain users and groups with winbind but works with sssd
- AD integration: "getent passwd" can't see *new* users, but "wbinfo -u" can