473,397 Members | 2,056 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

ADSI Account Lockout

Hi,

I am looking for a way to use System.DirectoryServices to find all users on
a domain whos accounts are either locked out or disabled. I have used
ADSIEdit and the mmc schema add-in to try and find properties for these
things but have not had any luck so far. Also i did a search on the
Platform SDK doc's. It has examples in VB and C++ but these are not using
DotNet and dont give any hint to a property that may be used. They seem to
call a method directly on a object, and i am sure that method is not
available as part of a DirectoryEntry class.

I have a feeling i may need to do a Invoke (as you do when you reset a users
password from DotNet) if i do have to do this then how can i do a search of
all users in a domain?

I would also like to be able to Enable or Disable a account from my
application (This is Account Lockout and Account Disabled).

thanks for any help anyone can offer.

Arran
Nov 15 '05 #1
14 5193
"Arran Pearce" <ar**********@bacoll.ac.uk> wrote in
news:#m**************@TK2MSFTNGP11.phx.gbl:
Hi,

I am looking for a way to use System.DirectoryServices to find all
users on a domain whos accounts are either locked out or disabled. I
have used ADSIEdit and the mmc schema add-in to try and find
properties for these things but have not had any luck so far. Also i
did a search on the Platform SDK doc's. It has examples in VB and C++
but these are not using DotNet and dont give any hint to a property
that may be used. They seem to call a method directly on a object,
and i am sure that method is not available as part of a DirectoryEntry
class.

I have a feeling i may need to do a Invoke as you do when you reset a
users password from DotNet) if i do have to do this then how can i do
a search of all users in a domain?

I would also like to be able to Enable or Disable a account from my
application (This is Account Lockout and Account Disabled).

thanks for any help anyone can offer.

Arran

When you have your DirectoryEntry with a User (ie deUser) check the
userAccountControl Flag Property:

deUser["userAccountControl"]

if the account is looked due to expiration you may want to check

deUser["accountExpires"]
--
best regards

Peter Koen
-----------------------------------
MCAD, CAI/R, CAI/S, CASE/RS, CAT/RS
http://www.kema.at
Nov 15 '05 #2

Hi Arran,

Just as Peter said, you should use the userAccountControl property.
For Lockout and Disabled acount, you should refer to ADS_UF_LOCKOUT and
ADS_UF_ACCOUNTDISABLE flag which are defined in ADS_USER_FLAG_ENUM enum.
Please refer to ADS_USER_FLAG_ENUM enum at the link below:
http://msdn.microsoft.com/library/de...us/netdir/adsi
/ads_user_flag_enum.asp

You also can find a small sample of how to enable and disable a user acount:
http://msdn.microsoft.com/library/de...us/netdir/netd
s/enabling_and_disabling_the_user_account.asp

If you still have any questions, please feel free to let me know.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Arran Pearce" <ar**********@bacoll.ac.uk>
| Subject: ADSI Account Lockout
| Date: Thu, 23 Oct 2003 19:58:59 +0100
| Lines: 23
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#m**************@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: host213-122-124-127.in-addr.btopenworld.com
213.122.124.127
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:193614
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Hi,
|
| I am looking for a way to use System.DirectoryServices to find all users
on
| a domain whos accounts are either locked out or disabled. I have used
| ADSIEdit and the mmc schema add-in to try and find properties for these
| things but have not had any luck so far. Also i did a search on the
| Platform SDK doc's. It has examples in VB and C++ but these are not using
| DotNet and dont give any hint to a property that may be used. They seem
to
| call a method directly on a object, and i am sure that method is not
| available as part of a DirectoryEntry class.
|
| I have a feeling i may need to do a Invoke (as you do when you reset a
users
| password from DotNet) if i do have to do this then how can i do a search
of
| all users in a domain?
|
| I would also like to be able to Enable or Disable a account from my
| application (This is Account Lockout and Account Disabled).
|
| thanks for any help anyone can offer.
|
| Arran
|
|
|

Nov 15 '05 #3
Thanks for all your help.
""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
news:%2******************@cpmsftngxa06.phx.gbl...

Hi Arran,

Just as Peter said, you should use the userAccountControl property.
For Lockout and Disabled acount, you should refer to ADS_UF_LOCKOUT and
ADS_UF_ACCOUNTDISABLE flag which are defined in ADS_USER_FLAG_ENUM enum.
Please refer to ADS_USER_FLAG_ENUM enum at the link below:
http://msdn.microsoft.com/library/de...us/netdir/adsi /ads_user_flag_enum.asp

You also can find a small sample of how to enable and disable a user acount: http://msdn.microsoft.com/library/de...us/netdir/netd s/enabling_and_disabling_the_user_account.asp

