Welcome Guest Login Register Member List
ExpressionEngine Forums
Advanced Search
Username: Password:
Remember Me? forgot password?
You are here: Forum Home  >  Installation  >  Tracks on a web host  >  Thread
   
 
Howto reset a user password?
 
cmontour
Posted: 26 October 2006 01:41 AM   [ Ignore ]  
Newbie
Rank
Total Posts:  3
Joined  2006-10-26

SUMMARY:

I need to reset my password!

GORY BACKGROUND:

I moved tracks from my home server to a Dreamhost account.  I dumped my MySQL tracks db, uploaded it to Dreamhost, and reimported it.  I then used instructions at http://www.javaconsulting.eu/.  Everything is swell, I get the login screen, but I can’t login :)

I think I just need to reset the password.  I am clueless on how the password encryption works.  This is where my faith takes over.  I’m thinking I can just do a SQL UPDATE on my row in the ‘users’ table and reset the ‘password’ and ‘word’ field.  But before I commit to breaking something, I thought I’d ask!

BTW, the production.log file reports the following when I try to login (if this is helpful):

Processing LoginController#login (for [snip_ip_address] at 2006-10-25 18:37:09) [P
OST]
  Session ID: [snip_session_id]
  Parameters: {“user_login”=>“[snip_username]“, “action”=>“login”, “controller”=>“logi
n”, “user_password”=>“”, “login”=>“Login \302\273”}
Rendering within layouts/login
Rendering login/login
Completed in 0.00375 (266 reqs/sec) | Rendering: 0.00186 (49%) | DB: 0.00118 (3
1%) | 200 OK [http://[snip_url]/login]

Profile
 
lukemelia
Posted: 26 October 2006 03:00 AM   [ Ignore ]   [ # 1 ]  
Member
Avatar
RankRankRank
Total Posts:  62
Joined  2006-07-18

try this:

~/devProjects/tracks/ lmelia$ script/console
Loading development environment.
>> user = User.find_by_login(‘lukemelia’)
=> #<User:0x3705028 @attributes={“word”=>“[snip_word]“, “is_admin”=>“1”, “id”=>“1”, “first_name”=>“”, “last_name”=>“”, “password”=>“[snip_password]“, “login”=>“lukemelia”}>
>> user.password = ‘newpass’
=> “newpass”
>> user.password_confirmation = ‘newpass’
=> “newpass”
>> user.save!
=> true
>> quit

Signature 

Luke Melia - Tracks committer - New York, NY - http://www.lukemelia.com/

Profile
 
cmontour
Posted: 26 October 2006 03:57 AM   [ Ignore ]   [ # 2 ]  
Newbie
Rank
Total Posts:  3
Joined  2006-10-26

Luke, I don’t know whether you just had me invoke ‘the spirits within’ or if that console trick is standard stuff, but it worked like a champ. 

Thanks very much.  I’m back in action.

Profile
 
lukemelia
Posted: 26 October 2006 04:09 AM   [ Ignore ]   [ # 3 ]  
Member
Avatar
RankRankRank
Total Posts:  62
Joined  2006-07-18

You have to offer up a small gemstone sacrifice to the spirits of script/console now. smile

Signature 

Luke Melia - Tracks committer - New York, NY - http://www.lukemelia.com/

Profile
 
bsag
Posted: 26 October 2006 09:24 AM   [ Ignore ]   [ # 4 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  217
Joined  2006-03-05

Nice one, Luke! Just for future information though, cmontour, did you remember to change the password salt in config/environment.rb? That’s used for encrypting/decrypting your password, so if you changed it from the default “change-me” originally, then forgot to set your changed salt when you migrated your install, that would explain the password not functioning properly.

Profile
 
cmontour
Posted: 26 October 2006 12:40 PM   [ Ignore ]   [ # 5 ]  
Newbie
Rank
Total Posts:  3
Joined  2006-10-26

Uh, yeah.  About that.  I was totally aware of that from the installation notes, but I forgot what my salt was from the original install and I couldn’t retrieve the old one!

Fantastic product, thanks for everyone’s effort.  I use it every day!

Profile
 
jcardona
Posted: 02 September 2008 11:25 PM   [ Ignore ]   [ # 6 ]  
Newbie
Rank
Total Posts:  1
Joined  2008-09-02

User.find_by_login() is not available on my version of tracks (1.5).
I could reset my admin password by using User.find_admin() instead.

j

Profile
 
   
 
 
‹‹ Moving Tracks info from web host to personal computer?      Tracks 1.043 on Plesk Linux webserver ››

Powered By ExpressionEngine
Template Design By Sonnenvogel.com
Select a theme:

ExpressionEngine Discussion Forum - Version 2.1.1 (20081028)
Script Executed in 0.1313 seconds

Atom Feed
RSS 2.0