Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Lost password, but access to server


Reply

3 Posts   1060 Views

Avatar
Tigerpie

31 July 2009 at 9:15am Community Member, 10 Posts

As title says, I have lost my password for my site.
I also didnt set up a proper email address :-(

I can access the server for my site though, via cpanel, and I also have a fw exported db's for when i transfered the site from my computer to the proper server.
I searched it and found where the password is stored but it is encrypted and i dont know how to decrypt it.

I was wondering if there is anything i can do?

Cheers
Scott

Avatar
banal

31 July 2009 at 11:29am Community Member, 901 Posts

Add the following line to your mysite/_config.php (if you got access to the cpanel you should also to be able to get FTP access):

Security::setDefaultAdmin("<username>", "<password>");

Replace <username> and <password> with the desired username/password and login using these credentials. You should the be able to change the admin password in the CMS.
After that, be sure to remove the previously added line from the _config.php

Oh and btw.: Did you even bother to search for an answer for this problem? It has been answered a dozen times already.

Avatar
Tigerpie

31 July 2009 at 6:06pm Community Member, 10 Posts

Thanks for that Banal.
I did do a quick search and got to reading about why passwords wouldnt work after a server move and diff versions of php etc etc......then i thought it might be easier to just ask the question...especially since i was knackered and about to go to bed.

But yes, i know that was the lazy way and generally im not like that.....but somestimes I fall back to bad habits.

Thanks again.