Propertie "Password Never Expires..." 
Author Message
 Propertie "Password Never Expires..."

Hi,

I do a VBScript to create many users in Active Directory of a W2k
Advanced Server and i don't know how to check the propertie "Password
nerver expires" of the Account tab of a user

Set oEtudiant = oADSIObject.Create("user", "cn=" & gsNoEtudiant)
oEtudiant.put "samAccountName", gsNoEtudiant
oEtudiant.FullName = gsPrenom & " " & gsNom
oEtudiant.HomeDrive = "U:"
oEtudiant.HomeDirectory = "\\w2ktest\eleves\%username%"
oEtudiant.LoginScript = "eleves.bat"
oEtudiant.description = gsNomProgramme
oEtudiant.FirstName = gsPrenom
oEtudiant.LastName = gsNom
oEtudiant.SetInfo

oEtudiant.AccountDisabled = False
oEtudiant.setPassword(gsDateNaissance)
oEtudiant.SetInfo

Someone have a answer !

Thanks in advance...

F Jacques



Tue, 30 Dec 2003 01:41:25 GMT  
 Propertie "Password Never Expires..."
Source: http://www.*-*-*.com/ .{*filter*}ia.edu/~pjh5u/code/adsi_app.txt

Querying the Password Never Expires Status Flag Using a VBScript Active
Server Page

Dim User
Dim UserName
Dim UserDomain
Dim Flags
UserDomain = "Target_User_Domain"
UserName = "Target_User_Name"
Set User = GetObject("WinNT://" & UserDomain & "/" & UserName & ",user")
Flags = User.Get("UserFlags")
If (Flags And &H10000) <> 0 Then
    Response.Write "The specified user account is configured so that the
password never expires."
End If

Explicitly Setting the Password Never Expires Status Flag Using a VBScript
Active Server Page

Dim User
Dim UserName
Dim UserDomain
Dim Flags
UserDomain = "Target_User_Domain"
UserName = "Target_User_Name"
Set User = GetObject("WinNT://" & UserDomain & "/" & UserName & ",user")
Flags = User.Get("UserFlags")
User.Put "UserFlags", Flags OR &H10000
User.SetInfo


Quote:
> Hi,

> I do a vbscript to create many users in Active Directory of a W2k
> Advanced Server and i don't know how to check the propertie "Password
> nerver expires" of the Account tab of a user

> Set oEtudiant = oADSIObject.Create("user", "cn=" & gsNoEtudiant)
> oEtudiant.put "samAccountName", gsNoEtudiant
> oEtudiant.FullName = gsPrenom & " " & gsNom
> oEtudiant.HomeDrive = "U:"
> oEtudiant.HomeDirectory = "\\w2ktest\eleves\%username%"
> oEtudiant.LoginScript = "eleves.bat"
> oEtudiant.description = gsNomProgramme
> oEtudiant.FirstName = gsPrenom
> oEtudiant.LastName = gsNom
> oEtudiant.SetInfo

> oEtudiant.AccountDisabled = False
> oEtudiant.setPassword(gsDateNaissance)
> oEtudiant.SetInfo

> Someone have a answer !

> Thanks in advance...

> F Jacques



Tue, 30 Dec 2003 01:52:55 GMT  
 Propertie "Password Never Expires..."
ok, but a use LDAP because i have a OU's structure and cant not use
WinNT provider...just LDAP.

On Thu, 12 Jul 2001 12:52:55 -0500, "Mario Alcaraz"

Quote:

>Source: http://www.*-*-*.com/ .{*filter*}ia.edu/~pjh5u/code/adsi_app.txt

>Querying the Password Never Expires Status Flag Using a VBScript Active
>Server Page

>Dim User
>Dim UserName
>Dim UserDomain
>Dim Flags
>UserDomain = "Target_User_Domain"
>UserName = "Target_User_Name"
>Set User = GetObject("WinNT://" & UserDomain & "/" & UserName & ",user")
>Flags = User.Get("UserFlags")
>If (Flags And &H10000) <> 0 Then
>    Response.Write "The specified user account is configured so that the
>password never expires."
>End If

>Explicitly Setting the Password Never Expires Status Flag Using a VBScript
>Active Server Page

>Dim User
>Dim UserName
>Dim UserDomain
>Dim Flags
>UserDomain = "Target_User_Domain"
>UserName = "Target_User_Name"
>Set User = GetObject("WinNT://" & UserDomain & "/" & UserName & ",user")
>Flags = User.Get("UserFlags")
>User.Put "UserFlags", Flags OR &H10000
>User.SetInfo



>> Hi,

>> I do a vbscript to create many users in Active Directory of a W2k
>> Advanced Server and i don't know how to check the propertie "Password
>> nerver expires" of the Account tab of a user

>> Set oEtudiant = oADSIObject.Create("user", "cn=" & gsNoEtudiant)
>> oEtudiant.put "samAccountName", gsNoEtudiant
>> oEtudiant.FullName = gsPrenom & " " & gsNom
>> oEtudiant.HomeDrive = "U:"
>> oEtudiant.HomeDirectory = "\\w2ktest\eleves\%username%"
>> oEtudiant.LoginScript = "eleves.bat"
>> oEtudiant.description = gsNomProgramme
>> oEtudiant.FirstName = gsPrenom
>> oEtudiant.LastName = gsNom
>> oEtudiant.SetInfo

>> oEtudiant.AccountDisabled = False
>> oEtudiant.setPassword(gsDateNaissance)
>> oEtudiant.SetInfo

>> Someone have a answer !

>> Thanks in advance...

>> F Jacques



Tue, 30 Dec 2003 03:19:13 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. "password never expires"

2. Properties and "sub-Properties"

3. Error : "User Session Expired"

4. Problem with "Time Expired Error"

5. "Time out expired" by SQL Server

6. Response.Cookies("AnyCookieName").Expires

7. "Session variable expire by refreshing the page"?true:false

8. *"*-.,._,.-*"* I"LL TRADE VISUAL C++ FOR VBASIC *"*-.,_,.-*"*

9. Propertie "Allow logon to terminal server"

10. ADSI: User properties "Terminal server profile"

11. Properties and Methods from GetObject("WinNT://")

12. field .Properties("Description") question

 

 
Powered by phpBB® Forum Software