Discuz論壇使用者忘記登入密碼,MySQL解決方案

來源:互聯網
上載者:User

標籤:登入密碼   忘記密碼   使用者登入   password   資料庫工具   

與使用者以及密碼相關的表:

   1) pre_common_members、pre_ucenter_members

   2) pre_common_members表中的密碼只是對隨機碼的一次md5加密,使用者登入的時候並不會使用到web登入密碼只和pre_ucenter_members表有關


1. 使用者user1忘記密碼,登入不了;重新註冊一個新使用者名稱為usertest,密碼設定為12345678

    說明:考慮到加密的複雜性,採用密碼覆蓋方法


650) this.width=650;" src="https://s3.51cto.com/wyfs02/M00/8D/6C/wKioL1icFnmwlUlIAADYUBRa8Wo355.png" title="1.png" alt="wKioL1icFnmwlUlIAADYUBRa8Wo355.png" />


2. 用資料庫工具Navicat for MYSQL登入discuz資料庫,查看pre_ucenter_members表,擷取到

    使用者usertest的password、salt值

    說明:usertest經過兩次MD5加密,非明碼

              password:7f08d654bc1baef5c810ede044fb677c

              salt:6950e2


650) this.width=650;" src="/e/u261/themes/default/images/spacer.gif" style="background:url("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd;" alt="spacer.gif" />650) this.width=650;" src="https://s5.51cto.com/wyfs02/M00/8D/6F/wKiom1icFoqTnI6XAABtGvzU4Xc721.png" title="2.png" alt="wKiom1icFoqTnI6XAABtGvzU4Xc721.png" />


3. 用mysql語句更新使用者user1的password和salt值,需和使用者usertest一致

    語句1:

     UPDATE pre_ucenter_members SET password = ‘7f08d654bc1baef5c810ede044fb677c‘ WHERE username = ‘user1‘

    語句2:

    UPDATE pre_ucenter_members SET salt = ‘6950e2‘ WHERE username = ‘user1‘

650) this.width=650;" src="/e/u261/themes/default/images/spacer.gif" style="background:url("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd;" alt="spacer.gif" />

650) this.width=650;" src="https://s5.51cto.com/wyfs02/M00/8D/6C/wKioL1icFpnT7hutAAA_kaKhrtI915.png" style="float:none;" title="3.png" alt="wKioL1icFpnT7hutAAA_kaKhrtI915.png" />


650) this.width=650;" src="https://s2.51cto.com/wyfs02/M01/8D/6F/wKiom1icFpuhBuKYAAAx1lRRfj0820.png" style="float:none;" title="31.png" alt="wKiom1icFpuhBuKYAAAx1lRRfj0820.png" />

650) this.width=650;" src="/e/u261/themes/default/images/spacer.gif" style="background:url("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd;" alt="spacer.gif" />


4. 再次查看pre_ucenter_members表,已更新成功


650) this.width=650;" src="/e/u261/themes/default/images/spacer.gif" style="background:url("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd;" alt="spacer.gif" />650) this.width=650;" src="https://s3.51cto.com/wyfs02/M01/8D/6F/wKiom1icFq7CnxRuAABiz1qx7HI390.png" title="4.png" alt="wKiom1icFq7CnxRuAABiz1qx7HI390.png" />


5. 使用者名稱user1,新密碼12345678,再次登入成功

650) this.width=650;" src="/e/u261/themes/default/images/spacer.gif" style="background:url("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd;" alt="spacer.gif" />650) this.width=650;" src="https://s5.51cto.com/wyfs02/M01/8D/6C/wKioL1icFr3THS-TAAEzy1E5pFg007.png" title="5.png" alt="wKioL1icFr3THS-TAAEzy1E5pFg007.png" />


Discuz論壇使用者忘記登入密碼,MySQL解決方案

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.