move to 2.5.5
[anni] / docs / administration / CLI_tasks / user.md
1 # Managing users
2
3 {! backend/administration/CLI_tasks/general_cli_task_info.include !}
4
5 ## Create a user
6
7 === "OTP"
8
9     ```sh
10     ./bin/pleroma_ctl user new <nickname> <email> [option ...]
11     ```
12
13 === "From Source"
14
15     ```sh
16     mix pleroma.user new <nickname> <email> [option ...]
17     ```
18
19
20 ### Options
21 - `--name <name>` - the user's display name
22 - `--bio <bio>` - the user's bio
23 - `--password <password>` - the user's password
24 - `--moderator`/`--no-moderator` - whether the user should be a moderator
25 - `--admin`/`--no-admin` - whether the user should be an admin
26 - `-y`, `--assume-yes`/`--no-assume-yes` - whether to assume yes to all questions
27
28 ## List local users
29
30 === "OTP"
31
32     ```sh
33      ./bin/pleroma_ctl user list
34     ```
35
36 === "From Source"
37
38     ```sh
39     mix pleroma.user list
40     ```
41
42
43 ## Generate an invite link
44
45 === "OTP"
46
47     ```sh
48      ./bin/pleroma_ctl user invite [option ...]
49     ```
50
51 === "From Source"
52
53     ```sh
54     mix pleroma.user invite [option ...]
55     ```
56
57
58 ### Options
59 - `--expires-at DATE` - last day on which token is active (e.g. "2019-04-05")
60 - `--max-use NUMBER` - maximum numbers of token uses
61
62 ## List generated invites
63
64 === "OTP"
65
66     ```sh
67      ./bin/pleroma_ctl user invites
68     ```
69
70 === "From Source"
71
72     ```sh
73     mix pleroma.user invites
74     ```
75
76
77 ## Revoke invite
78
79 === "OTP"
80
81     ```sh
82      ./bin/pleroma_ctl user revoke_invite <token>
83     ```
84
85 === "From Source"
86
87     ```sh
88     mix pleroma.user revoke_invite <token>
89     ```
90
91
92 ## Delete a user
93
94 === "OTP"
95
96     ```sh
97      ./bin/pleroma_ctl user rm <nickname>
98     ```
99
100 === "From Source"
101
102     ```sh
103     mix pleroma.user rm <nickname>
104     ```
105
106
107 ## Delete user's posts and interactions
108
109 === "OTP"
110
111     ```sh
112      ./bin/pleroma_ctl user delete_activities <nickname>
113     ```
114
115 === "From Source"
116
117     ```sh
118     mix pleroma.user delete_activities <nickname>
119     ```
120
121
122 ## Sign user out from all applications (delete user's OAuth tokens and authorizations)
123
124 === "OTP"
125
126     ```sh
127      ./bin/pleroma_ctl user sign_out <nickname>
128     ```
129
130 === "From Source"
131
132     ```sh
133     mix pleroma.user sign_out <nickname>
134     ```
135
136 ## Activate a user
137
138 === "OTP"
139
140     ```sh
141      ./bin/pleroma_ctl user activate NICKNAME
142     ```
143
144 === "From Source"
145
146     ```sh
147     mix pleroma.user activate NICKNAME
148     ```
149
150 ## Deactivate a user and unsubscribes local users from the user
151
152 === "OTP"
153
154     ```sh
155      ./bin/pleroma_ctl user deactivate NICKNAME
156     ```
157
158 === "From Source"
159
160     ```sh
161     mix pleroma.user deactivate NICKNAME
162     ```
163
164
165 ## Deactivate all accounts from an instance and unsubscribe local users on it
166
167 === "OTP"
168
169     ```sh
170      ./bin/pleroma_ctl user deactivate_all_from_instance <instance>
171     ```
172
173 === "From Source"
174
175     ```sh
176     mix pleroma.user deactivate_all_from_instance <instance>
177     ```
178
179
180 ## Create a password reset link for user
181
182 === "OTP"
183
184     ```sh
185      ./bin/pleroma_ctl user reset_password <nickname>
186     ```
187
188 === "From Source"
189
190     ```sh
191     mix pleroma.user reset_password <nickname>
192     ```
193
194
195 ## Disable Multi Factor Authentication (MFA/2FA) for a user
196
197 === "OTP"
198
199     ```sh
200      ./bin/pleroma_ctl user reset_mfa <nickname>
201     ```
202
203 === "From Source"
204
205     ```sh
206     mix pleroma.user reset_mfa <nickname>
207     ```
208
209
210 ## Set the value of the given user's settings
211
212 === "OTP"
213
214     ```sh
215      ./bin/pleroma_ctl user set <nickname> [option ...]
216     ```
217
218 === "From Source"
219
220     ```sh
221     mix pleroma.user set <nickname> [option ...]
222     ```
223
224 ### Options
225 - `--admin`/`--no-admin` - whether the user should be an admin
226 - `--confirmed`/`--no-confirmed` - whether the user account is confirmed
227 - `--locked`/`--no-locked` - whether the user should be locked
228 - `--moderator`/`--no-moderator` - whether the user should be a moderator
229
230 ## Add tags to a user
231
232 === "OTP"
233
234     ```sh
235      ./bin/pleroma_ctl user tag <nickname> <tags>
236     ```
237
238 === "From Source"
239
240     ```sh
241     mix pleroma.user tag <nickname> <tags>
242     ```
243
244
245 ## Delete tags from a user
246
247 === "OTP"
248
249     ```sh
250      ./bin/pleroma_ctl user untag <nickname> <tags>
251     ```
252
253 === "From Source"
254
255     ```sh
256     mix pleroma.user untag <nickname> <tags>
257     ```
258
259
260 ## Toggle confirmation status of the user
261
262 === "OTP"
263
264     ```sh
265      ./bin/pleroma_ctl user confirm <nickname>
266     ```
267
268 === "From Source"
269
270     ```sh
271     mix pleroma.user confirm <nickname>
272     ```
273
274 ## Set confirmation status for all regular active users
275 *Admins and moderators are excluded*
276
277 === "OTP"
278
279     ```sh
280      ./bin/pleroma_ctl user confirm_all
281     ```
282
283 === "From Source"
284
285     ```sh
286     mix pleroma.user confirm_all
287     ```
288
289 ## Revoke confirmation status for all regular active users
290 *Admins and moderators are excluded*
291
292 === "OTP"
293
294     ```sh
295      ./bin/pleroma_ctl user unconfirm_all
296     ```
297
298 === "From Source"
299
300     ```sh
301     mix pleroma.user unconfirm_all
302     ```