Use code to reset the domain password and synchronize the Domino password on the web

Source: Internet
Author: User
Tags strong password

Use code to reset the domain password and synchronize the Domino password on the web

We have introduced the process of modifying the domain password through code. Today we will mainly introduce how to reset the domain password on the web. This function is intended for administrators; at the same time, mount the mailbox password reset function link to achieve the same effect. After the domain password is reset through web, the Domino mailbox password is reset accordingly;

The main method is to modify the code under the domain password modification and forgetting process to reset the password:

Add the icon and add the password reset code:

You can copy other attempts and modify the code;

650) this. width = 650; "title =" clip_image002 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "alt =" clip_image002 "src =" http://www.bkjia.com/uploads/allimg/140101/0020313110-0.jpg "height =" 353 "border =" 0 "/>

@ {ViewBag. Title = "Resetpwd"; Layout = "~ /Views/Shared/_ LayoutView. cshtml ";} @ section head {<script src =" @ System. Security. Policy. Url. Content ("~ /Scripts/home. js ") "type =" text/javascript "> </script >}< div id =" contactArea "> </div> <div class =" pcontent "> <div class =" pstep02 "> <B> Reset password </B> </div> <div class =" pstep03 "> Change your password </div> <div class =" pstep04 "> A strong password helps prevent </div> <ul class = "ulstep"> <li> <B> Iiosoft Account </B> <a style = "cursor: pointer; "id =" Search "> What's this? </Li> <input name = "" id = "itcode" type = "text" class = "a01input"/> </li> <li class = "liTOP "> <B> New password </B> </li> <input name =" "id =" newpwd "type =" password "class =" a01input "/> </li> <li style = "color: #999; "> 8-character minimum; case sensitive </li> <li class = "liTOP"> <B> Reenter password </B> </li> <input name = "" id = "rtpwd "type =" password "class =" a01input "/> </li> </ul> <div class =" topw "> <input ty Pe = "button" id = "UserSetpwd" value = "Save" class = "btnSave"/> & nbsp; <input type = "button" id = "UserpwdCancel" value = "Cancel" class = "btnCancel"/> </div> <div id = "Loading3" style = "display: none ">  <span id =" sProcess3 "> Update Password, please wait... </span> </div> and modify homecontroller. cs: public void ChangePwd () {string sItCode = Request ["sItCode"]; string sOldPwd = R Equest ["sOldPwd"]; string sNewPwd = Request ["sNewPwd"]; ADOperator ao = new ADOperator (); int y = ao. isUserExistsByAccount (sItCode); string Rs = ""; if (y = 1) {int x = ao. login (sItCode, sOldPwd); if (x = 1) {int z = ao. changeUserPassword (sItCode, sOldPwd, sNewPwd); if (z = 1) {Rs = "CS"; // call the Domino password to change changeDominoPwd (sItCode, sNewPwd );} else {Rs = "TR" ;}} else {Rs = "EP" ;}} else {Rs = "NU" ;}ao. dispose (); Respon Se. write (Rs. toString ();} // reset the password // [HttpGet] public void SetPassword () {string Rs = "CS"; string sItCode = Request ["sItCode"]; string sOldPwd = Request ["sOldPwd"]; string sNewPwd = Request ["sNewPwd"]; ADOperator ao = new ADOperator (); int y = ao. isUserExistsByAccount (sItCode); if (y = 1) {ADOperator. setPasswordByAccount (sItCode, sNewPwd); changeDominoPwd (sItCode, sNewPwd); Response. write (Rs. toString () ;}# reg Ion Domino password synchronous modification public static void changeDominoPwd (String sNewUserName, String sNewPwd) {String serverName = "iio-mail01"; String cookie = "% temp %/cookie.txt "; string system_username = "changepwd"; String system_passwd = "password8 "; string str_login = "cmd.exe/c curl-c" + cookie + "-d \" % 25% 25 ModDate = 0FF5136000000000 & Username = "+ system_username +" & Password = "+ system_passwd + "& RedirectTo = % 2 FChg Upwd. nsf % 2 Finternetpwd % 3FOpenForm \ "\" http: // "+ serverName +"/names. nsf? Login \""; string str_changepwd = "cmd.exe/c curl-B" + cookie + "-d \" _ Click = 0 & Form = internetpwd & Time = 2013-12-18 + 19% 3A47% 3A48 & CurLoginUser = CN % 3D "+ system_username +" % 2FO % 3 Diiosoft & UserName = "+ sNewUserName +" & UserPassword = "+ sNewPwd +" \ "\" http: // "+ serverName +"/ChgUpwd. nsf/internetpwd? OpenForm & Seq = 1 \ ""; Win32_Process win32 = new Win32_Process (); win32.CreateProcess (str_login); win32.CreateProcess (str_changepwd); }# endregion }}

