Jump to content

get Password Account Player


xXGhostXx

Recommended Posts

  • MTA Anti-Cheat Team
25 minutes ago, xXGhostXx said:

If the player forgets his password

You should just take the proper approach which is adding a password recovery feature to whatever custom account system it is that you're running, instead of trying to mess with sensitive data manually. If you're not using a custom account system; MTA's default account database doesn't store passwords in plaintext, but hashed & salted. For obvious reasons, no one on this forum is going to help you get around that.

Atleast you know what to do in order to solve your concern now, if you need further help with doing the right thing (adding/scripting a password recovery feature) then feel free to post in here again.

If you however are using the hardcoded (default) account system, you can help players to recover their lost passwords by writing this in the server console: chgpass [accountname] [new password] as opposed to the command for players to change their own (non-lost) password, which is /chgmypass.

Note; 'chgpass' can also be used ingame by your staff/admins if you explicitly add the right for them to do so in ACL.xml

@xXGhostXx

Link to comment

@xXGhostXx 

The password is one-way hashed (hashing is not the same as encryption) and this means that it is not possible for anyone to read the password. It is important for server owners to not store passwords in plaintext, and in fact, many people have gotten into trouble for revealing passwords.

If someone forgets their password, this is what you should do:

  1. Ask the player to join your server
  2. Check their serial
  3. Check your server logs to verify that this serial has logged into the account they want to reset.
  4. Use https://wiki.multitheftauto.com/wiki/SetAccountPassword (or chgpass , as Dutchman mentioned above) to reset the password to something random
  5. Send the player the new temporary password
  6. Ask the player to log in using the temporary password, and then change the password using the chgmypass command as Dutchman mentioned above.
  7. Now the user has recovered their account without you knowing their password, and without you knowing their new password.

In the future, you can write a resource to allow players to set an email address using https://wiki.multitheftauto.com/wiki/SetAccountData. This allows you to skip the process of verifying the serial, and you can simply start at #4 above, and in #5 send the temporary password to the email address saved.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...