Lost admin account and password
Added by Jean-Luc Pinardon almost 16 years ago
Dear all,
I am a new (french) Redmine user (Redmine 0.7.3 on Ubuntu Hardy Heron +MySQL database), I want to evaluate it for Change and Software Conf management. That means that I am very interesting by the complete svn+redmine integration.
So, during some trials to obtain the complete configuration, I finally lost the admin account.
I really don't known what happened.
So, perhaps does it still exists perhaps not.
How can I retrieve it ?
Is there a quite simple procedure, or should I reinstall the redmine application, knowing that I have made nothing really important.
Thanks for your help.
Best Regards,
J-L
Replies (3)
RE: Lost admin account and password - Added by Eric Davis almost 16 years ago
There is the lost password link on the /login page you can use if you remember the email.
Otherwise you can run one of the following commands:
To find the email account for the admin user to use with the list password link¶
RAILS_ENV=production script/runner 'puts User.find(:first, :conditions => {:admin => true}).mail'
Find the first admin user and set their password to 'my_password'¶
RAILS_ENV=production script/runner 'user = User.find(:first, :conditions => {:admin => true}) ; user.password, user.password_confirmation = "my_password"; user.save!'
Eric
RE: Lost admin account and password - Added by Jean-Luc Pinardon almost 16 years ago
Good evening,
And thanks for your quick help.
My problem is solved.
Best Regards,
J-L
RE: Lost admin account and password - Added by Henrik Pitkala about 15 years ago
If you want to run a command from console, you can use
ruby script/runner 'command' -e production
For example:
ruby script/runner 'puts User.find(:first, :conditions => {:admin => true}).mail' -e production