logon script newbee question

John H Terpstra jht at samba.org
Thu Jul 24 16:47:25 GMT 2008

On Thursday 24 July 2008 11:09:36 andreas moroder wrote:
> Hello,
> in the samba.general group I asked if it  is possible to start a script
> similar to preexec after the client has finished the logon script.
> I got no good answer so I suppose it is not.

As far as I can recall, when the client has finished processing the logon 
script it just drops the connection to the netlogon share.  If my 
recollection is correct (easily verified using wireshark), then there is no 
mechanism for the client to signal the Samba server that it has finished 
execution of the logon script, and therefore there is nothing to trigger post 
logon script processing.

You could create a windows application that can be executed as teh last step 
in the logon script, and possibly use it to do what you want.

> Now I would like tod dig myself in samba code to understand how the login
> script part of the code works and if it would be possible to add such a
> script.

Samba does nothing other than serve up the logon script. The client makes the 
connection to the netlogon share, downloads the script file (as specified in 
the SamabSAM or the default from the smb.conf file) and then executes it.

The connection to the netlogon share if often left hanging, so you can not 
depend on the dropping of the connection to act as a trigger.  The client 
controls the entire logon game.

> Could anyone please point me to the right place in the code ?

No, you would need to license the Windows source code.

- John T.

More information about the samba-technical mailing list