If you still have any questions, please feel free to let me know.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Arran Pearce" <ar**********@bacoll.ac.uk>
| Subject: ADSI Account Lockout
| Date: Thu, 23 Oct 2003 19:58:59 +0100
| Lines: 23
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#m**************@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: host213-122-124-127.in-addr.btopenworld.com
213.122.124.127
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:193614 | X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Hi,
|
| I am looking for a way to use System.DirectoryServices to find all users
on
| a domain whos accounts are either locked out or disabled. I have used
| ADSIEdit and the mmc schema add-in to try and find properties for these
| things but have not had any luck so far. Also i did a search on the
| Platform SDK doc's. It has examples in VB and C++ but these are not using | DotNet and dont give any hint to a property that may be used. They seem
to
| call a method directly on a object, and i am sure that method is not
| available as part of a DirectoryEntry class.
|
| I have a feeling i may need to do a Invoke (as you do when you reset a
users
| password from DotNet) if i do have to do this then how can i do a search of
| all users in a domain?
|
| I would also like to be able to Enable or Disable a account from my
| application (This is Account Lockout and Account Disabled).
|
| thanks for any help anyone can offer.
|
| Arran
|
|
|

Nov 15 '05 #4

Hi Arran,

If you still have anything unclear, please feel free to tell me.
Have a nice weekand.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Arran Pearce" <ar**********@bacoll.ac.uk>
| References: <#m**************@TK2MSFTNGP11.phx.gbl>
<#H**************@cpmsftngxa06.phx.gbl>
| Subject: Re: ADSI Account Lockout
| Date: Fri, 24 Oct 2003 19:12:12 +0100
| Lines: 81
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#i*************@TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: host213-122-88-5.in-addr.btopenworld.com 213.122.88.5
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:193875
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Thanks for all your help.
|
|
| ""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
| news:%2******************@cpmsftngxa06.phx.gbl...
| >
| > Hi Arran,
| >
| > Just as Peter said, you should use the userAccountControl property.
| > For Lockout and Disabled acount, you should refer to ADS_UF_LOCKOUT and
| > ADS_UF_ACCOUNTDISABLE flag which are defined in ADS_USER_FLAG_ENUM enum.
| > Please refer to ADS_USER_FLAG_ENUM enum at the link below:
| >
|
http://msdn.microsoft.com/library/de...us/netdir/adsi
| > /ads_user_flag_enum.asp
| >
| > You also can find a small sample of how to enable and disable a user
| acount:
| >
|
http://msdn.microsoft.com/library/de...us/netdir/netd
| > s/enabling_and_disabling_the_user_account.asp
| >
| > If you still have any questions, please feel free to let me know.
| >
| > Best regards,
| > Jeffrey Tan
| > Microsoft Online Partner Support
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| > --------------------
| > | From: "Arran Pearce" <ar**********@bacoll.ac.uk>
| > | Subject: ADSI Account Lockout
| > | Date: Thu, 23 Oct 2003 19:58:59 +0100
| > | Lines: 23
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <#m**************@TK2MSFTNGP11.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.languages.csharp
| > | NNTP-Posting-Host: host213-122-124-127.in-addr.btopenworld.com
| > 213.122.124.127
| > | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
| > | Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.languages.csharp:193614
| > | X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
| > |
| > | Hi,
| > |
| > | I am looking for a way to use System.DirectoryServices to find all
users
| > on
| > | a domain whos accounts are either locked out or disabled. I have used
| > | ADSIEdit and the mmc schema add-in to try and find properties for
these
| > | things but have not had any luck so far. Also i did a search on the
| > | Platform SDK doc's. It has examples in VB and C++ but these are not
| using
| > | DotNet and dont give any hint to a property that may be used. They
seem
| > to
| > | call a method directly on a object, and i am sure that method is not
| > | available as part of a DirectoryEntry class.
| > |
| > | I have a feeling i may need to do a Invoke (as you do when you reset a
| > users
| > | password from DotNet) if i do have to do this then how can i do a
| search
| > of
| > | all users in a domain?
| > |
| > | I would also like to be able to Enable or Disable a account from my
| > | application (This is Account Lockout and Account Disabled).
| > |
| > | thanks for any help anyone can offer.
| > |
| > | Arran
| > |
| > |
| > |
| >
|
|
|

Nov 15 '05 #5
In the example for enable or disable the account it has this:

int val = (int) usr.Properties["userAccountControl"].Value;
usr.Properties["userAccountControl"].Value = val | ADS_UF_ACCOUNTDISABLE;

and

int val = (int) usr.Properties["userAccountControl"].Value;
usr.Properties["userAccountControl"].Value = val & ~ADS_UF_ACCOUNTDISABLE;

What is happening with the "val | ADS_UF_ACCOUNTDISABLE" and "val &
~ADS_UF_ACCOUNTDISABLE"?

""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
news:7N****************@cpmsftngxa06.phx.gbl...

Hi Arran,

