[Samba] root preexec script runs twice

Adrian Hicks Adrian.H at auston.edu.sg
Wed Oct 13 05:18:46 GMT 2004


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


More information about the samba mailing list