|
|
|||||||
Help me.. pls I got error when I start to run Kix script.. Error is.. Can't sync clock with PDC.. I don't know why.. My Server is Windows 2000 Server and Client is Windows 2000 Pro. PLogon.bat is store in User Profile.. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ECHO off IF "%OS%" == "Windows_NT" goto NT_OS CALL \\bstl_svr1\netlogon\kix32 PLogon9x.kix EXIT :NT_OS call \\bstl_svr1\netlogon\kix32 \\bstl_svr1\netlogon\PLogonNT.kix EXIT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PLogon9x.kix (for windows 9x) ********************************************** ? "Setting Win9x variables...please, wait." ; SHELL "winset.exe USERNAME=''" SHELL "winset.exe USERNAME=@USERID" ; SHELL "Winset.exe ADDRESS=@ADDRESS" ; SHELL "Winset.exe COMPUTER=@WKSTA" ; SHELL "Winset.exe DOMAIN=@DOMAIN" ; SHELL "Winset.exe COMMENT=@COMMENT" ; SHELL "Winset.exe FULLNAME=@FULLNAME" ; SHELL "Winset.exe HOMEDIR=@HOMEDIR" ; SHELL "Winset.exe HOMESHR=@HOMESHR" ; SHELL "Winset.exe LSERVER=@LSERVER" ; SHELL "Winset.exe PRIV=@PRIV" ? "Done." ? "Map Network drive (User)..." SHELL "net use * \\bstl_svr3\@USERID$ /no" IF Ingroup ("MK11") = 1 shell "net use * \\bstl_svr3\DocMK11$ /no" shell "net use * \\bstl_svr3\ShareDoc /no" shell "\\bstl_svr1\ofcscan\autopcc.exe" ENDIF exit ********************************************** PLogonNT.kix (for Windows NT,xp, 2000) &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& shell "net use * \\bstl_svr3\%username%$ /Persistent:no" IF Ingroup ("MK11") = 1 shell "net use * \\bstl_svr3\DocMK11$ /Persistent:no" shell "\\bstl_svr1\ofcscan\autopcc.exe" ENDIF &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& I got error when user logon to domain and run scrip PLogon.bat at first time.. Error is Server can't sync clock with PDC... If I wait a few minute.. and run Plogon.bat again, It works.. What happend? My Server service: Kxrpc is started, Windows Time is started. Help me please... Pech |
||||||||
|
|
|||||||
Pech, What version of KiXtart are you running? Where are you setting time in this code? If you have upgraded your clients to version 4.x, did you get all DLLs, EXEs, etc.? Why are you using (for example) - code:??SHELL "net use * \\bstl_svr3\@USERID$ /no" Why not use instead - code:Thanks,USE F: "\\bstl_svr3\@USERID$" Kent |
||||||||
|
|
|||||||
pech, you should use the same topic and not start a new one and ask same question again once a week. http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=1;t=005992   |
||||||||
|
|
|||||||
I have not a problem with my script. (shell "net use * \\bstl_svr3\%username%$ /Persistent:no") <-- no problem. But I have a problem when I start run script at first time. If I wait a few minutes and run script again, It works. My error is : Server can't sync clock with PDC. Kixtart : 4.11 Please tell me more Pech Prevoiusly I never got any problem. After |
||||||||
|
|
|||||||
Pech: The 'no problem' is not an issue. An issue is that you should rather use the KiXtart-native USE statement than SHELLing out again. What's the point of using KiXtart if you do everything with non-KiXtart commands anyway. You should also not hard-code the call to your login server, it is not considered 'best practice'. Why do you manually sync the time if there's the build-in Time Server service? The recommended setup for Windows 2000/XP is to synchronize the time automatically through the time server. There is ABSOLUTELY NO NEED for ordinary users to manually sync time or even sync time through the login script because you will have to adjust security permissions to actually give ordinary users the right to change the system time. Why do you want to make it more complicated if there's an easy solution? |
||||||||
|
|
|||||||
To.Jens How I can config The Windows Time Server.. It's problem with Client are Windows XP, NT, 2000. I don't why? If I wait a few minutes and run PLogon.bat again It's work.. But at first login failed.. Pech |
||||||||
|
|
|||||||
Pech, It looks like you have two things going on here.. Maybe a couple of Microsoft "Q" Articles to get you started: Login Script - A Logon Script Does Not Work If %0 or %0\..\ Calls Multiple Commands Time Server Setup/Info - How to Configure an Authoritative Time Server in Windows 2000 (Q216734) How Machines Determine the Time Source Server Using NET TIME (Q156460) "Could Not Locate a Time Server" After Setting SNTP Time Server Using NET TIME Command (Q243574) HTH, Kent |
||||||||
|
|
|||||||
Kent, I visit the link (microsoft), but I try to do with my server (windows 2000), but cann't solved my problem, First login failed.. with Error 2457 "Server clock cannot sync with PDC). After that I've to wait a few minutes and run script by manual, It works!!! I don't khow why not? Help PEch |
||||||||
|
|
|||||||
eh, login failed? if your login failes it can't actually be nothing related to time service. anyway, does your w2k PDC have time service configured? if you do not have w2k PDC it will not work with defaults. |
||||||||
|
|
|||||||
I didn't config the time service. Time Service is started.. I never get right to any person to sync clock. How I can disable automatic sync clock with Server. When I use Shell command ,,, an error has occured.. If I use command : use * \\domain\share This command doesn't do anything. Pech |
||||||||
|
|
|||||||
Pech: Please take a look a the required syntax for USe in the KiXtart Manual. your USE command has to look like this: code:Also, the Time Service is AFAIK required in an AD domain in order to successfully authenticate Kerberos passwords. The link provided to you do explain how to correctly set up the time service please do so.use * '\\server\share' Regular users do not require the right to change the system time, changing the system time would indicate malicious intent. [ 01. November 2002, 14:46: Message edited by: sealeopard ] |
||||||||
|
|
|||||||
Now I can solved the windows time problem, because I used command shell.. I think it's not support with Kix. But I have a new problem. First logon it has not no error, but logon script use f: "\\domain\share" It's not do anything. If I wait a few minutes and run that's script by manual, It work!. Please advice me. Pech |
||||||||
|
|
|||||||
command shell? we have no clue what you are talking about as you don't let us to see your current script. this use line we have seen multiple times already and I say, I believe it has nothing to do with the actual problem. first hit would be to know do you still have the bat calling kix as it can't run that way. use these lines for nt/w2k/xp: :NT_OS kix32 PLogonNT.kix EXIT |
||||||||
|
|
|||||||
Logon.bat ************************************************* ECHO ON set path=c:\winnt\system32;\\bstl_svr1\netlogon; IF "%OS%" == "Windows_NT" goto NT_OS CALL \\bstl_svr1\netlogon\kix32.exe Logon9x.bat EXIT :NT_OS call \\bstl_svr1\netlogon\kix32.exe \\bstl_svr1\netlogon\LogonNT.kix EXIT ************************************************* Logon9x.bat ------------------------------------------------- ? "Setting Win9x variables...please, wait." SHELL "winset.exe USERNAME=@USERID" ? "Done." ? "Map Network drive (User)..." SHELL "net use * \\bstl_svr3\@USERID$ /no" IF Ingroup ("MK11") = 1 shell "net use * \\bstl_svr3\DocMK11$ /no" shell "net use * \\bstl_svr3\ShareDoc /no" shell "\\bstl_svr1\ofcscan\autopcc.exe" ENDIF ------------------------------------------------ LogonNT.kix ------------------------------------------------ use "*" /delete use h: "\\bstl_svr3\%username%$" IF Ingroup ("MK11") = 1 use i: "\\bstl_svr3\DocMK11$" run "\\bstl_svr1\ofcscan\autopcc.exe" ENDIF ----------------------------------------------- It has problem with LogonNT.kix only (Windows NT,2000,xp) When user start to login. (LogonNT.kix)command map drive (use) does not do anything, but run command done only.If user with a few minutes and run Script (Longon.bat-> LogonNT.kix) by manual it work. Why not? Pech |
||||||||
|
|
|||||||
I don't know about how it actually works but call is made for calling batch files. so, first start by correcting your logon.bat: Logon.bat ************************************************* ECHO ON set path=c:\winnt\system32;\\bstl_svr1\netlogon; IF "%OS%" == "Windows_NT" goto NT_OS z:\kix32.exe Logon9x.bat EXIT :NT_OS kix32.exe LogonNT.kix EXIT ************************************************* |
||||||||
|
|
|||||||
No problem with Logon.bat --> call Logon9x.bat But I have only problem with LogonNT.kix Command USE does not do anything.. Command RUN done. This problem has a first logon only. If I wait a few minutes and run script (Logon.bat) by manual It work! Pech |
||||||||
|
|
|||||||
well, you say that it's failing first logon only. nope, when you say that it runs manually after waiting five minutes, you say that it does not work at all in netlogon. |
||||||||
|
|
|||||||
If run script by manual in NETLOGON. It works. But I have to wait a few min. Pech |
||||||||
|
|
|||||||
also, does both use lines fail or only other one? then you could try with this version and post it's givings: code:waiting for reply. and please change at least that nt part of your logon.bat"nt logonscript" [ 31. October 2002, 03:30: Message edited by: Lonkero ] |
||||||||
|
|
|||||||
No meaning... Same like me. Cann't solved the problem, If I wait a few min it works. Pech |
||||||||
|
|
|||||||
pech, what means no meaning. could you be so kind that you give the output of the script window to us, please. |
||||||||
|
|
|||||||
I meant the result same as my script (LogonNT.kix) I cann't give the screen to you, coz .. no action to do anything with USE command.. (first logon) Pech |
||||||||
|
|
|||||||
pech, I don't quite follow... I know that you have said about ten times that it does not work. what I don't know where the error is. instead of repeating that it does not work you could say what error kix gives you. now, I thought that if I set up a script for you with error codes and all, you could give back the errors. eh, maybe I just asked too much. |
||||||||
|
|
|||||||
I meant my LogonNT.kix USE command cann't map drive. When I login to network at first time. Logon.bat and Than call to LogonNT.kix. USE "*" /delete --> Disconnect from all map drive : Work USE H: "\\bstl_svr3\%username%$" --> Map drive, but It can't map drive with No any error. Shell "\\bstl_svr3\ofscan\autopcc.exe" --> Antivirus update pattern : Worked and No any error. After finished the run script. I open in my computer, no network drive mapping. And The I wait a few minute and run script by manual. (\\bstl_svr1\netlogon\logon.bat) Map drive is working. Pech |
||||||||
|
|
|||||||
so, what is the difference with "work" and "no any error" I understand it as they are all the same and the logonscript returns you: quote:is this the case? |
||||||||
|
|
|||||||
delete persistent mappings: Command completed succesfully mapping h: to homeshare: Command completed but NOT succesfully: Cann't Map drive and no any error mapping i: to groupshare: Command completed NOT succesfully: Cann't Map drive and no any error logonscript ran press any key to close window |
||||||||
|
|
|||||||
eh, there is no error if it says command completed successfully and I quess that is the case even though you again didn't show it. dunno, you have a habit of repeating I know that it does not work. so, did you do it with your own script or with copy&pasted one from my previous post? the last thing I'm after with this is that if you used my script, I changed the run to shell. in some cases that has affect too. ok, do you have changed the logon.bat already on the part of calling the kix in nt-section? |
||||||||
|
|
|||||||
also, I asked for the @dos, @kix and @ldrive results in the script but seems that your kix is broken as it denies the pleasure of showing those... |
||||||||
|
|
|||||||
Result: ---------------------------------------- 4.11 5.0 \\bstl_svr1\netlogon\ delete persisten mapping : The operation completed succusesfull mapping h: to home share : An extended error has occurred. longonscript ran press any key to close windows. ---------------------------------------- That's it! Pech |
||||||||
|
|
|||||||
thank you! now we know the error! and that it never goes to the ingroup. that means also that the run or shell does not run either. could you change the @serror to @error to see the errorcode number and I'll start searching for the explanation. and, you didn't answer on that logon.bat part. did you change the ntlogon.kix line? |
||||||||
|
|
|||||||
Result: ---------------------------------------- 4.11 5.0 \\bstl_svr1\netlogon\ delete persisten mapping : 0 mapping h: to home share : 1208 mapping h: to group share : 1208 longonscript ran press any key to close windows. ---------------------------------------- That's it! Pech |
||||||||
|
|
|||||||
changed that logon.bat? |
||||||||
|
|
|||||||
ECHO ON IF "%OS%" == "Windows_NT" goto NT_OS CALL \\bstl_svr1\netlogon\kix32.exe PLogon9x.kix EXIT :NT_OS CALL \\bstl_svr1\netlogon\kix32.exe \\bstl_svr1\netlogon\PLogonNT.kix EXIT How to change? Pech |
||||||||
|
|
|||||||
like I wrote it about 12 replies before if you open commandline and type "call /?" you see that it may not be used for calling an exe. so, make your logon.bat as: ECHO ON IF "%OS%" == "Windows_NT" goto NT_OS z:\kix32.exe z:\PLogon9x.kix EXIT :NT_OS kix32.exe PLogonNT.kix EXIT tell also does that remove the error, or do I start looking for explanation. that error is so spooky that I want "us" to try normalizing before the search... [ 31. October 2002, 05:21: Message edited by: Lonkero ] |
||||||||
|
|
|||||||
If I dint specify path of netlogon \\bstl_svr1\netlogon\ kix32.exe--> Bad command cann't find this command or paht of command ----------------------------------------------- ECHO ON IF "%OS%" == "Windows_NT" goto NT_OS \\bstl_svr1\netlogon\kix32.exe \\bstl_svr1\netlogon\PLogon9x.kix EXIT :NT_OS \\bstl_svr1\netlogon\kix32.exe \\bstl_svr1\netlogon\PLogonNT.kix EXIT ----------------------------------------------- Error code in LogonNT.kix in Map drive is : 1208 |
||||||||
|
|
|||||||
can't find command? how are you running the batch? if you have nt-domain, what is specified as logonscript in usermanager? |
||||||||
|
|
|||||||
Your script ECHO ON IF "%OS%" == "Windows_NT" goto NT_OS z:\kix32.exe z:\PLogon9x.kix EXIT :NT_OS kix32.exe PLogonNT.kix EXIT Has error because, not spectify path I keep kix32.exe in \\bstl_svr1\netlogon, I must specify path for kix32 My Script ECHO ON IF "%OS%" == "Windows_NT" goto NT_OS \\bstl_svr1\netlogon\kix32.exe \\bstl_svr1\netlogon\PLogon9x.kix EXIT :NT_OS \\bstl_svr1\netlogon\kix32.exe \\bstl_svr1\netlogon\PLogonNT.kix EXIT ** I put PLogon.bat in Profile (User property) Also It has no error with PLogon.bat. An Error has occurred with PLogonNT.kix Pech |
||||||||
|
|
|||||||
for nt/w2k/xp there is no need to specify path during logon if the script and kix32 is in netlogon. for win9x the z: drive is mapped automatically to netlogon during logon. but, if you get error with that, it means that you don't have the kix32 in the netlogon server. you may also have problems in your network elsewhere. I had 3 weeks ago broken DNS setup and caused half of the wksta's to fail to run the script. with windows NT/2000/xp you can put in your usermanager: kix32 logon.kix and it works too. if not there is error somewhere. so, now I must ask, does all your logonservers have the script and kix32 in their netlogon or just that one? |
||||||||
|
|
|||||||
Impossible I keep kix32.exe in \\bstl_svr1\netlogon (Only one DC) When I browser the network,I can see all the file in this file sharing (\\bstl_svr1\netlogon). If I'm specify path I can't run it. In our network, my client has many client such as 98,NT,2000 and XP. How I can specify the script in User Profile. Pech |
||||||||
|
|
|||||||
like you said you did for the bat. anyway, you should not run netlogon service on any server not having the script. all dc's should indeed have those scripts in netlogon drive. to specify the script directly in profile just write: kix32 scriptname.kix in there. it does not work for win9x but testing purposes it handles. and all users in my lan have that as I've got rid of the decease of win9x. |
||||||||
|
|
|||||||
I just put kix32.exe PLogonNT.kix in User Profile But When I start to logon.. No any action.. How I can handle this error! Pech |
||||||||
|
|
|||||||
is it possible for you to put the files on all dc's in the netlogon? the no action is just normally the result of not finding the program which in this case is kix32 |
||||||||
|
|
|||||||
Pech: Please do us a favor and go back to square one! a) Remove all yoru scripts/files for the domain controller's NETLOGON share. b) Put a login.bat into the NETLOGON share, e.g. the one in Kixtart Starter's Guide with the call to KiXtart commented out. c) Have your users call the login.bat d) Make sure it works. e) Removed the comment to enable call to KiXtart f) Use simple KiXtart script to verify that login script runs by e..g displaying a messagebox. g) Add parts to login script and test. Also, please be more precise in your answers. |
||||||||
|
|
|||||||
I have only one DC. I put PLogon.bat in \\...\netlogon and login it works If I specify in PLogon.bat kix32.exe Plogon.kix (not specifiy path) system command error, coz cannot find kix32.exe and Plogon.kix If I put Kix32 PLogon.Kix in User Profile..Does not do anything. Pech |
||||||||
|
|
|||||||
Pech, I see you are having some trouble with deployment/running your scripts.. I would recommend the following as it was interesting exercise for us in how to do an upgrade to KiXtart 4.x.. Starting with your NTLOGON.BAT file, please read: Q318689 and yes this is a Microsoft article, but is worth the read. However, if we look at Deployment of Kix Scripts and then look at Page 2.. We see that we can distill or get what we need out of the script. Once you get your NTLOGON.BAT which is what is commonly named, you can then start working on the KiXtart piece. Oh, you called yours PLOGON.BAT. HTH, Kent [ 01. November 2002, 04:57: Message edited by: kdyer ] |
||||||||
|
|
|||||||
I have still an error code : 1208 when I use command to map drive use H: "\\...\sharename" How I can handle this error it? |
||||||||
|
|
|||||||
Pech, If we look at the manual for the syntax of how to map a share.. quote:Or, it could be somewhat similar to: quote:{Edit} - We find what you are looking for: code:HTH,USE H: "\\bstl_svr3\" + @USERID + "$" Kent [ 01. November 2002, 14:11: Message edited by: kdyer ] |
||||||||
|
|
|||||||
quote: |
||||||||
|
|
|||||||
so question is, do you have license manager running? |
||||||||
|
|
|||||||
In Windows NT, 2000 and XP I have to use command for map drive like this USE H: "\\server\%username%" ----------- My Server has licensing manager to control license. And Licensing Log Service is started. If you think like this, may be wrong. Because First logon.. Failed (Error 1208) Wait and Run script by manual.. It works! Pech |
||||||||
|
|
|||||||
Pech, Most Administrators would map drives this way.. code:But you may not be using hidden shares, so it would be:USE H: "\\server\" + @USERID + "$" code:The point being, why aren't you using the KiXtart Macros like @USERID?USE H: "\\server\" + @USERID Kent |
||||||||
|
|
|||||||
What is a different between? For Windows 9x USE H: \\server\@userid Fow Windows NT, 2000, XP USE H: \\server\%username% Right? Pech |
||||||||
|
|
|||||||
One thing, you are missing quotes. It is - code:And again, if you have hidden shares (which would be normal for user information):USE H: "\\SERVER\" + @USERID code:The other is if you can maintain a consistent standard between 9x and NT-based machines, it will be easier for you.USE H: "\\SERVER\" + @USERID + "$" If you need or must use %username% under 9x, you would than need to do something like - JSI Tip 1786. Another way to set %UserName%, %ComputerName%, and %LogonServer% for W9x. HTH, Kent |
||||||||
|
|
|||||||
To Kent I have not any problem with Client Windows 9x. But In Windows 2000, NT, XP client. I got an error, when I logon at first time : error code :1208 If I wait a few minute and run script by manual, it works. (USE H: "\\server\%username%"), failed only at first login. Pech |
||||||||
|
|
|||||||
Pech, Let's start with some questions: Starting from the top..
But, the macros are easy and quick to use. KiX Macros tend to be more accurate too. However, the Macros are especially handy with Windows 9x. If you want to use environment variables outside of Windows and in a DOS Session. You will need to use: WINSET.EXE PUTINENV.EXE The question being, if you can do this stuff in KiXtart, why use extra utilities? Now, back on task here.. Using the information that you have told us.. The following has been compiled together. This is using some ideas from - http://support.microsoft.com/default.aspx?scid=kb;en-us;Q318689 There are some errors with Microsoft's code, but has good ideas.
code:Left out the 9x script as it appears to work ok..@ECHO off :: -- Note: the correction here Added in some more detection PLogonNT.kix code:We could actually combine PLogon9x.kix and PLogonNT.kix into one script:? "Map Network drive (User)..." KiXtart.kix code:So, if we do that change.. PLogon.bat becomes the following:? "Map Network drive (User)..." PLOGON.BAT code:Time to go to bed..@ECHO off :: -- Note: the correction here Kent [ 07. November 2002, 08:54: Message edited by: kdyer ] |