Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-20365

Salted Crypt passwords option for external database authentication

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      • Set up a database for authentication as per the standard usage of this module.
      • Ensure the password field allows at least 62 characters.
      • Set Site Administration > Plugins > Administration > External Database > * Password format to "salted crypt()"
      • Update the password field for a user with a command such as:
        UPDATE user SET passwd=ENCRYPT('12345','$5$hdus85k$');
      • Try to log in with an incorrect password and ensure it doesn't work.
      • Log in using the user name and the password set above. (12345 in the example). Ensure it works.
      Show
      Set up a database for authentication as per the standard usage of this module. Ensure the password field allows at least 62 characters. Set Site Administration > Plugins > Administration > External Database > * Password format to "salted crypt()" Update the password field for a user with a command such as: UPDATE user SET passwd=ENCRYPT('12345','$5$hdus85k$'); Try to log in with an incorrect password and ensure it doesn't work. Log in using the user name and the password set above. (12345 in the example). Ensure it works.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-20365_auth_db_salted_passwords

      Description

      This patch adds an option to use Salted Crypt passwords for the password format with external database authentication. Unix passwords are often encrypted with salt characters. The salt characters become part of the encrypted password. To test a new plain password to see if it's valid, you must encrypt the new password it with the same salt characters as the old password, then compare the result.. Salted Crypt passwords happened to be used in the database of the system I needed to authenticate against. Hence this patch.

        Attachments

        1. patch.2.x.txt
          4 kB
          Tamas Pinter
        2. patch.txt
          4 kB
          Scott

          Issue Links

            Activity

              People

              • Votes:
                3 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/May/15