• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Modern AAC - invalid password - Tutorial

tosse12

Panchira Project Member
Joined
Jun 10, 2007
Messages
864
Reaction score
9
Location
Sweden
I am not sure what I should have as title so, I am using "Modern acc - invalid password - Tutorial" for now, please if you have better title, post it!

Okey back to the topic.
I have seen hundreds of question about "invalid password" and "why is the pass like this: 7110eda4d09e062aa5e4a390b0a572ac0d2c0220, when I typed: 1234 as password"
The answear is easy, this is called encryption.
Your password has been encrypt to a hash code, which is told that it's impossible to decrypt.

Now how to fix that you can loggin to your account with the tibia client!

Open up your config.lua
Scroll down untill you comes to the database part:
Code:
	sqlType = "xxxx"
	sqlHost = "xxxx"
	sqlPort = xxxx
	sqlUser = "xxxx"
	sqlPass = "xxx"
	sqlDatabase = "xxxx"
	sqlFile = "forgottenserver.s3db"
	sqlKeepAlive = 0
	mysqlReadTimeout = 10
	mysqlWriteTimeout = 10
	[COLOR="Red"][U][B]encryptionType = "plain"[/B][/U][/COLOR]

You see the marked line in red?
Code:
encryptionType = "plain"
Change that to
Code:
encryptionType = "sha1"
so now it should look like this:
Code:
	sqlType = "xxxx"
	sqlHost = "xxxx"
	sqlPort = xxxx
	sqlUser = "xxxx"
	sqlPass = "xxx"
	sqlDatabase = "xxxx"
	sqlFile = "forgottenserver.s3db"
	sqlKeepAlive = 0
	mysqlReadTimeout = 10
	mysqlWriteTimeout = 10
	[COLOR="Red"][U][B]encryptionType = "sha1"[/B][/U][/COLOR]
------ EDIT! -Credits to Kavvson
If you have plain password (a password you can read like "my pass is 210", then you can use this sql query:
Code:
UPDATE accounts SET password=SHA1(password) WHERE id = 1;
Just change id = 1, to the account id you want to hash the password at!
--------------
Restart your server and have fun when you are able to login!

Feedback please (so I can create better tutorials!) - If you think this is a bad tutorial please, tell me HOW I can make it better.
 
Last edited:
+ for existing plain passwords a query
PHP:
UPDATE accounts SET password=SHA1(password) WHERE id = 1;
id = 1, > x as u want
 
+ for existing plain passwords a query
PHP:
UPDATE accounts SET password=SHA1(password) WHERE id = 1;
id = 1, > x as u want

What if you already have a hashed password? :p that hashed password will be hashed again :p

edit:
NVM! :p forgot to read existing plain (even if you made it bold :D
 
dude 1 question plz what do i have to Query so AAAAALLL passwords OF all created accounts, change to sha1?? i think it has to do with the Id part, but im no scripter... could u tell me please? if there is any way?
 
Code:
UPDATE `accounts` SET password=SHA1(password) WHERE `id` = (max) >= 1;
Change max to the maximum ID you have.
and remove the () too shall look like this when u are done:
Code:
UPDATE `accounts` SET password=SHA1(password) WHERE `id` = 100 > 1;
 
ehm, this doesn't really seem to work, I just changed the plain text to sha1, even tho that i still get a pass like "3gnrugnu4n544un54ub54b5b4u5b454b5b545b4u5b4btednfdngbengn" when creating an account. And yes, I have restarted the server.
 
That's called encryption, visit Encryption - Wikipedia, the free encyclopedia

Encryption is: Making information harder to read for those who shall not read it.

3gnrugnu4n544un54ub54b5b4u5b454b5b545b4u5b4btednf dngbengn = encrypted password. Just ignore it. Let it be. You will still be able to login with your normal password
 
Back
Top