Page 1 of 1 1
Topic Options
#85688 - 2002-05-16 02:36 PM Get ADS User-Attributes
carstenschaefer Offline
Lurker

Registered: 2002-05-16
Posts: 2
Hi there!
I was already searching for getting an user attribute (Active Directory). Depending on the value I get, I will execute other part of my login script.
How can I accomplish this?

Thanks

Carsten

Top
#85689 - 2002-05-16 02:39 PM Re: Get ADS User-Attributes
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
It would help to know what particular "attribute" you want to use when making your decision.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#85690 - 2002-05-16 04:14 PM Re: Get ADS User-Attributes
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
code:
$objUser = getobject('WinNT://'+@LDOMAIN+'/'+@USERID+',user')
$property=$objUser.FullName

; method 1
SELECT
CASE $property='The Boss'
;do stuff
CASE $property='The Underling'
; do other stuff
CASE 1
; no property mathes, so do nothing or something else
ENDSELECT


; method 2( for binary decision)
IF $property=''
? 'No full name provided'
; do stuff
ELSE
; do other stuff
ENDIF

Alternatively, one can use the LDAP Provider instead of the WinNT provider in an Active Directory domain. The WinNT provider is primarily for Windows NT 4.0 domains.

[ 16 May 2002, 17:04: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#85691 - 2002-05-21 06:56 PM Re: Get ADS User-Attributes
SoupBoy Offline
Fresh Scripter

Registered: 2002-05-02
Posts: 7
Loc: Wisconsin
The ADSI provider (http://www.microsoft.com/NTWorkstation/downloads/Other/ADSI25.asp) would need to be installed on your users' NT workstations to use sealeopard's script as a logon script. If you do have NT workstations, I suggest using the WinNT provider if possible...however using LDAP provider will give you many many more properties.
Top
#85692 - 2002-05-21 07:46 PM Re: Get ADS User-Attributes
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
FYI Jens and others...

You should be using LDAP for Active Directory and WinNT for NT 4.0

Here is a post I made on this issue. I updated it this morning with the KiXtart code as well and not just the VB.

GetObject WinNT vs GetObject LDAP

[ 21 May 2002, 19:47: Message edited by: NTDOC ]

Top
#85693 - 2002-05-21 09:32 PM Re: Get ADS User-Attributes
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
NTDOC, that's exactly what I wrote in my post above:
quote:
Alternatively, one can use the LDAP Provider instead of the WinNT provider in an Active Directory domain. The WinNT provider is primarily for Windows NT 4.0 domains.
_________________________
There are two types of vessels, submarines and targets.

Top
#85694 - 2002-05-21 11:52 PM Re: Get ADS User-Attributes
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Sorry Boss... I'm a bad boy [Frown]

Saw the code snipet and did not real your note below it.

Top
#85695 - 2002-05-27 01:22 PM Re: Get ADS User-Attributes
carstenschaefer Offline
Lurker

Registered: 2002-05-16
Posts: 2
Thank you all for your help!

BTW, I'd like to read the c-Attribute (country) to decide which action in my loginscript is run for the user currently logging on.

Carsten

Top
Page 1 of 1 1


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

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.088 seconds in which 0.033 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