blob: f54d997a8433c7d352d3e7c19cccf14bafe08f43 [file] [log] [blame]
<?php include '../_includes/header.php' ?><div class="refentry">
<a name="mosquitto_passwd"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2>Name</h2>
<p>mosquitto_passwd — manage password files for mosquitto</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<div class="cmdsynopsis"><p><code class="command">mosquitto_passwd</code> [ <code class="option">-c</code> | <code class="option">-D</code> ] <em class="replaceable"><code>passwordfile</code></em> <em class="replaceable"><code>username</code></em> </p></div>
<div class="cmdsynopsis"><p><code class="command">mosquitto_passwd</code> <code class="option">-b</code> <em class="replaceable"><code>passwordfile</code></em> <em class="replaceable"><code>username</code></em> <em class="replaceable"><code>password</code></em> </p></div>
<div class="cmdsynopsis"><p><code class="command">mosquitto_passwd</code> <code class="option">-U</code> <em class="replaceable"><code>passwordfile</code></em> </p></div>
</div>
<div class="refsect1">
<a name="idp49115056"></a><h2>Description</h2>
<p><span class="command"><strong>mosquitto_passwd</strong></span> is a tool for managing
password files the the mosquitto MQTT broker.</p>
<p>Usernames must not contain ":". Passwords are stored in a similar
format to
<span class="citerefentry"><span class="refentrytitle">crypt</span>(3)</span>.</p>
</div>
<div class="refsect1">
<a name="idp49117616"></a><h2>Options</h2>
<div class="variablelist"><dl class="variablelist">
<dt><span class="term"><code class="option">-b</code></span></dt>
<dd><p>Run in batch mode. This allows the password to be
provided at the command line which can be convenient
but should be used with care because the password will
be visible on the command line and in command
history.</p></dd>
<dt><span class="term"><code class="option">-c</code></span></dt>
<dd><p>Create a new password file. If the file already
exists, it will be overwritten.</p></dd>
<dt><span class="term"><code class="option">-D</code></span></dt>
<dd><p>Delete the specified user from the password
file.</p></dd>
<dt><span class="term"><code class="option">-U</code></span></dt>
<dd><p>This option can be used to upgrade/convert a password
file with plain text passwords into one using hashed
passwords. It will modify the specified file. It does
not detect whether passwords are already hashed, so
using it on a password file that already contains
hashed passwords will generate new hashes based on the
old hashes and render the password file
unusable.</p></dd>
<dt><span class="term"><code class="option">passwordfile</code></span></dt>
<dd><p>The password file to modify.</p></dd>
<dt><span class="term"><code class="option">username</code></span></dt>
<dd><p>The username to add/update/delete.</p></dd>
<dt><span class="term"><code class="option">password</code></span></dt>
<dd><p>The password to use when in batch mode.</p></dd>
</dl></div>
</div>
<div class="refsect1">
<a name="idp49131104"></a><h2>Examples</h2>
<p>Add a user to a new password file:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem" style="list-style-type: circle"><p>mosquitto_passwd <code class="literal">-c</code> /etc/mosquitto/passwd <code class="literal">ral</code></p></li></ul></div>
<p>Delete a user from a password file</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem" style="list-style-type: circle"><p>mosquitto_passwd <code class="literal">-D</code> /etc/mosquitto/passwd <code class="literal">ral</code></p></li></ul></div>
</div>
<div class="refsect1">
<a name="idp49135968"></a><h2>Bugs</h2>
<p><span class="command"><strong>mosquitto_passwd</strong></span> bug information can be found at
<code class="uri">https://bugs.eclipse.org/bugs/describecomponents.cgi?product=Mosquitto</code></p>
</div>
<div class="refsect1">
<a name="idp49137760"></a><h2>See Also</h2>
<span class="simplelist">
<span class="citerefentry"><span class="refentrytitle"><a class="link" href="mosquitto-8.php" target="_top">mosquitto</a></span>(8)</span>
,
<span class="citerefentry"><span class="refentrytitle"><a class="link" href="mosquitto-conf-5.php" target="_top">mosquitto.conf</a></span>(5)</span>
,
<span class="citerefentry"><span class="refentrytitle"><a class="link" href="mqtt-7.php" target="_top">mqtt</a></span>(7)</span>
</span>
</div>
<div class="refsect1">
<a name="idp49144416"></a><h2>Author</h2>
<p>Roger Light <code class="email">&lt;<a class="email" href="mailto:roger@atchoo.org">roger@atchoo.org</a>&gt;</code></p>
</div>
</div><?php include '../_includes/footer.php' ?>