{"id":579,"date":"2016-06-21T17:07:41","date_gmt":"2016-06-21T22:07:41","guid":{"rendered":"http:\/\/bitc.bme.emory.edu\/~lzhou\/blogs\/?p=579"},"modified":"2016-06-21T17:07:41","modified_gmt":"2016-06-21T22:07:41","slug":"linux-create-salted-password","status":"publish","type":"post","link":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/?p=579","title":{"rendered":"Linux create salted password"},"content":{"rendered":"<p>Method 1<\/p>\n<p>openssl passwd -1 -salt xyz  yourpass<\/p>\n<p>Method 2<\/p>\n<p>makepasswd &#8211;clearfrom=- &#8211;crypt-md5 &lt;&lt;&lt; YourPass<\/p>\n<p>Method 3<\/p>\n<p>echo &quot;username:password&quot; | chpasswd <\/p>\n<p>Or you can use encrypted password with chpasswd first generate it using :<\/p>\n<p>perl -e &#039;print crypt(&quot;YourPasswd&quot;, &quot;salt&quot;),&quot;\\n&quot;&#039;<\/p>\n<p>then later you can use generated password to update<\/p>\n<p>echo &quot;username:encryptedPassWd&quot;  | chpasswd -e<\/p>\n<p>this encrypted password we can use to create new user with password<\/p>\n<p>Ex.<\/p>\n<p>useradd -p &#039;encryptedPassWd&#039;  username<\/p>\n<p>Method 4<\/p>\n<p>echo -e &quot;md5crypt\\npassword&quot; | grub | grep -o &quot;\\$1.*&quot;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Method 1 openssl passwd -1 -salt xyz yourpass Method 2 makepasswd &#8211;clearfrom=- &#8211;crypt-md5 &lt;&lt;&lt; YourPass Method 3 echo &quot;username:password&quot; | chpasswd Or you can use encrypted password with chpasswd first generate it using : perl -e &#039;print crypt(&quot;YourPasswd&quot;, &quot;salt&quot;),&quot;\\n&quot;&#039; then later you can use generated password to update echo &quot;username:encryptedPassWd&quot; | chpasswd -e this encrypted [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,3],"tags":[],"class_list":["post-579","post","type-post","status-publish","format-standard","hentry","category-computer-tips","category-mri-technical-support","post-blog"],"_links":{"self":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/579","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=579"}],"version-history":[{"count":1,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/579\/revisions"}],"predecessor-version":[{"id":580,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/579\/revisions\/580"}],"wp:attachment":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=579"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=579"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}