650) this. width = 650; "title =" clip_image004 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "alt =" clip_image004 "src =" http://www.bkjia.com/uploads/allimg/140101/0020316202-1.jpg "height =" 353 "border =" 0 "/>

After resetting the domain password, you need to reset the Domino password. Therefore, you need to add a URL that is associated with the web Password Reset in domino.

650) this. width = 650; "title =" clip_image006 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "alt =" clip_image006 "src =" http://www.bkjia.com/uploads/allimg/140101/002031L92-2.jpg "height =" 355 "border =" 0 "/>

Reset the domino password on the web

650) this. width = 650; "title =" clip_image008 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "alt =" clip_image008 "src =" http://www.bkjia.com/uploads/allimg/140101/0020315117-3.jpg "height =" 355 "border =" 0 "/>

Then, regenerate the solution and release it:

650) this. width = 650; "title =" clip_image010 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "alt =" clip_image010 "src =" http://www.bkjia.com/uploads/allimg/140101/00203162Q-4.jpg "height =" 354 "border =" 0 "/>

After publishing, you can access and browse through iis

650) this. width = 650; "title =" clip_image012 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "alt =" clip_image012 "src =" http://www.bkjia.com/uploads/allimg/140101/0020311046-5.jpg "height =" 359 "border =" 0 "/>

650) this. width = 650; "title =" clip_image014 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "alt =" clip_image014 "src =" http://www.bkjia.com/uploads/allimg/140101/0020312006-6.jpg "height =" 352 "border =" 0 "/>

650) this. width = 650; "title =" clip_image016 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "alt =" clip_image016 "src =" http://www.bkjia.com/uploads/allimg/140101/00203120O-7.jpg "height =" 368 "border =" 0 "/>

Select the published path file by adding a website

650) this. width = 650; "title =" clip_image018 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "alt =" clip_image018 "src =" http://www.bkjia.com/uploads/allimg/140101/002031L02-8.jpg "height =" 364 "border =" 0 "/>

After the application pool is added, modify the version of the application pool. The default value is net2.0. You need to modify net4.0.

650) this. width = 650; "title =" clip_image020 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "alt =" clip_image020 "src =" http://www.bkjia.com/uploads/allimg/140101/002031CL-9.jpg "height =" 372 "border =" 0 "/>

Browser access

650) this. width = 650; "title =" clip_image022 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "alt =" clip_image022 "src =" http://www.bkjia.com/uploads/allimg/140101/0020314140-10.jpg "height =" 352 "border =" 0 "/>

650) this. width = 650; "title =" clip_image024 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "alt =" clip_image024 "src =" http://www.bkjia.com/uploads/allimg/140101/0020311029-11.jpg "height =" 388 "border =" 0 "/>

Next, let's test it.

Reset user1 password to 123123

650) this. width = 650; "title =" clip_image026 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "alt =" clip_image026 "src =" http://www.bkjia.com/uploads/allimg/140101/0020312542-12.jpg "height =" 372 "border =" 0 "/>

Verify the login through user01 and the Reset Password

650) this. width = 650; "title =" clip_image028 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "alt =" clip_image028 "src =" http://www.bkjia.com/uploads/allimg/140101/0020312421-13.jpg "height =" 363 "border =" 0 "/>

650) this. width = 650; "title =" clip_image030 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; margin: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "alt =" clip_image030 "src =" http://www.bkjia.com/uploads/allimg/140101/0020312321-14.jpg "height =" 336 "border =" 0 "/>

Next, test whether the domino password is reset:

650) this. width = 650; "title =" clip_image032 "style =" border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; border-left: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "alt =" clip_image032 "src =" http://www.bkjia.com/uploads/allimg/140101/002031C25-15.jpg "height =" 291 "border =" 0 "/>

This article from "Gao Wenlong" blog, please be sure to keep this source http://gaowenlong.blog.51cto.com/451336/1346887

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.