Hi, I have very strange problem: I had created logon script (bat file dynamically generated by root peexec) and tested it successfully on Win98 workstation. Now I'm testing it on XP wkst., but the same (created by the same method) script is during logon not executed. What is absolutely mysterious for me ? The script is really read by workstation durin logon - I saw it in network traffic (caught by tcpdump and displayed by ethereal). Here is copy of current script (of course - every line o file ends with \r\n): --- snip --- @echo off set CLIENT=prog01t set USER=p01861 set SERVER=sambaii set SMBPID=24631 set ARCH=WinXP copy /b z:\logon.bat %TEMP%\logon.bat %TEMP%\logon.bat --- snip --- After logon there is no file %TEMP%\logon.bat. Next, when I manually do "net use z: \\sambaii\netlogon" and execute my logon script from there, everything is done by my wishes... Does have anybody some idea ? Thanks for any advice M. Vancl
On Fri, 9 Apr 2004, M. Vancl wrote:> Hi, > > I have very strange problem: > I had created logon script (bat file dynamically generated by root peexec) > and tested it successfully on Win98 workstation. > Now I'm testing it on XP wkst., but the same (created by the same method) > script is during logon not executed. > What is absolutely mysterious for me ? The script is really read by > workstation durin logon - I saw it in network traffic (caught by tcpdump and > displayed by ethereal). > Here is copy of current script (of course - every line o file ends with > \r\n): > --- snip --- > @echo off > set CLIENT=prog01t > set USER=p01861 > set SERVER=sambaii > set SMBPID=24631 > set ARCH=WinXP > copy /b z:\logon.bat %TEMP%\logon.bat > %TEMP%\logon.bat > --- snip --- > After logon there is no file %TEMP%\logon.bat. > Next, when I manually do "net use z: \\sambaii\netlogon" and execute my > logon script from there, everything is done by my wishes... > > Does have anybody some idea ? >Are you sure the XP client is logging onto the NT domain? XP can just memorise network connections etc. and appear to be logging on.
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
M. Vancl schrieb:> Hi, > > I have very strange problem: > I had created logon script (bat file dynamically generated by root peexec) > and tested it successfully on Win98 workstation. > Now I'm testing it on XP wkst., but the same (created by the same method) > script is during logon not executed. > What is absolutely mysterious for me ? The script is really read by > workstation durin logon - I saw it in network traffic (caught by tcpdump and > displayed by ethereal). > Here is copy of current script (of course - every line o file ends with > \r\n): > --- snip --- > @echo off > set CLIENT=prog01t > set USER=p01861 > set SERVER=sambaii > set SMBPID=24631 > set ARCH=WinXP > copy /b z:\logon.bat %TEMP%\logon.bat > %TEMP%\logon.bat > --- snip --- > After logon there is no file %TEMP%\logon.bat. > Next, when I manually do "net use z: \\sambaii\netlogon" and execute my > logon script from there, everything is done by my wishes... > > Does have anybody some idea ? > > Thanks for any advice > > M. Vancl > > > >hi, what is this with copy etc, place you bat file ( must be written in dos editor ) in a netlogon share on samba , make it readable and it will executed, for sure you can create the scipt on the fly with perl as prexec to that share ( example in the samba source ) but after that ( if you have the right parameter in smb.conf the script will be executed by the win client automaticly ....no need for net use and copy it to the client ,after all some win versions need diffrent syntax with bat files honor them. i think your special failure depend on user rights on the win machine , xp as multiuser system want to have admin rights to execute your bat , check your event log Regards