The userAccountControl attribute can be comprised of multiple settings.
If another bit is set for a user then the attribute value would be
different.  The way I implemented it here was to decode the value into
its various settings.  Attached is a .Net function that returns the
settings of a  userAccountControl value.

The attachment is a zip file - rename the file extension to .zip to
open.

Even though this function is written in VB.Net you could use similar
logic to convert it to a function in your DBMS.  If all you want is to
determine if the account is active or not, here is a function (SQL
Server format) that returns 1 if a particular bit is set and 0 if not:


CREATE FUNCTION dbo.udf_Bitwise
(
@Value INT,
@BitValue INT
)
RETURNS BIT
/*
Returns 1 if @BitValue is set in @Value, else 0.
*/
AS  
BEGIN 
        IF (@Value | @BitValue) = @Value 
                RETURN 1

RETURN 0

END


In your workflow run a Set Fields SQL of   SELECT dbo.udf_Bitwise($Value
of userAccountControl$, 2)

2 is the ACCOUNTDISABLE bit.  The rest of the potential values are
included in the attachment.

Stephen



-----Original Message-----
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Lisa Estrella
Sent: Friday, September 08, 2006 5:03 PM
To: [email protected]
Subject: Re: Active Directory Attribute for Disabled Accounts

We use the following for disabled accounts:

(( $userAccountControl$ = 514) OR ( $userAccountControl$ = 66050))

HTH,
Lisa



-----Original Message-----
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Tilton, Claire E Ms NGB-ARNG
Sent: Friday, September 08, 2006 4:26 PM
To: [email protected]
Subject: Active Directory Attribute for Disabled Accounts

Does anyone happen to know the AD attribute that indicates whether an
account is disabled?

We are just adding fields to our vendor form and then seeing if that is
the correct field.  It is getting kind of old.  We looked at a couple of
scripting articles but we are obviously not looking in the right places.


 

Thanks in Advance, 

Claire Tilton

703.607.7412

________________________________________________________________________
_______
UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org
PKB+5Ø{ªïuserAccountControl_Decode.txt­—ßo›0Çß+õ°¢ij¥j
¿"-.¸-*`fL<YkʺH)™R˜¶ÿ~†a‚yºä)`û{Ÿ¹ó]R½lÖ+DŠêeù¯VÛª(½mQî¶A•ëmñq~†Ú_ê± 
áh‰Œîö<šÅÜR|9fvcw4"~À#ß²€_ŽºÝhH½{š5r³îm‚ÓôÑ1årU½Â2ƒ޹ðîp|[œÙÝ{ì9áÄœ<q‘ÈÉ8
éccÛ0ëœD‰ð³$<̉h·Qó;
MLY„CeÔ1œ æ„ù4ÂA,8ËR®ÊLmÅÚ#e÷)Ç< Ã™öt¡XL       { 
l0É5ŠaŸJ§D:U4>¡¬ÞàÌq,E*ŠSÒ[i²Ó1,c:W”Ò3îa櫇dÎLÃV¼ÚÀHŸÞP&|’Ûf#µ7LÛt]Õ]ü0aïqég®
 e)‘RqOžÃçÆQ‹¹áoN҈„œñ»ÚEÆÂ¶¦
ÑaÓ­š/ËrÝÙÔRs*j™!½1›Ïç¦Ñ;îýTs¬:IJǶ_")^›˜9?Û?'û0º©ŠU0¨†’Ÿ¯¶¯ùÅõ߇ïÍ8Â((Êü-ß]ÖÿÓr·.ޔí‡nÑý~‰«ÍѝnøëMÿ™ˆüY—ÿñG¯ßËËjWHª*ï
KåÉä°»Öþ…Æ‚´;ž6¾ì³Å¥Ó,m¸TãËÞÓg4¹jÓ͈ÑOPœ¾ë87ÀŽ¥ hmbµ
Pþ]àéK¹…àhŠoü`Ž‹Bqõ1U/ÅìW¼¾k´ŽjBaG« ì¨&VWˆA.3QWurPÄA
àhxPüBx [EMAIL PROTECTED]
×±ÔI¢Véo «H¤²QÚ*h]£H*ôÝÜ   ‚B/MG        
^¯WÛ/AÑúõӅ²ü
Y—]ûzhÿPKB+5Ø{ªï 
userAccountControl_Decode.txtPKK*

Reply via email to