If you still have anything unclear, please feel free to tell me.
Have a nice weekand.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Arran Pearce" <ar**********@bacoll.ac.uk>
| References: <#m**************@TK2MSFTNGP11.phx.gbl>
<#H**************@cpmsftngxa06.phx.gbl>
| Subject: Re: ADSI Account Lockout
| Date: Fri, 24 Oct 2003 19:12:12 +0100
| Lines: 81
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#i*************@TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: host213-122-88-5.in-addr.btopenworld.com 213.122.88.5
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:193875 | X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Thanks for all your help.
|
|
| ""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
| news:%2******************@cpmsftngxa06.phx.gbl...
| >
| > Hi Arran,
| >
| > Just as Peter said, you should use the userAccountControl property.
| > For Lockout and Disabled acount, you should refer to ADS_UF_LOCKOUT and | > ADS_UF_ACCOUNTDISABLE flag which are defined in ADS_USER_FLAG_ENUM enum. | > Please refer to ADS_USER_FLAG_ENUM enum at the link below:
| >
|
http://msdn.microsoft.com/library/de...us/netdir/adsi | > /ads_user_flag_enum.asp
| >
| > You also can find a small sample of how to enable and disable a user
| acount:
| >
|
http://msdn.microsoft.com/library/de...us/netdir/netd | > s/enabling_and_disabling_the_user_account.asp
| >
| > If you still have any questions, please feel free to let me know.
| >
| > Best regards,
| > Jeffrey Tan
| > Microsoft Online Partner Support
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| > --------------------
| > | From: "Arran Pearce" <ar**********@bacoll.ac.uk>
| > | Subject: ADSI Account Lockout
| > | Date: Thu, 23 Oct 2003 19:58:59 +0100
| > | Lines: 23
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <#m**************@TK2MSFTNGP11.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.languages.csharp
| > | NNTP-Posting-Host: host213-122-124-127.in-addr.btopenworld.com
| > 213.122.124.127
| > | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
| > | Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.languages.csharp:193614
| > | X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
| > |
| > | Hi,
| > |
| > | I am looking for a way to use System.DirectoryServices to find all
users
| > on
| > | a domain whos accounts are either locked out or disabled. I have used | > | ADSIEdit and the mmc schema add-in to try and find properties for
these
| > | things but have not had any luck so far. Also i did a search on the
| > | Platform SDK doc's. It has examples in VB and C++ but these are not
| using
| > | DotNet and dont give any hint to a property that may be used. They
seem
| > to
| > | call a method directly on a object, and i am sure that method is not
| > | available as part of a DirectoryEntry class.
| > |
| > | I have a feeling i may need to do a Invoke (as you do when you reset a | > users
| > | password from DotNet) if i do have to do this then how can i do a
| search
| > of
| > | all users in a domain?
| > |
| > | I would also like to be able to Enable or Disable a account from my
| > | application (This is Account Lockout and Account Disabled).
| > |
| > | thanks for any help anyone can offer.
| > |
| > | Arran
| > |
| > |
| > |
| >
|
|
|

Nov 15 '05 #6
v-*****@online.microsoft.com ("Jeffrey Tan[MSFT]") wrote in
news:7N**************@cpmsftngxa06.phx.gbl:

Hi Jeffrey,
If you still have anything unclear, please feel free to tell me.
Have a nice weekand.


Although I've already worked a lot with DirectyServices I'd have a question
about AccountExpiration.

In the Platform SDK I've learned that AccountExpires is disabled if it has
the value of -1 or a DateTime value if enabled. That's fine with C++. But
with directoryServices I get a DateTime property and I can't set the value
to -1.

How can I disable AccountExpires without falling back to unmanaged code or
COMInterop, P/Invoke calls?

--
best regards

Peter Koen
-----------------------------------
MCAD, CAI/R, CAI/S, CASE/RS, CAT/RS
http://www.kema.at
Nov 15 '05 #7

Hi Peter,

In .Net, when you use DirectoryEntry to disable AccountExpires, I think you
can just set its value to -1, no need to convert -1 to DateTime object.
Because, the Value of PropertyValueCollection is just a object.

