Sync MySQL passwords with local account passwords?
Couldn't find anything about this in the MySQL manuals, or on Google...
Is there a way to get MySQL to pull a local user's system password into its user table? We're required to force users to reset their passwords every 90 days on production servers, and I'd like to set something up so that their MySQL password gets updated at the same time as their system password.
Any suggestions or helpful links?
MAYBE this could work: If the algorithm that MySQL uses to encrypt the passwords is the same being used in the passwords file, then you only need to copy the password fields from the passwords file into the MySQL database. Unfortunately I'm a noob, so can't tell you if that's the case or not.
If the algorithms are different, I see only two ways to obtain the passwords:
- Again, The linux password file. There they are decrypted, so you will need to decrypt the passwords which I think (and hope) is VERY difficult to do.
- The instant when the users change their password. Maybe you could modify the script that asks users to modify the password to do the update in MySQL.
I've been waiting for somebody to answer this...as I'm very interested in it too.
Unfortunately, the encryption methods are different - from the current manual.
"MySQL encrypts passwords using its own algorithm. This encryption is different from that used during the Unix login process. MySQL password encryption is the same as that implemented by the PASSWORD() SQL function. Unix password encryption is the same as that implemented by the ENCRYPT() SQL function."
There's simply got to be a way!
|All times are GMT -5. The time now is 01:51 PM.|