<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://tech.uvoo.io/index.php?action=history&amp;feed=atom&amp;title=Encrypted_passwords_on_Linux</id>
	<title>Encrypted passwords on Linux - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://tech.uvoo.io/index.php?action=history&amp;feed=atom&amp;title=Encrypted_passwords_on_Linux"/>
	<link rel="alternate" type="text/html" href="https://tech.uvoo.io/index.php?title=Encrypted_passwords_on_Linux&amp;action=history"/>
	<updated>2026-04-25T06:44:25Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>https://tech.uvoo.io/index.php?title=Encrypted_passwords_on_Linux&amp;diff=2888&amp;oldid=prev</id>
		<title>Busk: Created page with &quot;https://unix.stackexchange.com/questions/81240/manually-generate-password-for-etc-shadow ``` Method 1 (md5, sha256, sha512) openssl passwd -6 -salt xyz  yourpass Note: passing...&quot;</title>
		<link rel="alternate" type="text/html" href="https://tech.uvoo.io/index.php?title=Encrypted_passwords_on_Linux&amp;diff=2888&amp;oldid=prev"/>
		<updated>2022-03-30T18:02:54Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;https://unix.stackexchange.com/questions/81240/manually-generate-password-for-etc-shadow ``` Method 1 (md5, sha256, sha512) openssl passwd -6 -salt xyz  yourpass Note: passing...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;https://unix.stackexchange.com/questions/81240/manually-generate-password-for-etc-shadow&lt;br /&gt;
```&lt;br /&gt;
Method 1 (md5, sha256, sha512)&lt;br /&gt;
openssl passwd -6 -salt xyz  yourpass&lt;br /&gt;
Note: passing -1 will generate an MD5 password, -5 a SHA256 and -6 SHA512 (recommended)&lt;br /&gt;
&lt;br /&gt;
Method 2 (md5, sha256, sha512)&lt;br /&gt;
mkpasswd --method=SHA-512 --stdin&lt;br /&gt;
The option --method accepts md5, sha-256 and sha-512&lt;br /&gt;
&lt;br /&gt;
Method 3 (des, md5, sha256, sha512)&lt;br /&gt;
As @tink suggested, we can update the password using chpasswd using:&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;username:password&amp;quot; | chpasswd &lt;br /&gt;
Or you can use the encrypted password with chpasswd. First generate it using this:&lt;br /&gt;
&lt;br /&gt;
perl -e 'print crypt(&amp;quot;YourPasswd&amp;quot;, &amp;quot;salt&amp;quot;, &amp;quot;sha512&amp;quot;),&amp;quot;\n&amp;quot;'&lt;br /&gt;
Then later you can use the generated password to update /etc/shadow:&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;username:encryptedPassWd&amp;quot; | chpasswd -e&lt;br /&gt;
The encrypted password we can also use to create a new user with this password, for example:&lt;br /&gt;
&lt;br /&gt;
useradd -p 'encryptedPassWd'  username&lt;br /&gt;
```&lt;/div&gt;</summary>
		<author><name>Busk</name></author>
	</entry>
</feed>