<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=Linux%2Fmkpasswd</id>
	<title>Linux/mkpasswd - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=Linux%2Fmkpasswd"/>
	<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Linux/mkpasswd&amp;action=history"/>
	<updated>2026-05-07T04:25:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://aznot.com/index.php?title=Linux/mkpasswd&amp;diff=6109&amp;oldid=prev</id>
		<title>Kenneth: Created page with &quot;The /etc/shadow password format is set to $id$salt$hashed, The $id is the algorithm used On GNU/Linux as follows:  $1$ is MD5  $2a$ is Blowfish  $2y$ is Blowfish  $5$ is SHA-2...&quot;</title>
		<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Linux/mkpasswd&amp;diff=6109&amp;oldid=prev"/>
		<updated>2022-10-17T16:20:47Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;The /etc/shadow password format is set to $id$salt$hashed, The $id is the algorithm used On GNU/Linux as follows:  $1$ is MD5  $2a$ is Blowfish  $2y$ is Blowfish  $5$ is SHA-2...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The /etc/shadow password format is set to $id$salt$hashed, The $id is the algorithm used On GNU/Linux as follows:&lt;br /&gt;
 $1$ is MD5&lt;br /&gt;
 $2a$ is Blowfish&lt;br /&gt;
 $2y$ is Blowfish&lt;br /&gt;
 $5$ is SHA-256&lt;br /&gt;
 $6$ is SHA-512&lt;br /&gt;
&lt;br /&gt;
Install mkpasswd:&lt;br /&gt;
 sudo apt install whois&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
 mkpasswd -m [algorithm] [password] [salt]&lt;br /&gt;
&lt;br /&gt;
If you don&amp;#039;t specify a salt, one will be generated.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 mkpasswd -m SHA-512 test1234 OXE8gHwh2.nmuwp7&lt;br /&gt;
 $6$OXE8gHwh2.nmuwp7$lrs3VWJiL9bFG0HRjtSWI3T7hbQOIVOA8GewwM7nPaZKy7TXtiD/pKoEM.pQvR9NNpnZyP2qhCrsvVf1NJEFl/&lt;br /&gt;
&lt;br /&gt;
Note: You can also use the above to compare with and existing password to make sure you know what the password is.&lt;br /&gt;
&lt;br /&gt;
Python example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import crypt&lt;br /&gt;
 &lt;br /&gt;
# usage: crypt.crypt(&amp;quot;password&amp;quot;, &amp;quot;hasing algorithm + salt&amp;quot;)&lt;br /&gt;
print(crypt.crypt(&amp;quot;test1234&amp;quot;, &amp;quot;$6$OXE8gHwh2.nmuwp7$&amp;quot;))&lt;br /&gt;
 &lt;br /&gt;
# sample output: $6$OXE8gHwh2.nmuwp7$lrs3VWJiL9bFG0HRjtSWI3T7hbQOIVOA8GewwM7nPaZKy7TXtiD/pKoEM.pQvR9NNpnZyP2qhCrsvVf1NJEFl/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ref: [https://www.geekyhacker.com/2021/04/11/verify-a-users-password-in-linux/]&lt;br /&gt;
&lt;br /&gt;
ref: [https://www.cyberciti.biz/faq/understanding-etcshadow-file/]&lt;/div&gt;</summary>
		<author><name>Kenneth</name></author>
	</entry>
</feed>