Something like this:
DirectoryEntry usr = new DirectoryEntry("LDAP://CN=Jeff smith, OU=Sales,
DC=Fabrikam, DC=Com")
DateTime dt = (DateTime) usr.Properties["AccountExpires"].Value;
usr.Properties["AccountExpires"].Value = -1;
usr.CommitChanges();

Anything wrong with doing this?

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Subject: Re: ADSI Account Lockout
| From: Peter Koen <koen-newsreply&snusnu.at>
| References: <#m**************@TK2MSFTNGP11.phx.gbl>
<#H**************@cpmsftngxa06.phx.gbl>
<#i*************@TK2MSFTNGP10.phx.gbl>
<7N**************@cpmsftngxa06.phx.gbl>
| Organization: Koen Electronic Media Agency
| User-Agent: Xnews/5.04.25
| Message-ID: <es**************@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Date: Sat, 25 Oct 2003 10:29:54 -0700
| NNTP-Posting-Host: ist.doch.alles.nur.belangloses.blablabla.at
212.24.113.98
| Lines: 1
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:194035
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| v-*****@online.microsoft.com ("Jeffrey Tan[MSFT]") wrote in
| news:7N**************@cpmsftngxa06.phx.gbl:
|
| Hi Jeffrey,
|
| > If you still have anything unclear, please feel free to tell me.
| > Have a nice weekand.
|
| Although I've already worked a lot with DirectyServices I'd have a
question
| about AccountExpiration.
|
| In the Platform SDK I've learned that AccountExpires is disabled if it
has
| the value of -1 or a DateTime value if enabled. That's fine with C++. But
| with directoryServices I get a DateTime property and I can't set the
value
| to -1.
|
| How can I disable AccountExpires without falling back to unmanaged code
or
| COMInterop, P/Invoke calls?
|
| --
| best regards
|
| Peter Koen
| -----------------------------------
| MCAD, CAI/R, CAI/S, CASE/RS, CAT/RS
| http://www.kema.at
|

Nov 15 '05 #8

Hi Arran,

~, |, & are the bitwise operators of C# language.
You can find ADS_UF_ACCOUNTDISABLEa in ADS_USER_FLAG_ENUM:
http://msdn.microsoft.com/library/de...us/netdir/adsi
/ads_user_flag_enum.asp
that ADS_UF_ACCOUNTDISABLE= 0x0002;

0x0002's binary expression is 0000,0000,0000,0010, so ~0x0002 is
1111,1111,1111,1101.
val & ~ADS_UF_ACCOUNTDISABLE equals val&1111,1111,1111,1101 which makes all
the other bits stay the same value as before, only the second bit becomes 0.
Then, when invoke CommitChanges(), .Net Framework will check second bit of
userAccountControl property, and 0 means enable.

Alike, val | ADS_UF_ACCOUNTDISABLE equals valu| 0000,0000,0000,0010 which
makes all bits stay the same, second bit becomes 1.
This makes diable the user account.

Hope I explain clear.
If you still have any unclear, please feel free to tell me.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Arran Pearce" <ar**********@bacoll.ac.uk>
| References: <#m**************@TK2MSFTNGP11.phx.gbl>
<#H**************@cpmsftngxa06.phx.gbl>
<#i*************@TK2MSFTNGP10.phx.gbl>
<7N**************@cpmsftngxa06.phx.gbl>
| Subject: Re: ADSI Account Lockout
| Date: Sat, 25 Oct 2003 18:14:07 +0100
| Lines: 145
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#Q**************@TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: host213-122-67-95.in-addr.btopenworld.com 213.122.67.95
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:194030
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| In the example for enable or disable the account it has this:
|
| int val = (int) usr.Properties["userAccountControl"].Value;
| usr.Properties["userAccountControl"].Value = val | ADS_UF_ACCOUNTDISABLE;
|
| and
|
| int val = (int) usr.Properties["userAccountControl"].Value;
| usr.Properties["userAccountControl"].Value = val & ~ADS_UF_ACCOUNTDISABLE;
|
| What is happening with the "val | ADS_UF_ACCOUNTDISABLE" and "val &
| ~ADS_UF_ACCOUNTDISABLE"?
|
|
|
| ""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
| news:7N****************@cpmsftngxa06.phx.gbl...
| >
| > Hi Arran,
| >
| > If you still have anything unclear, please feel free to tell me.
| > Have a nice weekand.
| >
| > Best regards,
| > Jeffrey Tan
| > Microsoft Online Partner Support
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| > --------------------
| > | From: "Arran Pearce" <ar**********@bacoll.ac.uk>
| > | References: <#m**************@TK2MSFTNGP11.phx.gbl>
| > <#H**************@cpmsftngxa06.phx.gbl>
| > | Subject: Re: ADSI Account Lockout
| > | Date: Fri, 24 Oct 2003 19:12:12 +0100
| > | Lines: 81
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <#i*************@TK2MSFTNGP10.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.languages.csharp
| > | NNTP-Posting-Host: host213-122-88-5.in-addr.btopenworld.com
213.122.88.5
| > | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
| > | Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.languages.csharp:193875
| > | X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
| > |
| > | Thanks for all your help.
| > |
| > |
| > | ""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
| > | news:%2******************@cpmsftngxa06.phx.gbl...
| > | >
| > | > Hi Arran,
| > | >
| > | > Just as Peter said, you should use the userAccountControl property.
| > | > For Lockout and Disabled acount, you should refer to ADS_UF_LOCKOUT
| and
| > | > ADS_UF_ACCOUNTDISABLE flag which are defined in ADS_USER_FLAG_ENUM
| enum.
| > | > Please refer to ADS_USER_FLAG_ENUM enum at the link below:
| > | >
| > |
| >
|
http://msdn.microsoft.com/library/de...us/netdir/adsi
| > | > /ads_user_flag_enum.asp
| > | >
| > | > You also can find a small sample of how to enable and disable a user
| > | acount:
| > | >
| > |
| >
|
http://msdn.microsoft.com/library/de...us/netdir/netd
| > | > s/enabling_and_disabling_the_user_account.asp
| > | >
| > | > If you still have any questions, please feel free to let me know.
| > | >
| > | > Best regards,
| > | > Jeffrey Tan
| > | > Microsoft Online Partner Support
| > | > Get Secure! - www.microsoft.com/security
| > | > This posting is provided "as is" with no warranties and confers no
| > rights.
| > | >
| > | > --------------------
| > | > | From: "Arran Pearce" <ar**********@bacoll.ac.uk>
| > | > | Subject: ADSI Account Lockout
| > | > | Date: Thu, 23 Oct 2003 19:58:59 +0100
| > | > | Lines: 23
| > | > | X-Priority: 3
| > | > | X-MSMail-Priority: Normal
| > | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | > | Message-ID: <#m**************@TK2MSFTNGP11.phx.gbl>
| > | > | Newsgroups: microsoft.public.dotnet.languages.csharp
| > | > | NNTP-Posting-Host: host213-122-124-127.in-addr.btopenworld.com
| > | > 213.122.124.127
| > | > | Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
| > | > | Xref: cpmsftngxa06.phx.gbl
| > | microsoft.public.dotnet.languages.csharp:193614
| > | > | X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
| > | > |
| > | > | Hi,
| > | > |
| > | > | I am looking for a way to use System.DirectoryServices to find all
| > users
| > | > on
| > | > | a domain whos accounts are either locked out or disabled. I have
| used
| > | > | ADSIEdit and the mmc schema add-in to try and find properties for
| > these
| > | > | things but have not had any luck so far. Also i did a search on
the
| > | > | Platform SDK doc's. It has examples in VB and C++ but these are
not
| > | using
| > | > | DotNet and dont give any hint to a property that may be used.
They
| > seem
| > | > to
| > | > | call a method directly on a object, and i am sure that method is
not
| > | > | available as part of a DirectoryEntry class.
| > | > |
| > | > | I have a feeling i may need to do a Invoke (as you do when you
reset
| a
| > | > users
| > | > | password from DotNet) if i do have to do this then how can i do a
| > | search
| > | > of
| > | > | all users in a domain?
| > | > |
| > | > | I would also like to be able to Enable or Disable a account from
my
| > | > | application (This is Account Lockout and Account Disabled).
| > | > |
| > | > | thanks for any help anyone can offer.
| > | > |
| > | > | Arran
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|

Nov 15 '05 #9
v-*****@online.microsoft.com ("Jeffrey Tan[MSFT]") wrote in
news:DF**************@cpmsftngxa06.phx.gbl:
In .Net, when you use DirectoryEntry to disable AccountExpires, I
think you can just set its value to -1, no need to convert -1 to
DateTime object. Because, the Value of PropertyValueCollection is just
a object.

Something like this:
DirectoryEntry usr = new DirectoryEntry("LDAP://CN=Jeff smith,
OU=Sales, DC=Fabrikam, DC=Com")
DateTime dt = (DateTime) usr.Properties["AccountExpires"].Value;
usr.Properties["AccountExpires"].Value = -1;
usr.CommitChanges();

Anything wrong with doing this?


Yes, there is a lot wrong with this:

1) .NET can't convert -1 to DateTime. There is no suitable conversion.
2) DirectoryServices is implemented as a RCW on top of the ADSI, In the
warpper it tests for types. I can'T assign a value of -1 to a DateTime
Property.

