#73537 - 2003-03-04 07:09 PM
Re: Problem with kixtart and NT4.0
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Are you running the DSClient on ALL of your downlevel clients?
If you are you might be able to use the methodology I employ for my corporate logonscript. It calls subscripts based on the clients location in the OU hierarchy.
All of your clients will execute the same base script called from a batch file. The core script then looks at the clients DN and then makes directory paths from the DN. You can place any scripts you want to execute in a directory structure that mimics the OU hierchy and have different scripts execute for different users.
See http://mywebpages.comcast.net/habullock/logon_script_architecture.htm
See my UDF MakePathsFromADlocation() [ 04. March 2003, 19:11: Message edited by: Howard Bullock ]
|
Top
|
|
|
|
#73538 - 2003-03-04 07:28 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
Ok as a test I removed the comments for that script to run.
code:
Break ON ; uncomment the next line to step through the code ; DEBUG ON ; Example of LDAP call. GetObject("LDAP://ou=Users,ou=YourBusinessUnit,dc=YourCompany,dc=com") ; You need to know your LDAP connection. You can maybe find it by checking the propery details on the OU for your users. $target = GetObject("LDAP://OU=Test,OU=Information Systems,OU=AdminBldg,DC=sussexcounty,DC=net") ? 'Error = '+@ERROR+' - '+@SERROR $loginscript="logon.bat" For Each $user in $target If $user.loginscript <> $loginscript ? "Current Script for " +$user.name " is: " +$user.loginscript+ " Should be: " +$loginscript $user.loginscript=$loginscript ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat. ? 'Error = '+@ERROR+' - '+@SERROR $user.SetInfo ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat. ? 'Error = '+@ERROR+' - '+@SERROR ? "Changed current Script for " +$user.name " to: " +$user.loginscript EndIf Next
I have it going to the Test OU in which there are 2 users, currently that have no logon script setup. If I run this with the comments removed are you saying it will automatically assign the logon.bat to those 2 user's profile?
|
Top
|
|
|
|
#73540 - 2003-03-04 07:31 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
It doesn't work. I run the script and says error = 0 but i go to that user's properties and there is no script name in there under their profile.
If I can get this to work I think I will be set to go.
|
Top
|
|
|
|
#73542 - 2003-03-04 07:58 PM
Re: Problem with kixtart and NT4.0
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Do you have more than one DC in the domain? The DC chosen by the script to update the user account may not be the same DC to which your GUI is connected.
|
Top
|
|
|
|
#73543 - 2003-03-04 08:03 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
Error = 0 - The operation completed successfully. C:\WINDOWS>
That's all it says. This is the code I am running.
code:
Break ON ; uncomment the next line to step through the code ; Debug ON ; Example of LDAP call. GetObject("LDAP://ou=Users,ou=YourBusinessUnit,dc=YourCompany,dc=com") ; You need to know your LDAP connection. You can maybe find it by checking the propery details on the OU for your users. $target = GetObject("LDAP://OU=Test,OU=Information Systems,OU=AdminBldg,DC=sussexcounty,DC=net") ? 'Error = '+@ERROR+' - '+@SERROR $loginscript="logon.bat" For Each $user in $target If $user.loginscript <> $loginscript ? "Current Script for " +$user.name " is: " +$user.loginscript+ " Should be: " +$loginscript $user.loginscript=$loginscript ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat. ? 'Error = '+@ERROR+' - '+@SERROR $user.SetInfo ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat. ? 'Error = '+@ERROR+' - '+@SERROR ? "Changed current Script for " +$user.name " to: " +$user.loginscript EndIf Next
|
Top
|
|
|
|
#73544 - 2003-03-04 08:05 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
We do have more than 1 DC in our domain. The DC I am connected to is the one where my GUI is connected.
|
Top
|
|
|
|
#73545 - 2003-03-04 08:20 PM
Re: Problem with kixtart and NT4.0
|
Sealeopard
KiX Master
Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
|
You might want to learn how to modify your script so that it prints more info. Try this:
code:
Break ON ; uncomment the next line to step through the code ; Debug ON ; Example of LDAP call. GetObject("LDAP://ou=Users,ou=YourBusinessUnit,dc=YourCompany,dc=com") ; You need to know your LDAP connection. You can maybe find it by checking the propery details on the OU for your users. $target = GetObject("LDAP://OU=Test,OU=Information Systems,OU=AdminBldg,DC=sussexcounty,DC=net") ? 'Error = '+@ERROR+' - '+@SERROR $loginscript="logon.bat" For Each $user in $target ? 'checking user: '+$user.name ? 'assigned login script: '+$user.loginscript If $user.loginscript <> $loginscript ? "Current Script for " +$user.name " is: " +$user.loginscript+ " Should be: " +$loginscript $user.loginscript=$loginscript ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat. ? 'Error = '+@ERROR+' - '+@SERROR $user.SetInfo ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat. ? 'Error = '+@ERROR+' - '+@SERROR ? "Changed current Script for " +$user.name " to: " +$user.loginscript EndIf Next ? 'If no user was displayed, then no user was retrieved from the OU'
[ 04. March 2003, 20:35: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.
|
Top
|
|
|
|
#73546 - 2003-03-04 08:22 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
Okay I ran that and it did bring back the 2 users in that OU. It didn't assign the logon script in their profiles though.
|
Top
|
|
|
|
#73548 - 2003-03-04 08:30 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
'\\Sussex1\NETLOGON' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory.
Error = 0 - The operation completed successfully. checking user: CN=Kix Test
checking user: CN=Test User
If no user was displayed, then no user was retrieved from the OU C:\WINDOWS>
|
Top
|
|
|
|
#73550 - 2003-03-04 08:38 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
I am using the latest posted script
See:
code:
Break ON ; uncomment the next line to step through the code ; Debug ON ; Example of LDAP call. GetObject("LDAP://ou=Users,ou=YourBusinessUnit,dc=YourCompany,dc=com") ; You need to know your LDAP connection. You can maybe find it by checking the propery details on the OU for your users. $target = GetObject("LDAP://OU=Test,OU=Information Systems,OU=AdminBldg,DC=sussexcounty,DC=net") ? 'Error = '+@ERROR+' - '+@SERROR $loginscript="logon.bat" For Each $user in $target ? 'checking user: '+$user.name ? 'assigned logins cript: '+$user.loginscript If $user.loginscript <> $loginscript ? "Current Script for " +$user.name " is: " +$user.loginscript+ " Should be: " +$loginscript $user.loginscript=$loginscript ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat. ? 'Error = '+@ERROR+' - '+@SERROR $user.SetInfo ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat. ? 'Error = '+@ERROR+' - '+@SERROR ? "Changed current Script for " +$user.name " to: " +$user.loginscript EndIf Next ? 'If no user was displayed, then no user was retrieved from the OU'
|
Top
|
|
|
|
#73552 - 2003-03-04 08:41 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
Well right now those 2 users don't have login scripts assigned. Isn't it supposed to assign it?
|
Top
|
|
|
|
#73555 - 2003-03-04 08:55 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
It does not for me so I don't know what is wrong.
|
Top
|
|
|
|
#73556 - 2003-03-04 09:03 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
NTDOC which code are you using and what OS? I can't get it to display any thing relating to the current login script unless I manually assign it then it picks it up.
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 1083 anonymous users online.
|
|
|