View Single Post
  #1  
Old 11-04-2013, 08:20 PM
Darkened Shadows
Fire Beetle
 
Join Date: Nov 2013
Location: United States
Posts: 4
Default Changing / Setting passwords in Database

I managed to get a server up and running and after many beers (instead of coffee) Got a local login server working. Even managed to setup one account and was able to login to my server by making and sourceing a sql file.

My trouble is I sourced a file to set the 1st account


source addaccount.sql
Code:
INSERT INTO tblLoginServerAccounts (AccountName, AccountPassword, AccountEmail, LastLoginDate, LastIPAddress) VALUES('Test', sha('Password'), 'test@password.com', now(), '127.0.0.1');
Works great for adding more accounts for the 1st time but mySQL knowledge is limited at best. I think I understand the sha part of sha('Password') hashes the password in the database.

Issue is how do I change a password if it is forgotten by my friends? I tried to just change it in the table but it is unhashed and does not work. Is there a way to make a file that I can source like say
source change_password.sql
that will just edit tblLoginServerAccounts like

source changepasword.sql
Code:
UPDATE tblLoginServerAccounts <<<SOME CODE HERE I DON"T KNOW
Any other way to setup new accounts and change the passwords that is ez I am open to also. My old AION server came with a website that I could admin into and do this.

Thanks in advance
Reply With Quote