Showing posts with label reset password. Show all posts
Showing posts with label reset password. Show all posts

Wednesday, September 28, 2011

Reset mysql 5.1 root pass

I had to install a couple of dbs on a mysql server which refused to recognize me as its root… I kept receiving the following not-so-friendly message:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
As it turns out, something was messed up during the installation and mysql did not recognize the given root password (mistype perhaps?). Anyway, I had to reset the pass, and this is how I did it.

Tuesday, May 18, 2010

Hard reset password on asp.net membership provider (applied to DNN)

I just moved a DNN (DotNetNuke) installation from a computer to another and restored the database in order to be able to work locally. DNN uses asp.net Membership as its default security provider thus I could not login to the web site (all passwords are encrypted using the local machine key). In order to override the password I wrote the following lines of code:
Dim mu As MembershipUser = Membership.GetUser("MyUserName")
mu.ChangePassword(mu.ResetPassword(), "mytoughpassword")
In the default page’s init event. This is the way to programmatically change any membership account’s password.

Happy coding and don't forget to delete the above mentioned lines after reseting the passwords!