Solved

How to retrieve the value for "prompt user to change password before expiration" of local policy settings?

Posted on 2003-10-23
4
259 Views
Last Modified: 2010-08-05
In windows 2000
Goto Start >> Programs >> Administrative tools >> Local Security Settings >> Local Policies >> security options >> "prompt user to change password before expiration"
Mostly the default value of your local policy setting will be 14 days.
The requirement for me is :
I want to query this value programatically through SDK api's for both remote domain server as well as your local machine(precedence is for getting the value from remote domain server ).
0
Comment
Question by:yogindar
4 Comments
 
LVL 3

Accepted Solution

by:
pg_india earned 125 total points
Comment Utility
well search goolge for NT authentication
ty this:
Private Declare Function GetUserProfileDirectory Lib "userenv.dll" Alias "GetUserProfileDirectoryA" (ByVal hToken As Long, ByVal lpProfileDir As String, lpcchSize As Long) As Boolean

i will suggest if u r using api goto http://www.allapi.net/ and download the api viewer..

there in Windows information u will see lot of of apis.
0
 
LVL 5

Assisted Solution

by:WorkingJourneyman
WorkingJourneyman earned 125 total points
Comment Utility
You'll need to use the Group Policy API... docs are at http://msdn.microsoft.com/library/en-us/policy/policy/group_policy_start_page.asp

The function GetGPOList() will retrieve stored group policy objects from a remote computer.
The function GetAppliedGPOList() will retreive group policy objects as applied for a machine or user.

I don't know how to locate the specific policy setting you need. You'll have to do some research and experimenting.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

When you receive another warning that your shared drive is almost full and you have asked your users to clean out old files again and again, here is a single command that may help. This command will place all the files that have not been used rec…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
The viewer will learn how to implement Singleton Design Pattern in Java.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now