[Samba] Solved ?: Help ! Logon script doesn't work on XP

Paul Gienger pgienger at ae-solutions.com
Fri Apr 9 13:45:58 GMT 2004


The way logon scripts are 'supposed' to work is that you specify the 
script in your smb.conf file such as
logon script = logon.bat

and then you specify a netlogon share such as:
[netlogon]
        path = /opt/samba/share/netlogon
        browseable = No

When you log on, the client automatically look in 
\\<servername>\netlogon for whatever script you specified. 

If you need more flexibility than that in your scripts, you can either 
do some scripting in the main batch file, or you can do do automatic 
generation of the script.  Here we specify that each user has their own 
logon script by saying:
logon script = %U.bat

and <username>.bat is generated in a script each time the user logs on.  
To have that script run, you add a "root preexec" parameter to the 
netlogon share:
root preexec = /opt/samba/bin/prelogon.pl %U
which will take the username as an argument, and create a script in the 
location of the netlogon share with that username as the filename.


M. Vancl wrote:

>After several experiments I think I had found explanation of my troubles:
>
>In my generated script I used z:\logon.bat pathname of copied main logon
>script to local drive (copy /b z:\logon.bat %TEMP%).
>But from some reason my WinXP don't keep (or don't make at all) mapping of
>netlogon share to z: during script execution and therefore copy was
>unsuccessfull. Due to chaos in my tests I concentrate my effort to another
>things and this simple reason I missed.
>There remain stupid question: Why the mapping don't work, when (I know it's
>default) in my smb.conf is explicitly written "logon drive = z:" ?
>
>Thanks for your attention and suggestions
>
>M. Vancl
>
>
>
>  
>

-- 
Paul Gienger                     Office:		701-281-1884
Applied Engineering Inc.         Cell:			701-306-6254
Information Systems Consultant   Fax:			701-281-1322
URL: www.ae-solutions.com        mailto:pgienger at ae-solutions.com




More information about the samba mailing list