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
PK B+5Ø{ªï userAccountControl_Decode.txtßo0Çß+õ°¢ij¥j
¿"-.¸-*`fL<YkʺH)R¶ÿ~ayºä)`û{¹ó]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ó;
MLYCeÔ1 æù4ÂA,8ËR®ÊLmÅÚ#e÷)Ç< Ãöt¡XL {
l0É5aJ§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¹
àhoü`Bqõ1 U/ÅìW ¼¾k´jBaG« ì¨&VWA.3QWurPÄA
àhxPüBx [EMAIL PROTECTED]
×±ÔI¢Véo «H¤²QÚ*h]£H*ôÝÜ B/MG
^¯WÛ/AÑúõÓ
²ü
Y]ûzhÿPK B+5Ø{ªï
userAccountControl_Decode.txtPK K *