Tools

Manually generate encrypted passwords for Serv-U

How Serv-U users can generate an encrypted password for insertion into an ODBC user database.

First published date

2/4/2019 5:45 PM

Last published date

10/22/2021 12:34 AM

Overview

How to generate an encrypted password for insertion into an ODBC user database.

Product section

Serv-U Managed File Transfer & Serv-U FTP Server

Cause

To manually encrypt the password for insertion into an ODBC user database.

Resolution

To generate an encrypted password for insertion into an ODBC user database (ODBC -or- .ini file in the case of Serv-U 6.x), first two random characters (the 'salt' - in the range a..z, A..Z) are added to the beginning of the clear-text password. This is then hashed using MD5 and the resulting hash is hex-encoded. The result of this is written as plain-text starting with the 2 salt characters followed by the hex-encoded hash.

The algorithm works as below:

ActionResult
Password is establishedTestPassword
2 salt characters are added to increase complexitycbTestPassword
Result is hashed using MD5 and displayed in hexadecimal8EA58F0751BAA5AF391253F7DADD3D46
2 salt characters added to beginning of previous hashcb8EA58F0751BAA5AF391253F7DADD3D46

When verifying a user's password, Serv-U will do the same. It parses the 'salt' from the user's stored password (i.e., "cb" in this case), prepends it the password the user sent to it by the client, MD5 hashes it, and compares the result with the stored hash. If the values are equal, then the entered password is correct.