473,761 Members | 9,379 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing domain password

Hello,

I'm seaching for the possibility to change Domain/User passwords. And a
check for users if the password has to change with the first logon or when
the password is expired.

thanx,

Mindy
Sep 23 '05 #1
1 4289
Mindy Geac wrote:
Hello,

I'm seaching for the possibility to change Domain/User passwords. And a
check for users if the password has to change with the first logon or when
the password is expired.

thanx,

Mindy

Hi Mindy Geac,

The ADSI User Object has a Function "ChangePassword " where you can
change a user's Password. The Function takes the current and new
password as a parameter:

It's easiest to enable Basic authentication on the .ASP - File, then you
can get the current Password with:
strOldPass = Request.ServerV ariables("AUTH_ PASSWORD")
WARNING!!! with Basic Authentication THE USER'S PASSWORD IS SENDT
PLAINTEXT ON EVERY PAGE REQUEST!!!
I would do this only with enabled SSL!!
EXAMPLE CODE (VBScript):

Dim oUser, strOldPass, strNewPass
strOldPass = "password"
strNewPass = "newpass"
Set oUser = GetObject("WinN T://DOMAIN/USERNAME,user")
oUser.GetInfo
On Error Resume Next
oUser.ChangePas sword strOldPass, strNewPass
If err <> 0 Then
Response.Write "ERROR: " & Err.Number & " - " & Err.Description
Else
Response.Write "Password changed."
End If
Set oUser = Nothing

EXAMPLE CODE END

The most common Error I got while changing passwords was the
Password-Complexity or Password-Age set in Windows2003 Server:
AFAIK Complexity has to include uppercase/lowercase/numbers and the
Password-Age has to be at least 1 day (you cannot change twice on same
day) by default...

As for the "Change on first Logon" - I'm sure someone else here can
answer this with ease.
HTH
Gottfried
Sep 23 '05 #2

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

Similar topics

4
2971
by: Daniel | last post by:
If i log into my computer as domain A and user X and password Y but then I need to give C# application access to domain B as user F and password G. Is this possible? or do i have to log into the computer as domain B, user F and password G in order for the application to have permissions to domain B? I would like to stay logged in as domain A but just give my C# application access to domain B. In my application I need file system access that...
1
5889
by: BP | last post by:
Can anyone point me to some C# code/info that would allow me to change the Administrator password on a remote machine in a workgroup? Not a domain, no Active Directory present. I realize I need to know the current password. I've written code to extractall kinds of WMI info from these machines remotely, so am familiar with the need to connect and authenticate. I've even been successful importing the Netapi32.dll and using the...
1
11859
by: missoula | last post by:
Hello- I can connect to my own domain fine with the following: entry = new DirectoryEntry("LDAP://RootDSE"); However, I am trying to get information out of AD for another domain. This domain is trusted, but I can't seem to connect to it. This is driving me crazy. Hard coding a DC name works, but I don't want to hard code things in my code:
0
304
by: M Greevy | last post by:
Hello, I was wondering if you could help me or tell me this is not possible. I have a client that wants the ability to change a local server password from an ASP page for a non-domain windows 2003 server. They would like to allow users to change passwords on two server located in the DMZ that are not part of the domain. Users must be able to authenticate to the form using their user name and current password, and make a change to their...
2
410
by: - Steve - | last post by:
I'm trying to change a user's password using objUser.Invoke("setPassword", "newpassword") It works fine as a console application if I'm logged in with someone with the correct permissions. If I'm logged in as a normal user it doesn't work, even though call before that, objUser.Username = "admin@domain.com" objUser.Password = "adminpassword"
1
2175
by: VB Programmer | last post by:
Using ASP.NET 2.0 Web Site Admin Tool. Under Security tab it says this: Click a row to select a user and then click Edit user to view or change the user's password or other properties. When I click "Edit user" I do NOT see ANYWHERE to change the users password. Am I missing something?
2
4503
by: J | last post by:
Hello. I apologize if this isn't the appropriate group for this question but I was wondering if it's possible to allow regular windows domain users to change their passwords through an .asp page? I'm trying to figure out the best way to handle domain users to log into an .asp application tied with SQL Server 2000 on the back end since I keep reading that windows authentication is better practice to log into SQL Server. Thanks in...
10
2195
by: Sridhar | last post by:
HI, I am having problems setting up a website so that it will be available only inside the domain. We have three servers. One is iis server and second one is internal server and the third one is sql server. I have deployed the web application in the internal server. It is not able to access the sql server that is on another server. If I deploy the same application on IIS, it is working fine. How should I set up the web application in the...
2
2743
by: JOHNSHELL08 | last post by:
Dear Team, There is a problem related to change ip address there in my network a domain admin user is exist and user knows its password and by this they are able to login with this account and change ip address for working with broadband and user access personal web id etc. so i want to prevent this through applying a policy on ip changing.and i want this should be done by window default utility not any third party software .and...
0
9522
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9336
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9902
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8770
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6603
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5364
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3866
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3446
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2738
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.