EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   Changing / Setting passwords in Database (https://www.eqemulator.org/forums/showthread.php?t=37474)

Darkened Shadows 11-04-2013 08:20 PM

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

sorvani 11-04-2013 11:09 PM

Code:

UPDATE tblLoginServerAccounts
    SET AccountPassword = sha('Password')
WHERE AccountName = 'YourFriendsAccountName';



All times are GMT -4. The time now is 10:06 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.