1MOSQUITTO_PASSWD(1)                Commands                MOSQUITTO_PASSWD(1)
2
3
4

NAME

6       mosquitto_passwd - manage password files for mosquitto
7

SYNOPSIS

9       mosquitto_passwd [-c | -D] passwordfile username
10
11       mosquitto_passwd -b passwordfile username password
12
13       mosquitto_passwd -U passwordfile
14

DESCRIPTION

16       mosquitto_passwd is a tool for managing password files for the
17       mosquitto MQTT broker.
18
19       Usernames must not contain ":". Passwords are stored in a similar
20       format to crypt(3).
21

OPTIONS

23       -b
24           Run in batch mode. This allows the password to be provided at the
25           command line which can be convenient but should be used with care
26           because the password will be visible on the command line and in
27           command history.
28
29       -c
30           Create a new password file. If the file already exists, it will be
31           overwritten.
32
33       -D
34           Delete the specified user from the password file.
35
36       -U
37           This option can be used to upgrade/convert a password file with
38           plain text passwords into one using hashed passwords. It will
39           modify the specified file. It does not detect whether passwords are
40           already hashed, so using it on a password file that already
41           contains hashed passwords will generate new hashes based on the old
42           hashes and render the password file unusable.
43
44       passwordfile
45           The password file to modify.
46
47       username
48           The username to add/update/delete.
49
50       password
51           The password to use when in batch mode.
52

EXIT STATUS

54       mosquitto_sub returns zero on success, or non-zero on error. If the
55       connection is refused by the broker at the MQTT level, then the exit
56       code is the CONNACK reason code. If another error occurs, the exit code
57       is a libmosquitto return value.
58
59       MQTT v3.1.1 CONNACK codes:
60
61       ·   0 Success
62
63       ·   1 Connection refused: Bad protocol version
64
65       ·   2 Connection refused: Identifier rejected
66
67       ·   3 Connection refused: Server unavailable
68
69       ·   4 Connection refused: Bad username/password
70
71       ·   5 Connection refused: Not authorized
72
73       MQTT v5 CONNACK codes:
74
75       ·   0 Success
76
77       ·   128 Unspecified error
78
79       ·   129 Malformed packet
80
81       ·   130 Protocol error
82
83       ·   131 Implementation specific error
84
85       ·   132 Unsupported protocol version
86
87       ·   133 Client ID not valid
88
89       ·   134 Bad username or password
90
91       ·   135 Not authorized
92
93       ·   136 Server unavailable
94
95       ·   137 Server busy
96
97       ·   138 Banned
98
99       ·   139 Server shutting down
100
101       ·   140 Bad authentication method
102
103       ·   141 Keep alive timeout
104
105       ·   142 Session taken over
106
107       ·   143 Topic filter invalid
108
109       ·   144 Topic name invalid
110
111       ·   147 Receive maximum exceeded
112
113       ·   148 Topic alias invalid
114
115       ·   149 Packet too large
116
117       ·   148 Message rate too high
118
119       ·   151 Quota exceeded
120
121       ·   152 Administrative action
122
123       ·   153 Payload format invalid
124
125       ·   154 Retain not supported
126
127       ·   155 QoS not supported
128
129       ·   156 Use another server
130
131       ·   157 Server moved
132
133       ·   158 Shared subscriptions not supported
134
135       ·   159 Connection rate exceeded
136
137       ·   160 Maximum connect time
138
139       ·   161 Subscription IDs not supported
140
141       ·   162 Wildcard subscriptions not supported
142

EXAMPLES

144       Add a user to a new password file:
145
146       ·   mosquitto_passwd -c /etc/mosquitto/passwd ral
147
148       Delete a user from a password file
149
150       ·   mosquitto_passwd -D /etc/mosquitto/passwd ral
151

BUGS

153       mosquitto bug information can be found at
154       https://github.com/eclipse/mosquitto/issues
155

SEE ALSO

157       mosquitto(8), mosquitto.conf(5), mqtt(7)
158

AUTHOR

160       Roger Light <roger@atchoo.org>
161
162
163
164Mosquitto Project                 08/19/2020               MOSQUITTO_PASSWD(1)
Impressum