Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-17-2005, 11:46 AM   #1
LQ Newbie
Registered: Feb 2005
Distribution: RedHat 9/Fedora Core 3
Posts: 1

Rep: Reputation: 0
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?
Old 02-18-2005, 02:51 AM   #2
Registered: Jul 2004
Location: Santiago, Chile
Distribution: Ubuntu
Posts: 410

Rep: Reputation: 31
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.
Old 02-18-2005, 03:15 AM   #3
Registered: Oct 2003
Location: South London
Distribution: Gentoo.
Posts: 297

Rep: Reputation: 30
I've been waiting for somebody to answer 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!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Completely uninstalling MySQL and its passwords I locked myself out! Baix Linux - Newbie 2 01-30-2005 04:10 PM
SAMBA, guest account, Windows xp home and passwords woppa30 Linux - Networking 6 01-19-2005 02:57 AM
Samba and local passwords Qauzzix Linux - Networking 1 08-17-2004 01:21 PM
Sync user/group passwords?! jhewitt Linux - Newbie 1 02-12-2004 07:28 PM
Is there a way to sync Samba passwords with linux user passwords MarleyGPN Linux - Networking 2 09-09-2003 10:59 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:19 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration