Page 3 of 9 <12345>Last »
Topic Options
#73497 - 2003-03-04 04:44 PM Re: Problem with kixtart and NT4.0
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Why are you talking about login?

You should run the script on one fo the DCs formt he command line. This script has nothign to do with login script. It's a one-time-only script.

It will set the login script for all users in OU=Test.

Thus set the login script to soemthign and check after running the script whether it has changed.
_________________________
There are two types of vessels, submarines and targets.

Top
#73498 - 2003-03-04 04:49 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
Starting to like KiXtart

Registered: 2003-02-21
Posts: 185
Oh Oh now I get it. Geez I feel dumb, now I get it. Okay I will run that on the Sussex1 DC.
Do you think from what you can tell that I have that syntax right or is there anything missing on that code?

Top
#73499 - 2003-03-04 04:53 PM Re: Problem with kixtart and NT4.0
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
In general, it does look okay to me. Also, it's always good to first test a script before letting it out into the wild.

You must run it under an account that has aD amdin privileges. Also, change the code to:
code:
Break ON
; uncomment the next lien 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=Users,ou=Test,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

to provide mote insight into what's happening.
_________________________
There are two types of vessels, submarines and targets.

Top
#73500 - 2003-03-04 04:54 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
Starting to like KiXtart

Registered: 2003-02-21
Posts: 185
code:
Break ON
; Example of LDAP call. GetObject("LDAP://[B]ou=Users,ou=Test[/B],dc=sussexcounty,dc=net")
; 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=Users,ou=Test,dc=sussexcounty,dc=net")
$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.
; $user.SetInfo ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat.
EndIf
Next

Do I need the Users and Test OU's listed?

Top
#73501 - 2003-03-04 04:56 PM Re: Problem with kixtart and NT4.0
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Yes, you must define the OU that the script applies to. Give it a try, check the error messages and report back.
_________________________
There are two types of vessels, submarines and targets.

Top
#73502 - 2003-03-04 04:58 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
Starting to like KiXtart

Registered: 2003-02-21
Posts: 185
I run it from my workstation i get "there is no such object on the server".

Plus do I call this from a batch file because the DC isn't going to know what to do with a kix file.

Top
#73503 - 2003-03-04 05:00 PM Re: Problem with kixtart and NT4.0
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Then it seems that you don't have the correct OUs specified.
_________________________
There are two types of vessels, submarines and targets.

Top
#73504 - 2003-03-04 05:03 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
Starting to like KiXtart

Registered: 2003-02-21
Posts: 185
But they are the names of the OU's.
I am looking at it in AD

Here is the heirarchy structure:

sussexcounty.net
->AdminBldg
->Information Systems
-> Test

Top
#73505 - 2003-03-04 05:04 PM Re: Problem with kixtart and NT4.0
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
You can use the TranslateName() UDF and a @ldomain\@userid to return the distinguished name. From that you simply remove the CN=userid, and have the DN for the OU.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#73506 - 2003-03-04 05:12 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
Starting to like KiXtart

Registered: 2003-02-21
Posts: 185
I added the UDF to my script to run first but I am not sure what needs to be changed to conform to my domain. So the syntax is correct.
Top
#73507 - 2003-03-04 05:14 PM Re: Problem with kixtart and NT4.0
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Use TranslateName() and post the string you get. I'm sure we can then tell you what parts you need to write where.

Take a look at the FAQ Forum if you want to know 'How To Use UDFs'.
_________________________
There are two types of vessels, submarines and targets.

Top
#73508 - 2003-03-04 05:16 PM Re: Problem with kixtart and NT4.0
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
The use of the TranslateName UDF would be just to get the DN of one of your users since it appears that based on a previous post you could not find the user's OU.

Use this example:
code:
$DN = TranslateName (3, "", 3, "@LDomain\@userid", 1)
? "DN = " + $DN[0]
? "Error = " + $DN[1]
? "ErrorText = " + $DN[2]

_________________________
Home page: http://www.kixhelp.com/hb/

Top
#73509 - 2003-03-04 05:19 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
Starting to like KiXtart

Registered: 2003-02-21
Posts: 185
Here is what I get when I run it.

L : 0 = -2147016656 - There is no such object on the server. -- Extended Error:
C:\Documents and Settings\mmontgomery\Desktop\Kixstart 2001 4.20>

Top
#73510 - 2003-03-04 05:22 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
Starting to like KiXtart

Registered: 2003-02-21
Posts: 185
I also added that example and I get this now.

L : 0 = -2147016656 - There is no such object on the server. -- Extended Error:
ssexcounty,DC=net. Montgomery,OU=Users,OU=Information Systems,OU=AdminBldg,DC=su
Error = 0
ErrorText = The operation completed successfully.
C:\Documents and Settings\mmontgomery\Desktop\Kixstart 2001 4.20>

Top
#73511 - 2003-03-04 05:22 PM Re: Problem with kixtart and NT4.0
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
What is the OS of your computer where you are running the script? What was the script use executed?

Have you tried the WinNT:// provider?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#73512 - 2003-03-04 05:24 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
Starting to like KiXtart

Registered: 2003-02-21
Posts: 185
I am running the script on XP Pro

The script name is ldap.kix

NT4 not sure what you mean.

I am new at this.

Top
#73513 - 2003-03-04 05:26 PM Re: Problem with kixtart and NT4.0
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Please only run the example posted. What is the result? Please post your test script as well.

[ 04. March 2003, 17:27: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#73514 - 2003-03-04 05:27 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
Starting to like KiXtart

Registered: 2003-02-21
Posts: 185
If I use only that example posted I get this:

ERROR : expected expression!
Script: \\Sussex1\NETLOGON\LDAP.kix
Line : 0

Top
#73515 - 2003-03-04 05:30 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
Starting to like KiXtart

Registered: 2003-02-21
Posts: 185
I am running this script from the Kixscript Editor. Should I be running this from a batch file? If so what needs to go in it. I have tried creating a ldap.bat that has
Kix32.exe ldap.kix and it doesn't run, it says unable to find/open script.

Man this is confusing. I thought this was easier.

Top
#73516 - 2003-03-04 05:33 PM Re: Problem with kixtart and NT4.0
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
It would be easy if you would read the manual and the FAQ Forum. You also seem to have only minimal administrative experience which also doesn't help.

Create a folder and put the KiXtart executable and the script into it. Edit the script in Notepad. open a command prompt and switch into the directory that contains your script and the Kixtart executable.

Run the script by typing 'kix32 ldap.kix' at the command prompt. Also, please post the script you're using (in between [CODE] tags).
_________________________
There are two types of vessels, submarines and targets.

Top
Page 3 of 9 <12345>Last »


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

Who's Online
0 registered and 833 anonymous users online.
Newest Members
Timothy, Jojo67, MaikSimon, kvn317, kixtarts2025
17874 Registered Users

Generated in 0.076 seconds in which 0.027 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