Page 1 of 1 1
Topic Options
#213725 - 2019-07-08 11:48 AM First stepps with KiXtart
mdress Offline
Just in Town

Registered: 2019-07-08
Posts: 4
Loc: Germany Bayern
Hello I am sitting for some time to write a login scrpit which I read the first IP address (query for the 2nd octet, if return 10.20 then query for the 3.Oktett) and me on the basis of this data certain printers by location assigns (Say IP address = eg 10.21 then allocation printer pool 10.21, IP address eg 10.22 can not see printer pool 10.21 but only his own with 10.22)

Users are stored by group policy in AD and already sorted by location. Now to my problem I've read several times on the Internet but still found no solution which can present me at least the beginning so I can add the rest only by paperwork.

I am supposed to use KIXtart32 due to company requirement, but I'm working on it for the first time.

Can one help me with this?

Best regards mdress

Top
#213727 - 2019-07-08 02:03 PM Re: First stepps with KiXtart [Re: mdress]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
MDress

Welcome to KORG!

You should really be using a function to determine subnet mappings as looking at the individual octets can be challenging at best.

We offer a pre-written login script that uses a simple configuration file to manage the settings. It's written in Kix and supports custom modules that you can write.

Built in capabilities include mapping drives/printers by group, User OU, Computer OU, AD Site, AD Attribute Subnet, and UserID. It can use most of those attributes to look up a resource path, allowing a single configuration item to have hundreds of different options to greatly simplify configuration. Alternate Mapping support maps to a primary path, then connect to a secondary path if the first is unresponsive for D-R. It supports 6 built-in languages and can be easily customized to support any language.

It is free for environments with up to 2 domain controllers. Download it from www.mspbuilder.com. Create an account and you'll have access to the Downloads/Software section.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#213728 - 2019-07-08 03:12 PM Re: First stepps with KiXtart [Re: mdress]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
Hi mdress,

I know Glenn offers a very nice solution that is very useable. He is very skilled and has helped this community a lot over the years. I prefer writing something myself but that is just personal preference.

This should get you started. I added lots of comments so you can see what is going on and where what happens.

I use the @IPADDRESS0 macro in the example below. this returns the IP address with three places per octet so "10.20.1.2" will be " 10. 20. 1. 2".

 Code:
;Set Break state to On so closing the script is possible without logging off
;In a production environment you may want to remove the Break line or set it to off (same result as removing it).

Break on

;Select which case is true.
;If one case is true all following cases are skipped.
;Case 1 is always true if no case above it is true.
Select
	;Read first 8 characters of @IPADDRESS0
	Case Left(@IPADDRESS0, 8) = " 10. 20."
		;Frist 8 characters are " 10. 20."
		;Display some text on screen.
		? "You are in subnet 10.20."
		;Add nor stuff for subnet 20 here.
	;Read first 8 characters of @IPADDRESS0
	Case Left(@IPADDRESS0, 8) = " 10. 21."
		;Frist 8 characters are " 10. 21."
		;Display some text on screen.
		? "You are in subnet 10.21."
		;Add nor stuff for subnet 21 here.
	;Read first 8 characters of @IPADDRESS0
	Case Left(@IPADDRESS0, 8) = " 10. 22."
		;Frist 8 characters are " 10. 22."
		;Display some text on screen.
		? "You are in subnet 10.22."
		;Add nor stuff for subnet 22 here.
	;Read first 8 characters of @IPADDRESS0
	Case Left(@IPADDRESS0, 8) = " 10. 23."
		;Frist 8 characters are " 10. 23."
		;Display some text on screen.
		? "You are in subnet 10.23."
		;Add nor stuff for subnet 23 here.
		;None of the cases above are true so default to case 1
	Case 1
		? "You are not in subnet 10.20, 10.21, 10.22 or 10.23. Please contact your admin"
EndSelect
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#213729 - 2019-07-08 04:04 PM Re: First stepps with KiXtart [Re: Mart]
mdress Offline
Just in Town

Registered: 2019-07-08
Posts: 4
Loc: Germany Bayern
Thank you very much for your Help
Top
Page 1 of 1 1


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

Who's Online
2 registered (morganw, mole) and 414 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.104 seconds in which 0.071 seconds were spent on a total of 13 queries. Zlib compression enabled.

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