title: How to create /etc/shadow hash values with openssl
body: <p><code>user1's</code> password is <code>HelloWorld</code></p>
  
  <pre><code>root@kali:~# cat /etc/shadow | grep user1
  user1:$6$GRZcztBQ$.eHNZsczu4D3g7bsGkZlVKi14nLG/5W8WXXr7vKbziwkKHCnq3fvBO.j1KPcVxyTqy/5.DXZy4lD8QqH1H2bH/:16458:0:99999:7:::
  
  root@kali:~# 
  </code></pre>
  
  <p>How can I produce the same hash digest for user1's password using openssl?</p>
  
  <p>In my openssl command below, I don't get the same hash value as stored in <code>/etc/shadow</code> for user1. What am I doing wrong? I'm even using the same salt.</p>
  
  <pre><code>root@kali:~# echo -n $GRZcztBQ\$HelloWorld | openssl dgst -sha512
  (stdin)= 0afd50eb46b2004be59c3ac2b53e456e5359dc20debe561afabafdaac0eda7d1e666b766de537bbc663f8b2290f2177fc16659e874c05ce5651f0722c65f901c
  
  root@kali:~# 
  </code></pre>