Only way I could achieve this behaviour as calling the ADSI Interfaces
directly.

I think there are a few serious design flaws in the DirectoryServices
object model. And it is very unconvinient that there is absolut no
working .NET equivalent for ADSI stuff like IUser, IComputer.

Now with win2k3 it would be the time to bring a truly managed AD
interface, don't you think so?
--
------ooo---OOO---ooo------

Peter Koen - www.kema.at
MCAD CAI/RS CASE/RS IAT

------ooo---OOO---ooo------
Nov 15 '05 #10
yeah i think i get it.

will give it a try asap.

again many thanks for your help.

""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
news:GW**************@cpmsftngxa06.phx.gbl...

Hi Arran,

~, |, & are the bitwise operators of C# language.
You can find ADS_UF_ACCOUNTDISABLEa in ADS_USER_FLAG_ENUM:
http://msdn.microsoft.com/library/de...us/netdir/adsi /ads_user_flag_enum.asp
that ADS_UF_ACCOUNTDISABLE= 0x0002;

0x0002's binary expression is 0000,0000,0000,0010, so ~0x0002 is
1111,1111,1111,1101.
val & ~ADS_UF_ACCOUNTDISABLE equals val&1111,1111,1111,1101 which makes all the other bits stay the same value as before, only the second bit becomes 0. Then, when invoke CommitChanges(), .Net Framework will check second bit of
userAccountControl property, and 0 means enable.

