xXGhostXx Posted September 26, 2018 Share Posted September 26, 2018 Hi guys ! please give me function for show password player account ! Thanks . 1 Link to comment
iMr.WiFi..! Posted September 26, 2018 Share Posted September 26, 2018 2 minutes ago, xXGhostXx said: Hi guys ! please give me function for show password player account ! Thanks . There no function like this,You need to save it as AccountData but the best that you work with SQL or db. Link to comment
xXGhostXx Posted September 26, 2018 Author Share Posted September 26, 2018 25 minutes ago, iMr.WiFi..! said: There no function like this,You need to save it as AccountData but the best that you work with SQL or db. i Have account Data ! But i need player account password ! Please answer me ! Link to comment
NeXuS™ Posted September 26, 2018 Share Posted September 26, 2018 (edited) I suppose you are using Accounts, there are ways to create a workaround to save the passwords, but you should hash those datas, as if someone gets damaged because you have saved his/her password as plain text, you'll be in trouble. Edited September 26, 2018 by NeXuS™ Link to comment
xXGhostXx Posted September 26, 2018 Author Share Posted September 26, 2018 8 minutes ago, NeXuS™ said: I suppose you are using Accounts, there are ways to create a workaround to save the passwords, but you should hash those datas, as if someone gets damaged because you have saved his/her password as plain text, you'll be in trouble. You can help me ? Link to comment
NeXuS™ Posted September 26, 2018 Share Posted September 26, 2018 Why do you need those passwords? Link to comment
xXGhostXx Posted September 26, 2018 Author Share Posted September 26, 2018 2 minutes ago, NeXuS™ said: Why do you need those passwords? If the player forgets his password Link to comment
MTA Anti-Cheat Team Dutchman101 Posted September 26, 2018 MTA Anti-Cheat Team Share Posted September 26, 2018 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
qaisjp Posted September 26, 2018 Share Posted September 26, 2018 @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: Ask the player to join your server Check their serial Check your server logs to verify that this serial has logged into the account they want to reset. Use https://wiki.multitheftauto.com/wiki/SetAccountPassword (or chgpass , as Dutchman mentioned above) to reset the password to something random Send the player the new temporary password Ask the player to log in using the temporary password, and then change the password using the chgmypass command as Dutchman mentioned above. 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now