[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

-- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba

Reply via email to