Alike, val | ADS_UF_ACCOUNTDISABLE equals valu| 0000,0000,0000,0010 which
makes all bits stay the same, second bit becomes 1.
This makes diable the user account.

Hope I explain clear.
If you still have any unclear, please feel free to tell me.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Arran Pearce" <ar**********@bacoll.ac.uk>
| References: <#m**************@TK2MSFTNGP11.phx.gbl>
<#H**************@cpmsftngxa06.phx.gbl>
<#i*************@TK2MSFTNGP10.phx.gbl>
<7N**************@cpmsftngxa06.phx.gbl>
| Subject: Re: ADSI Account Lockout
| Date: Sat, 25 Oct 2003 18:14:07 +0100
| Lines: 145
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#Q**************@TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: host213-122-67-95.in-addr.btopenworld.com 213.122.67.95 | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:194030 | X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| In the example for enable or disable the account it has this:
|
| int val = (int) usr.Properties["userAccountControl"].Value;
| usr.Properties["userAccountControl"].Value = val | ADS_UF_ACCOUNTDISABLE; |
| and
|
| int val = (int) usr.Properties["userAccountControl"].Value;
| usr.Properties["userAccountControl"].Value = val & ~ADS_UF_ACCOUNTDISABLE; |
| What is happening with the "val | ADS_UF_ACCOUNTDISABLE" and "val &
| ~ADS_UF_ACCOUNTDISABLE"?
|
|
|
| ""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
| news:7N****************@cpmsftngxa06.phx.gbl...
| >
| > Hi Arran,
| >
| > If you still have anything unclear, please feel free to tell me.
| > Have a nice weekand.
| >
| > Best regards,
| > Jeffrey Tan
| > Microsoft Online Partner Support
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| > --------------------
| > | From: "Arran Pearce" <ar**********@bacoll.ac.uk>
| > | References: <#m**************@TK2MSFTNGP11.phx.gbl>
| > <#H**************@cpmsftngxa06.phx.gbl>
| > | Subject: Re: ADSI Account Lockout
| > | Date: Fri, 24 Oct 2003 19:12:12 +0100
| > | Lines: 81
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <#i*************@TK2MSFTNGP10.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.languages.csharp
| > | NNTP-Posting-Host: host213-122-88-5.in-addr.btopenworld.com
213.122.88.5
| > | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
| > | Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.languages.csharp:193875
| > | X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
| > |
| > | Thanks for all your help.
| > |
| > |
| > | ""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message | > | news:%2******************@cpmsftngxa06.phx.gbl...
| > | >
| > | > Hi Arran,
| > | >
| > | > Just as Peter said, you should use the userAccountControl property. | > | > For Lockout and Disabled acount, you should refer to ADS_UF_LOCKOUT | and
| > | > ADS_UF_ACCOUNTDISABLE flag which are defined in ADS_USER_FLAG_ENUM
| enum.
| > | > Please refer to ADS_USER_FLAG_ENUM enum at the link below:
| > | >
| > |
| >
|
http://msdn.microsoft.com/library/de...us/netdir/adsi | > | > /ads_user_flag_enum.asp
| > | >
| > | > You also can find a small sample of how to enable and disable a user | > | acount:
| > | >
| > |
| >
|
http://msdn.microsoft.com/library/de...us/netdir/netd | > | > s/enabling_and_disabling_the_user_account.asp
| > | >
| > | > If you still have any questions, please feel free to let me know.
| > | >
| > | > Best regards,
| > | > Jeffrey Tan
| > | > Microsoft Online Partner Support
| > | > Get Secure! - www.microsoft.com/security
| > | > This posting is provided "as is" with no warranties and confers no
| > rights.
| > | >
| > | > --------------------
| > | > | From: "Arran Pearce" <ar**********@bacoll.ac.uk>
| > | > | Subject: ADSI Account Lockout
| > | > | Date: Thu, 23 Oct 2003 19:58:59 +0100
| > | > | Lines: 23
| > | > | X-Priority: 3
| > | > | X-MSMail-Priority: Normal
| > | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | > | Message-ID: <#m**************@TK2MSFTNGP11.phx.gbl>
| > | > | Newsgroups: microsoft.public.dotnet.languages.csharp
| > | > | NNTP-Posting-Host: host213-122-124-127.in-addr.btopenworld.com
| > | > 213.122.124.127
| > | > | Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
| > | > | Xref: cpmsftngxa06.phx.gbl
| > | microsoft.public.dotnet.languages.csharp:193614
| > | > | X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
| > | > |
| > | > | Hi,
| > | > |
| > | > | I am looking for a way to use System.DirectoryServices to find all | > users
| > | > on
| > | > | a domain whos accounts are either locked out or disabled. I have | used
| > | > | ADSIEdit and the mmc schema add-in to try and find properties for | > these
| > | > | things but have not had any luck so far. Also i did a search on
the
| > | > | Platform SDK doc's. It has examples in VB and C++ but these are
not
| > | using
| > | > | DotNet and dont give any hint to a property that may be used.
They
| > seem
| > | > to
| > | > | call a method directly on a object, and i am sure that method is
not
| > | > | available as part of a DirectoryEntry class.
| > | > |
| > | > | I have a feeling i may need to do a Invoke (as you do when you
reset
| a
| > | > users
| > | > | password from DotNet) if i do have to do this then how can i do a | > | search
| > | > of
| > | > | all users in a domain?
| > | > |
| > | > | I would also like to be able to Enable or Disable a account from
my
| > | > | application (This is Account Lockout and Account Disabled).
| > | > |
| > | > | thanks for any help anyone can offer.
| > | > |
| > | > | Arran
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|

