您的位置:首页 > 其它

忘记DotNetNuke的host密码?-如何恢复丢失的DNN密码

2007-12-01 11:24 696 查看
SQL Script recovering host password use asp.net store procedure

-------------------------------------------------------------------------------------

Declare @UserName NVarChar(255)

Declare @NewPassword NVarChar(255)

Declare @PasswordSalt NVarChar(128)

Declare @Application NVarChar(255)

-- Enter the user name and new password between ''

-- do not leave any spaces unless intended to do so.

-- Edit only between single quote characters

Set @UserName = 'host' -- This default DNN host user

Set @NewPassword = 'newpassword' --New password

-- Do modify any code below this line

Set @Application = (SELECT [ApplicationID] FROM aspnet_Users WHERE UserName=@UserName)

Set @PasswordSalt = (SELECT PasswordSalt FROM aspnet_Membership WHERE UserID IN (SELECT UserID FROM aspnet_Users WHERE UserName=@UserName))

Exec dbo.aspnet_Membership_ResetPassword @Application, @UserName, @NewPassword, 10, 10, @PasswordSalt, -5

-------------------------------------------------------------------------------------

另一个方法:

As there are
frequent requests from users, who lost the password of the host account
(and you cannot request the host password by email), the following
solution will help for all DNN 3 and 4 installation. Please note, that
your need direct access to the database to suceed with the issue:

if "register" is not displayed for the portal, go to
table "Portals" in your database and enter value "2" into
column "Registration".

create a new user account by registration (this time, please remember the password you enter!)

go to database, enter table "ASPNet_Membership"

go
to new user account (usually the last one) and copy the encrypted
values of columns "Password" and "PasswordSalt" into the same columns
of user account "host" (usually th first entry in this table)

login as user "host" using the new password and delete the reshly created other user.

Keep remembering your password ;)

来自:http://www.deutschnetnuke.de/tabid/183/Default.aspx
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: