title: convert plain-text password to MD5 salted hash
body: <p>For example under FreeBSD passwords are stored in /etc/master.passwd like this:</p>
  
  <pre><code>$1$7wtGfwgp$772bEQInetnJKUNtLM0Xt/
  </code></pre>
  
  <p>The password I used was "Test11". As I understand, $1$ means that it's a hashed MD5 crypt? How can one come up with the final hash "772bEQInetnJKUNtLM0Xt/" if he is aware of salt and password and uses md5sum? As I understand, it should be something like:</p>
  
  <pre><code>$ echo -n $(echo -n 7wtGfwgp)$(echo -n Test11) | md5sum
  </code></pre>
  
  <p>..but this doesn't quite match up. What am I doing wrong?</p>
  
  <p>PS I'm asking this in order to understand the password hashing system under UNIX-like operating systems.</p>