Nov 15 '05 #11
Jeffrey,
Anything wrong with doing this? Yes,
- usr.Properties["AccountExpires"].Value doesn't contain a DateTime reference but a COM interface pointer to a Largeinteger object
(two 32 bit entities).
- the Lagerinteger value returned contains a date in Fileformat not DateTime format, so you need to convert it.
- (-1) is indeed an invalid DateTime value but it's not invalid as FileTime value, so you need to take care when reading the
property and only convert to DateTime when it contains a valid DateTime date.
Herewith is a sample how to set the "account never expires" property, it also shows you how to display adate from this property.
Willy.


using System;
using System.DirectoryServices;
using System.Runtime.InteropServices;
using activedsnet;
class Tester
{
public static void Main()
{
LargeInteger li;
DirectoryEntry userAccount;
using(userAccount = new DirectoryEntry("LDAP://Somehost/CN=Users,DC=xxx,DC=yyy,DC=zzz")) {
DirectorySearcher mySearcher = new DirectorySearcher(userAccount);
mySearcher.Filter = "(samAccountName=denoyette)";
mySearcher.PropertiesToLoad.Add("samAccountName");
mySearcher.PropertiesToLoad.Add("accountExpires");
SearchResult myResult;
myResult = mySearcher.FindOne();
userAccount = new DirectoryEntry(myResult.Path);
PropertyCollection pcoll = userAccount.Properties;
// PropertyValueCollection cointains a COM interface pointer (ILargeInteger)
if(Marshal.IsComObject(pcoll["accountExpires"].Value))
Console.WriteLine("\t " + pcoll["accountExpires"].Value);
// Cast it to the right Type
li = pcoll["accountExpires"].Value as LargeInteger;
long date = (((long)(li.HighPart) << 32) + (long) li.LowPart);
if((li.HighPart == -1) && (li.LowPart == -1)) {
Console.WriteLine("Account never expires");
}
else {
// Valid date convert to DateTime format
// Note that this date is one later than the date displayd in the Directory Users and Computers MMC
string dt = DateTime.FromFileTime(date).ToString();
Console.WriteLine("DATE = {0:D}" ,dt);
}

// Now set "account never expires"
li.HighPart = -1;
li.LowPart = -1;
pcoll["accountExpires"].Value = li;
userAccount.CommitChanges();
}
Marshal.ReleaseComObject(li);
}
}
// Use tlbimp to create the IA activedsnet.dll (or whatever name you choose) from activeds.tlb
// Compile with : csc /r:activedsnet.dll ad3c.cs

Willy.

""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message news:DF**************@cpmsftngxa06.phx.gbl...
Hi Peter,

In .Net, when you use DirectoryEntry to disable AccountExpires, I think you
can just set its value to -1, no need to convert -1 to DateTime object.
Because, the Value of PropertyValueCollection is just a object.

Something like this:
DirectoryEntry usr = new DirectoryEntry("LDAP://CN=Jeff smith, OU=Sales,
DC=Fabrikam, DC=Com")
DateTime dt = (DateTime) usr.Properties["AccountExpires"].Value;
usr.Properties["AccountExpires"].Value = -1;
usr.CommitChanges();

Anything wrong with doing this?

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Subject: Re: ADSI Account Lockout
| From: Peter Koen <koen-newsreply&snusnu.at>
| References: <#m**************@TK2MSFTNGP11.phx.gbl>
<#H**************@cpmsftngxa06.phx.gbl>
<#i*************@TK2MSFTNGP10.phx.gbl>
<7N**************@cpmsftngxa06.phx.gbl>
| Organization: Koen Electronic Media Agency
| User-Agent: Xnews/5.04.25
| Message-ID: <es**************@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Date: Sat, 25 Oct 2003 10:29:54 -0700
| NNTP-Posting-Host: ist.doch.alles.nur.belangloses.blablabla.at
212.24.113.98
| Lines: 1
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:194035
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| v-*****@online.microsoft.com ("Jeffrey Tan[MSFT]") wrote in
| news:7N**************@cpmsftngxa06.phx.gbl:
|
| Hi Jeffrey,
|
| > If you still have anything unclear, please feel free to tell me.
| > Have a nice weekand.
|
| Although I've already worked a lot with DirectyServices I'd have a
question
| about AccountExpiration.
|
| In the Platform SDK I've learned that AccountExpires is disabled if it
has
| the value of -1 or a DateTime value if enabled. That's fine with C++. But
| with directoryServices I get a DateTime property and I can't set the
value
| to -1.
|
| How can I disable AccountExpires without falling back to unmanaged code
or
| COMInterop, P/Invoke calls?
|
| --
| best regards
|
| Peter Koen
| -----------------------------------
| MCAD, CAI/R, CAI/S, CASE/RS, CAT/RS
| http://www.kema.at
|

Nov 15 '05 #12
Thanks Willy!
That perfectly sorts out my problem with the accountExpires property!
--
------ooo---OOO---ooo------

Peter Koen - www.kema.at
MCAD CAI/RS CASE/RS IAT

------ooo---OOO---ooo------
Nov 15 '05 #13
The enabling and disabling are working fine. However i am still having a
problem doing a search for all accounts that are disabled.

If i do a DirectoryEntry search with the following filter should it work?

"(&((objectClass=user)(userAccountControl="+Accoun tLockType.ACCOUNTDISABLE+"
)))"

