Page 5 of 9 « First<34567>Last »
Topic Options
#73537 - 2003-03-04 07:09 PM Re: Problem with kixtart and NT4.0
Howard Bullock Offline
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 ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#73538 - 2003-03-04 07:28 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
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
#73539 - 2003-03-04 07:29 PM Re: Problem with kixtart and NT4.0
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11163
Loc: Boston, MA, USA
Yes, this is what is supposed to happen.
_________________________
There are two types of vessels, submarines and targets.

Top
#73540 - 2003-03-04 07:31 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
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
#73541 - 2003-03-04 07:33 PM Re: Problem with kixtart and NT4.0
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11163
Loc: Boston, MA, USA
What does the 'current script' and 'changed ' text output lines state? They should reflect the changes made.
_________________________
There are two types of vessels, submarines and targets.

Top
#73542 - 2003-03-04 07:58 PM Re: Problem with kixtart and NT4.0
Howard Bullock Offline
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.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#73543 - 2003-03-04 08:03 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
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 Offline
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 Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11163
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 Offline
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
#73547 - 2003-03-04 08:26 PM Re: Problem with kixtart and NT4.0
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11163
Loc: Boston, MA, USA
Could you please copy the complete output from your script to this board?
_________________________
There are two types of vessels, submarines and targets.

Top
#73548 - 2003-03-04 08:30 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
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
#73549 - 2003-03-04 08:36 PM Re: Problem with kixtart and NT4.0
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11163
Loc: Boston, MA, USA
Please run the latest version of the script we posted so that the original assigned login script will get printed, too.
_________________________
There are two types of vessels, submarines and targets.

Top
#73550 - 2003-03-04 08:38 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
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
#73551 - 2003-03-04 08:39 PM Re: Problem with kixtart and NT4.0
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11163
Loc: Boston, MA, USA
Then something seems wrong as it should also display the line 'Assigned login script' for ech user, which it doesn't.
_________________________
There are two types of vessels, submarines and targets.

Top
#73552 - 2003-03-04 08:41 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
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
#73553 - 2003-03-04 08:53 PM Re: Problem with kixtart and NT4.0
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11163
Loc: Boston, MA, USA
Even if they don't have a login script assigned, the text 'Assigned Login Script:' should still be printed to the screen.
_________________________
There are two types of vessels, submarines and targets.

Top
#73554 - 2003-03-04 08:53 PM Re: Problem with kixtart and NT4.0
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11611
Loc: CA
It does for me...
Top
#73555 - 2003-03-04 08:55 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
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 Offline
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
Page 5 of 9 « First<34567>Last »


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 289 anonymous users online.
Newest Members
Praveer, Ollero, rayyo, Foxlicht, DonChild
17742 Registered Users

Generated in 0.045 seconds in which 0.014 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org