I don't really know that much about connecting to a Samba share, but I would suggest that you change your script to make it readable when it runs (at least for troubleshooting purposes).

I assume you're shelling out to DOS doing a NET USE instead of KiXtart USE because you want the log file? It seems strange to me that you would not have full permissions to the samba share prior to running the logon script. Also, whether or not the script runs from the server shouldn't make much difference (except for speed) because it is still running on the client PC in the account of the user logging on.

I would suggest first making the script visible to test, then adding error checking (@error and @serror) after each line that causes the script to hang. Then we can see a little better what is going on.

Brian