AccountLockType.ACCOUNTDISABLE is a enum in my program which has a value of
0X0002
Nov 15 '05 #14

Hi Arran,

I think you can refer to DirectorySearcher class, and use like this:
DirectorySearcher Searcher;
Searcher.Filter
="(&(objectCategory=person)(userAccountControl:1.2 .840.113556.1.4.803:=2))";
There is a sample in:
http://groups.yahoo.com/group/ADSIAN...es/message/531

Beside, you can find more information about Searching Active Directory in:
http://msdn.microsoft.com/library/de...us/netdir/ad/s
pecifying_other_search_options.asp
(Especially "Creating a Query Filter" section)

Hope this helps,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Arran Pearce" <ar**********@bacoll.ac.uk>
| References: <#m**************@TK2MSFTNGP11.phx.gbl>
<#H**************@cpmsftngxa06.phx.gbl>
<#i*************@TK2MSFTNGP10.phx.gbl>
<7N**************@cpmsftngxa06.phx.gbl>
<#Q**************@TK2MSFTNGP10.phx.gbl>
<GW**************@cpmsftngxa06.phx.gbl>
<ee**************@TK2MSFTNGP11.phx.gbl>
| Subject: Re: ADSI Account Lockout
| Date: Tue, 28 Oct 2003 10:51:11 -0000
| Lines: 12
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <O4**************@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: host213-122-172-68.in-addr.btopenworld.com
213.122.172.68
| Path:
cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTN GP08.phx.gbl!TK2MSFTNGP11.
phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:194643
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| The enabling and disabling are working fine. However i am still having a
| problem doing a search for all accounts that are disabled.
|
| If i do a DirectoryEntry search with the following filter should it work?
|
|
"(&((objectClass=user)(userAccountControl="+Accoun tLockType.ACCOUNTDISABLE+"
| )))"
|
| AccountLockType.ACCOUNTDISABLE is a enum in my program which has a value
of
| 0X0002
|
|
|

Nov 15 '05 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Enigma Webmaster | last post by:
Hi All, We've written a couple of functions which, when run in VB6 work fine and allow AD users to be updated. When we include the code into an ASP Page and try and update a users information...
1
by: HridayNarayan Rai | last post by:
This is hriday, wants to create an asp.net web page using c#. I want the validation, account creation, account updation, and account deletion of my user should happen using the active directory...
10
by: Victor Pereira | last post by:
Hi, I'm trying to rename the Administrator Login, and i want to know if my approach is right: void RenameUsr(string hostname, string admusr) { DirectoryEntry entry = new...
2
by: Vinny Vinn | last post by:
On occasion a Network User Account gets locked out. This causes lots of problems as the account is used to run different programs. The programs fail when the user account is locked out. I would...
3
by: Roy Osherove | last post by:
Hi folks. I have an ASP.Net application that runs a .Net dll that uses WMI and ADSI(both managed) to connect to a given IIS root and search through it. When not using the ASP.Net client, but...
1
by: James Schuler | last post by:
I am trying to run a query in an ASP.NET application against Active Directory using a linked server (ADSI) in SQL Server 2000. The query runs without any problems in Query Analyzer: SELECT...
2
by: Jaans | last post by:
A very cool feature of the ASP.NET 2.0 membership provider includes the automatic "lockout" of users after repeated failed login attempts. I have a scenario where we don't want this to happen, so...
1
by: nari | last post by:
Hi there, I'm looking for an ASP script to lockout an account after 3 or 5 failed attempts. It should be the best way to prevent my login screen against the brute force attack. Thanks in...
0
by: binder | last post by:
I have a Win 2003 server with IIS 6. I have a webservice that is trying to copy a file from one local directory to another local directory on the server. I'm getting this error when trying to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.