Debian Codegraph @

upstream/fedora-44/man1/homectl.1

raw
1 '\" t
2 .TH "HOMECTL" "1" "" "systemd 259.5" "homectl"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 homectl, systemd-homed-firstboot.service \- Create, remove, change or inspect home directories
24 .SH "SYNOPSIS"
25 .HP \w'\fBhomectl\fR\ 'u
26 \fBhomectl\fR [OPTIONS...] {COMMAND} [NAME...]
27 .SH "DESCRIPTION"
28 .PP
29 \fBhomectl\fR
30 may be used to create, remove, change or inspect a user\*(Aqs home directory\&. It\*(Aqs primarily a command interfacing with
31 \fBsystemd-homed.service\fR(8)
32 which manages home directories of users\&.
33 .PP
34 Home directories managed by
35 systemd\-homed\&.service
36 are self\-contained, and thus include the user\*(Aqs full metadata record in the home\*(Aqs data storage itself, making them easy to migrate between machines\&. In particular, a home directory describes a matching user record, and every user record managed by
37 systemd\-homed\&.service
38 also implies existence and encapsulation of a home directory\&. The user account and home directory become the same concept\&.
39 .PP
40 The following backing storage mechanisms are supported:
41 .sp
42 .RS 4
43 .ie n \{\
44 \h'-04'\(bu\h'+03'\c
45 .\}
46 .el \{\
47 .sp -1
48 .IP \(bu 2.3
49 .\}
50 An individual LUKS2 encrypted loopback file for a user, stored in
51 /home/*\&.home\&. At login the file system contained in this files is mounted, after the LUKS2 encrypted volume has been attached\&. The user\*(Aqs password is identical to the encryption passphrase of the LUKS2 volume\&. Access to data without preceding user authentication is thus not possible, even for the system administrator\&. This storage mechanism provides the strongest data security and is thus recommended\&.
52 .RE
53 .sp
54 .RS 4
55 .ie n \{\
56 \h'-04'\(bu\h'+03'\c
57 .\}
58 .el \{\
59 .sp -1
60 .IP \(bu 2.3
61 .\}
62 Similar, but the LUKS2 encrypted file system is located on regular block device, such as a USB storage stick\&. In this mode home directories and all data they include are nicely migratable between machines, simply by plugging the USB stick into different systems at different times\&.
63 .RE
64 .sp
65 .RS 4
66 .ie n \{\
67 \h'-04'\(bu\h'+03'\c
68 .\}
69 .el \{\
70 .sp -1
71 .IP \(bu 2.3
72 .\}
73 An encrypted directory using
74 "fscrypt"
75 on file systems that support it (at the moment this is primarily
76 "ext4"), located in
77 /home/*\&.homedir\&. This mechanism also provides encryption, but substantially weaker than LUKS2, as most file system metadata is unprotected\&. Moreover it currently does not support changing user passwords once the home directory has been created\&.
78 .RE
79 .sp
80 .RS 4
81 .ie n \{\
82 \h'-04'\(bu\h'+03'\c
83 .\}
84 .el \{\
85 .sp -1
86 .IP \(bu 2.3
87 .\}
88 A
89 "btrfs"
90 subvolume for each user, also located in
91 /home/*\&.homedir\&. This provides no encryption, but good quota support\&.
92 .RE
93 .sp
94 .RS 4
95 .ie n \{\
96 \h'-04'\(bu\h'+03'\c
97 .\}
98 .el \{\
99 .sp -1
100 .IP \(bu 2.3
101 .\}
102 A regular directory for each user, also located in
103 /home/*\&.homedir\&. This provides no encryption, but is a suitable fallback available on all machines, even where LUKS2,
104 "fscrypt"
105 or
106 "btrfs"
107 support is not available\&.
108 .RE
109 .sp
110 .RS 4
111 .ie n \{\
112 \h'-04'\(bu\h'+03'\c
113 .\}
114 .el \{\
115 .sp -1
116 .IP \(bu 2.3
117 .\}
118 An individual Windows file share (CIFS) for each user\&.
119 .RE
120 .PP
121 Note that
122 systemd\-homed\&.service
123 and
124 \fBhomectl\fR
125 will not manage "classic" UNIX user accounts as created with
126 \fBuseradd\fR(8)
127 or similar tools\&. In particular, this functionality is not suitable for managing system users (i\&.e\&. users with a UID below 1000) but is exclusive to regular ("human") users\&.
128 .PP
129 Note that users/home directories managed via
130 \fBsystemd\-homed\&.service\fR
131 do not show up in
132 /etc/passwd
133 and similar files, they are synthesized via glibc NSS during runtime\&. They are thus resolvable and may be enumerated via the
134 \fBgetent\fR(1)
135 tool\&.
136 .PP
137 This tool interfaces directly with
138 systemd\-homed\&.service, and may execute specific commands on the home directories it manages\&. Since every home directory managed that way also defines a JSON user and group record these home directories may also be inspected and enumerated via
139 \fBuserdbctl\fR(1)\&.
140 .PP
141 Home directories managed by
142 systemd\-homed\&.service
143 are usually in one of two states, or in a transition state between them: when
144 "active"
145 they are unlocked and mounted, and thus accessible to the system and its programs; when
146 "inactive"
147 they are not mounted and thus not accessible\&. Activation happens automatically at login of the user and usually can only complete after a password (or other authentication token) has been supplied\&. Deactivation happens after the user fully logged out\&. A home directory remains active as long as the user is logged in at least once, i\&.e\&. has at least one login session\&. When the user logs in a second time simultaneously the home directory remains active\&. It is deactivated only after the last of the user\*(Aqs sessions ends\&.
148 .SH "OPTIONS"
149 .PP
150 The following general options are understood (further options that control the various properties of user records managed by
151 systemd\-homed\&.service
152 are documented further down):
153 .PP
154 \fB\-\-identity=\fR\fB\fIFILE\fR\fR
155 .RS 4
156 Read the user\*(Aqs JSON record from the specified file\&. If passed as
157 "\-"
158 read the user record from standard input\&. The supplied JSON object must follow the structure documented in
159 \m[blue]\fBJSON User Records\fR\m[]\&\s-2\u[1]\d\s+2\&. This option may be used in conjunction with the
160 \fBcreate\fR
161 and
162 \fBupdate\fR
163 commands (see below), where it allows configuring the user record in JSON as\-is, instead of setting the individual user record properties (see below)\&.
164 .sp
165 Added in version 245\&.
166 .RE
167 .PP
168 \fB\-\-json=\fR\fB\fIFORMAT\fR\fR, \fB\-j\fR
169 .RS 4
170 Controls whether to output the user record in JSON format, if the
171 \fBinspect\fR
172 command (see below) is used\&. Takes one of
173 "pretty",
174 "short"
175 or
176 "off"\&. If
177 "pretty"
178 human\-friendly whitespace and newlines are inserted in the output to make the JSON data more readable\&. If
179 "short"
180 all superfluous whitespace is suppressed\&. If
181 "off"
182 (the default) the user information is not shown in JSON format but in a friendly human\-readable formatting instead\&. The
183 \fB\-j\fR
184 option picks
185 "pretty"
186 when run interactively and
187 "short"
188 otherwise\&.
189 .sp
190 Added in version 245\&.
191 .RE
192 .PP
193 \fB\-\-export\-format=\fR\fB\fIFORMAT\fR\fR, \fB\-E\fR, \fB\-EE\fR
194 .RS 4
195 When used with the
196 \fBinspect\fR
197 verb in JSON mode (see above) may be used to suppress certain aspects of the JSON user record on output\&. Specifically, if
198 "stripped"
199 format is used the binding and runtime fields of the record are removed\&. If
200 "minimal"
201 format is used the cryptographic signature is removed too\&. If
202 "full"
203 format is used the full JSON record is shown (this is the default)\&. This option is useful for copying an existing user record to a different system in order to create a similar user there with the same settings\&. Specifically:
204 \fBhomectl inspect \-EE | ssh root@othersystem homectl create \-i\-\fR
205 may be used as simple command line for replicating a user on another host\&.
206 \fB\-E\fR
207 is equivalent to
208 \fB\-j \-\-export\-format=stripped\fR,
209 \fB\-EE\fR
210 to
211 \fB\-j \-\-export\-format=minimal\fR\&. Note that when replicating user accounts user records acquired in
212 "stripped"
213 mode will retain the original cryptographic signatures and thus may only be modified when the private key to update them is available on the destination machine\&. When replicating users in
214 "minimal"
215 mode, the signature is removed during the replication and thus the record will be implicitly signed with the key of the destination machine and may be updated there without any private key replication\&.
216 .sp
217 Added in version 245\&.
218 .RE
219 .PP
220 \fB\-\-offline\fR
221 .RS 4
222 Do not attempt to update the copy of the user record and blob directory that is embedded inside of the home area\&. This allows for operation on home areas that are absent, or without needing to authenticate as the user being modified\&.
223 .sp
224 Added in version 256\&.
225 .RE
226 .PP
227 \fB\-\-key\-name=\fR
228 .RS 4
229 When used with the
230 \fBadd\-signing\-key\fR
231 command, specify or override the name under which to store the public key being added\&. The specified name can be chosen freely, but must be suffixed with
232 "\&.public"\&. If this option is not used the name is derived from the specified filename\&. If a key is read from standard input this option is mandatory in order to provide a suitable name for the key being added\&.
233 .sp
234 Added in version 258\&.
235 .RE
236 .PP
237 \fB\-\-seize=\fR
238 .RS 4
239 Takes a boolean argument\&. When used with
240 \fBcreate\fR
241 or
242 \fBregister\fR, controls whether to strip cryptographic signatures from the provided JSON user records, which has the effect of signing them with the local signing key (local\&.public) instead\&. If this switch is set to true, added user records hence become locally managed (and thus can be modified locally), while if it is set to false the user records remain managed and owned by its origin (and thus cannot be modified locally)\&. This switch defaults to true for
243 \fBcreate\fR
244 and false for
245 \fBregister\fR\&.
246 .sp
247 Added in version 258\&.
248 .RE
249 .PP
250 \fB\-\-prompt\-new\-user\fR
251 .RS 4
252 If used in conjunction with
253 \fBfirstboot\fR
254 and no regular user account exists on the system so far the tool will interactively query for user information and create an account\&.
255 .sp
256 Added in version 256\&.
257 .RE
258 .PP
259 \fB\-\-prompt\-shell=\fR
260 .RS 4
261 Takes a boolean argument\&. Controls whether to interactively query for a login shell, if
262 \fBfirstboot \-\-prompt\-new\-user\fR
263 is used\&. Defaults to true\&.
264 .sp
265 Added in version 259\&.
266 .RE
267 .PP
268 \fB\-\-prompt\-groups=\fR
269 .RS 4
270 Takes a boolean argument\&. Controls whether to interactively query for auxiliary groups to add the new user to, if
271 \fBfirstboot \-\-prompt\-new\-user\fR
272 is used\&. Defaults to true\&.
273 .sp
274 Added in version 259\&.
275 .RE
276 .PP
277 \fB\-\-chrome=\fR
278 .RS 4
279 Takes a boolean argument\&. By default the interactive user creation via
280 \fBfirstboot \-\-prompt\-new\-user\fR
281 screen will show reverse color "chrome" bars at the top and and the bottom of the terminal screen, which may be disabled by setting this option to false\&.
282 .sp
283 Added in version 259\&.
284 .RE
285 .PP
286 \fB\-\-mute\-console=\fR
287 .RS 4
288 Takes a boolean argument\&. If true kernel log output and service manager status output to the system console is temporarily disabled while
289 \fBfirstboot \-\-prompt\-new\-user\fR
290 is running, so that its own output is not interrupted\&. Defaults to false\&.
291 .sp
292 Added in version 259\&.
293 .RE
294 .PP
295 \fB\-\-match=this|other|any|auto\fR, \fB\-A\fR, \fB\-N\fR, \fB\-T\fR
296 .RS 4
297 Option
298 \fB\-\-match=\fR
299 takes one of
300 "this",
301 "other",
302 "any"
303 or
304 "auto"\&. Some user record settings can be defined to match only specific machines, or all machines but one, or all machines\&. With this switch it is possibly to control to which machines to apply the settings appearing on the command line after it\&. If
305 "this"
306 is specified the setting will only apply to the local system (positive match), if
307 "other"
308 it will apply to all but the local system (negative match), if
309 "any"
310 it will apply to all systems (unless there\*(Aqs a matching positive or negative per\-machine setting)\&. If
311 "auto"
312 returns to the default logic: whether a setting applies by default to the local system or all systems depends on the option in question\&.
313 .sp
314 Note that only some user record settings can be conditioned like this\&. This option has no effect on the others and is ignored there\&. This option may appear multiple times in a single command line to apply settings conditioned by different matches to the same user record\&. See
315 \m[blue]\fBJSON User Records\fR\m[]\&\s-2\u[1]\d\s+2
316 for details on which settings may be used with such per\-machine matching and which ones may not\&.
317 .sp
318 \fB\-A\fR
319 is a shortcut for
320 \fB\-\-match=any\fR,
321 \fB\-T\fR
322 is short for
323 \fB\-\-match=this\fR
324 and
325 \fB\-N\fR
326 is short for
327 \fB\-\-match=other\fR\&.
328 .sp
329 Here\*(Aqs an example call that sets the storage field to
330 "luks"
331 on the local system, but to
332 "cifs"
333 on all others:
334 .sp
335 .if n \{\
336 .RS 4
337 .\}
338 .nf
339 # homectl update lennart \-T \-\-storage=luks \-N \-\-storage=cifs
340 .fi
341 .if n \{\
342 .RE
343 .\}
344 .sp
345 Added in version 258\&.
346 .RE
347 .PP
348 \fB\-H\fR, \fB\-\-host=\fR
349 .RS 4
350 Execute the operation remotely\&. Specify a hostname, or a username and hostname separated by
351 "@", to connect to\&. The hostname may optionally be suffixed by a port ssh is listening on, separated by
352 ":", and then a container name, separated by
353 "/", which connects directly to a specific container on the specified host\&. This will use SSH to talk to the remote machine manager instance\&. Container names may be enumerated with
354 \fBmachinectl \-H \fR\fB\fIHOST\fR\fR\&. Put IPv6 addresses in brackets\&.
355 .RE
356 .PP
357 \fB\-M\fR, \fB\-\-machine=\fR
358 .RS 4
359 Execute operation on a local container\&. Specify a container name to connect to, optionally prefixed by a user name to connect as and a separating
360 "@"
361 character\&. If the special string
362 "\&.host"
363 is used in place of the container name, a connection to the local system is made (which is useful to connect to a specific user\*(Aqs user bus:
364 "\-\-user \-\-machine=lennart@\&.host")\&. If the
365 "@"
366 syntax is not used, the connection is made as root user\&. If the
367 "@"
368 syntax is used either the left hand side or the right hand side may be omitted (but not both) in which case the local user name and
369 "\&.host"
370 are implied\&.
371 .RE
372 .PP
373 \fB\-\-no\-pager\fR
374 .RS 4
375 Do not pipe output into a pager\&.
376 .RE
377 .PP
378 \fB\-\-no\-legend\fR
379 .RS 4
380 Do not print the legend, i\&.e\&. column headers and the footer with hints\&.
381 .RE
382 .PP
383 \fB\-\-no\-ask\-password\fR
384 .RS 4
385 Do not query the user for authentication for privileged operations\&.
386 .RE
387 .PP
388 \fB\-h\fR, \fB\-\-help\fR
389 .RS 4
390 Print a short help text and exit\&.
391 .RE
392 .PP
393 \fB\-\-version\fR
394 .RS 4
395 Print a short version string and exit\&.
396 .RE
397 .SH "GENERAL USER RECORD PROPERTIES"
398 .PP
399 The following options control various properties of the user records/home directories that
400 systemd\-homed\&.service
401 manages\&. These switches may be used in conjunction with the
402 \fBcreate\fR
403 and
404 \fBupdate\fR
405 commands for configuring various aspects of the home directory and the user account:
406 .PP
407 \fB\-\-real\-name=\fR\fB\fINAME\fR\fR, \fB\-c\fR \fINAME\fR
408 .RS 4
409 The real name for the user\&. This corresponds with the GECOS field on classic UNIX NSS records\&.
410 .sp
411 Added in version 245\&.
412 .RE
413 .PP
414 \fB\-\-realm=\fR\fB\fIREALM\fR\fR
415 .RS 4
416 The realm for the user\&. The realm associates a user with a specific organization or installation, and allows distinguishing users of the same name defined in different contexts\&. The realm can be any string that also qualifies as valid DNS domain name, and it is recommended to use the organization\*(Aqs or installation\*(Aqs domain name for this purpose, but this is not enforced nor required\&. On each system only a single user of the same name may exist, and if a user with the same name and realm is seen it is assumed to refer to the same user while a user with the same name but different realm is considered a different user\&. Note that this means that two users sharing the same name but with distinct realms are not allowed on the same system\&. Assigning a realm to a user is optional\&.
417 .sp
418 Added in version 245\&.
419 .RE
420 .PP
421 \fB\-\-alias=\fR\fB\fINAME\fR\fR\fB[,\fINAME\&...\fR]\fR
422 .RS 4
423 Additional names for the user\&. Takes one or more valid UNIX user names, separated by commas\&. May be used multiple times to define multiple aliases\&. An alias username may be specified wherever the primary user name may be specified, and resolves to the same user record\&.
424 .sp
425 Added in version 258\&.
426 .RE
427 .PP
428 \fB\-\-email\-address=\fR\fB\fIEMAIL\fR\fR
429 .RS 4
430 Takes an electronic mail address to associate with the user\&. On log\-in the
431 \fI$EMAIL\fR
432 environment variable is initialized from this value\&.
433 .sp
434 Added in version 245\&.
435 .RE
436 .PP
437 \fB\-\-location=\fR\fB\fITEXT\fR\fR
438 .RS 4
439 Takes location specification for this user\&. This is free\-form text, which might or might not be usable by geo\-location applications\&. Example:
440 \fB\-\-location="Berlin, Germany"\fR
441 or
442 \fB\-\-location="Basement, Room 3a"\fR
443 .sp
444 Added in version 245\&.
445 .RE
446 .PP
447 \fB\-\-icon\-name=\fR\fB\fIICON\fR\fR
448 .RS 4
449 Takes an icon name to associate with the user, following the scheme defined by the
450 \m[blue]\fBIcon Naming Specification\fR\m[]\&\s-2\u[2]\d\s+2\&.
451 .sp
452 Added in version 245\&.
453 .RE
454 .PP
455 \fB\-\-home\-dir=\fR\fB\fIPATH\fR\fR, \fB\-d\fR\fB\fIPATH\fR\fR
456 .RS 4
457 Takes a path to use as home directory for the user\&. Note that this is the directory the user\*(Aqs home directory is mounted to while the user is logged in\&. This is not where the user\*(Aqs data is actually stored, see
458 \fB\-\-image\-path=\fR
459 for that\&. If not specified, defaults to
460 /home/$USER\&.
461 .sp
462 Added in version 245\&.
463 .RE
464 .PP
465 \fB\-\-uid=\fR\fB\fIUID\fR\fR
466 .RS 4
467 Takes a preferred numeric UNIX UID to assign this user\&. If a user is to be created with the specified UID and it is already taken by a different user on the local system then creation of the home directory is refused\&. Note though, if after creating the home directory it is used on a different system and the configured UID is taken by another user there, then
468 \fBsystemd\-homed\fR
469 may assign the user a different UID on that system\&. The specified UID must be outside of the system user range\&. It is recommended to use the 60001\&...60513 UID range for this purpose\&. If not specified, the UID is automatically picked\&. If the home directory is found to be owned by a different UID when logging in, the home directory and everything underneath it will have its ownership changed automatically before login completes\&.
470 .sp
471 Note that changing this option for existing home directories generally has no effect on home directories that already have been registered locally (have a local
472 \fIbinding\fR), as the UID used for an account on the local system is determined when the home directory is first activated on it, and then remains in effect until the home directory is removed\&.
473 .sp
474 Note that users managed by
475 \fBsystemd\-homed\fR
476 always have a matching group associated with the same name as well as a GID matching the UID of the user\&. Thus, configuring the GID separately is not permitted\&.
477 .sp
478 Added in version 245\&.
479 .RE
480 .PP
481 \fB\-\-member\-of=\fR\fB\fIGROUP\fR\fR, \fB\-G\fR \fIGROUP\fR
482 .RS 4
483 Takes a comma\-separated list of auxiliary UNIX groups this user shall belong to\&. Example:
484 \fB\-\-member\-of=wheel\fR
485 to provide the user with administrator privileges\&. Note that
486 \fBsystemd\-homed\fR
487 does not manage any groups besides a group matching the user in name and numeric UID/GID\&. Thus any groups listed here must be registered independently, for example with
488 \fBgroupadd\fR(8)\&. Any non\-existent groups are ignored\&. This option may be used more than once, in which case all specified group lists are combined\&. If the user is currently a member of a group which is not listed, the user will be removed from the group\&.
489 .sp
490 Added in version 245\&.
491 .RE
492 .PP
493 \fB\-\-capability\-bounding\-set=\fR\fB\fICAPABILITIES\fR\fR, \fB\-\-capability\-ambient\-set=\fR\fB\fICAPABILITIES\fR\fR
494 .RS 4
495 These options take a space separated list of process capabilities (e\&.g\&.
496 \fBCAP_WAKE_ALARM\fR,
497 \fBCAP_BLOCK_SUSPEND\fR, \&...) that shall be set in the capability bounding and ambient sets for all the user\*(Aqs sessions\&. See
498 \fBcapabilities\fR(7)
499 for details on the capabilities concept\&. These options may be used more than once, in which case the specified lists are combined\&. If the parameter begins with a
500 "~"
501 character the effect is inverted: the specified capability is dropped from the specific set\&.
502 .sp
503 Added in version 254\&.
504 .RE
505 .PP
506 \fB\-\-access\-mode=\fR\fB\fIMODE\fR\fR
507 .RS 4
508 Takes a UNIX file access mode written in octal\&. Configures the access mode of the home directory itself\&. Note that this is only used when the directory is first created, and the user may change this any time afterwards\&. Example:
509 \fB\-\-access\-mode=0700\fR
510 .sp
511 Added in version 245\&.
512 .RE
513 .PP
514 \fB\-\-umask=\fR\fB\fIMASK\fR\fR
515 .RS 4
516 Takes the access mode mask (in octal syntax) to apply to newly created files and directories of the user ("umask")\&. If set this controls the initial umask set for all login sessions of the user, possibly overriding the system\*(Aqs defaults\&.
517 .sp
518 Added in version 245\&.
519 .RE
520 .PP
521 \fB\-\-skel=\fR\fB\fIPATH\fR\fR
522 .RS 4
523 Takes a file system path to a directory\&. Specifies the skeleton directory to initialize the home directory with\&. All files and directories in the specified path are copied into any newly create home directory\&. If not specified, defaults to
524 /etc/skel/\&.
525 .sp
526 Added in version 245\&.
527 .RE
528 .PP
529 \fB\-\-shell=\fR\fB\fISHELL\fR\fR
530 .RS 4
531 Takes a file system path\&. Specifies the shell binary to execute on terminal logins\&. If not specified, defaults to
532 /bin/bash\&.
533 .sp
534 Added in version 245\&.
535 .RE
536 .PP
537 \fB\-\-setenv=\fR\fB\fIVARIABLE\fR\fR\fB[=\fR\fB\fIVALUE\fR\fR\fB]\fR
538 .RS 4
539 Takes an environment variable assignment to set for all user processes\&. May be used multiple times to set multiple environment variables\&. When
540 "="
541 and
542 \fIVALUE\fR
543 are omitted, the value of the variable with the same name in the program environment will be used\&.
544 .sp
545 Note that a number of other settings also result in environment variables to be set for the user, including
546 \fB\-\-email=\fR,
547 \fB\-\-timezone=\fR
548 and
549 \fB\-\-language=\fR\&.
550 .sp
551 Added in version 245\&.
552 .RE
553 .PP
554 \fB\-\-timezone=\fR\fB\fITIMEZONE\fR\fR
555 .RS 4
556 Takes a time zone location name that sets the timezone for the specified user\&. When the user logs in the
557 \fI$TZ\fR
558 environment variable is initialized from this setting\&. Example:
559 \fB\-\-timezone=Europe/Amsterdam\fR
560 will result in the environment variable
561 "TZ=:Europe/Amsterdam"\&. (":"
562 is used intentionally as part of the timezone specification, see
563 \fBtzset\fR(3)\&.)
564 .sp
565 Added in version 245\&.
566 .RE
567 .PP
568 \fB\-\-language=\fR\fB\fILANG\fR\fR
569 .RS 4
570 Takes a comma\- or colon\-separated list of languages preferred by the user, ordered by descending priority\&. The
571 \fI$LANG\fR
572 and
573 \fI$LANGUAGE\fR
574 environment variables are initialized from this value on login, and thus values suitable for these environment variables are accepted here, for example
575 \fB\-\-language=de_DE\&.UTF\-8\fR\&. This option may be used more than once, in which case the language lists are concatenated\&.
576 .sp
577 Added in version 245\&.
578 .RE
579 .PP
580 \fB\-\-default\-area=\fR\fB\fIAREA\fR\fR
581 .RS 4
582 Takes a string identifying a home directory "area" to use as default\&. Areas are secondary home directories within the primary home directory of a user\&. When logging in a user can specify the area they wish to log into, which ensures that the
583 \fI$HOME\fR
584 environment variable is set to
585 ~/Areas/
586 suffixed by the area name\&.
587 .sp
588 For details on the area concept see
589 \fBpam_systemd_home\fR(8)\&. Note that this option just defines the default, which can be overridden at login time\&.
590 .sp
591 When this option is specified with an empty string as value any previously declared default area is removed from the user record\&.
592 .sp
593 Added in version 258\&.
594 .RE
595 .SH "AUTHENTICATION USER RECORD PROPERTIES"
596 .PP
597 \fB\-\-ssh\-authorized\-keys=\fR\fB\fIKEYS\fR\fR
598 .RS 4
599 Either takes a SSH authorized key line to associate with the user record or a
600 "@"
601 character followed by a path to a file to read one or more such lines from\&. SSH keys configured this way are made available to SSH to permit access to this home directory and user record\&. This option may be used more than once to configure multiple SSH keys\&.
602 .sp
603 Added in version 245\&.
604 .RE
605 .PP
606 \fB\-\-pkcs11\-token\-uri=\fR\fB\fIURI\fR\fR
607 .RS 4
608 Takes an RFC 7512 PKCS#11 URI referencing a security token (e\&.g\&. YubiKey or PIV smartcard) that shall be able to unlock the user account\&. The security token URI should reference a security token with exactly one pair of X\&.509 certificate and private key\&. A random secret key is then generated, encrypted with the public key of the X\&.509 certificate, and stored as part of the user record\&. At login time it is decrypted with the PKCS#11 module and then used to unlock the account and associated resources\&. See below for an example how to set up authentication with a security token\&.
609 .sp
610 Instead of a valid PKCS#11 URI, the special strings
611 "list"
612 and
613 "auto"
614 may be specified\&. If
615 "list"
616 is passed, a brief table of suitable, currently plugged in PKCS#11 hardware tokens is shown, along with their URIs\&. If
617 "auto"
618 is passed, a suitable PKCS#11 hardware token is automatically selected (this operation will fail if there isn\*(Aqt exactly one suitable token discovered)\&. The latter is a useful shortcut for the most common case where a single PKCS#11 hardware token is plugged in\&.
619 .sp
620 Note that many hardware security tokens implement both PKCS#11/PIV and FIDO2 with the
621 "hmac\-secret"
622 extension (for example: the YubiKey 5 series), as supported with the
623 \fB\-\-fido2\-device=\fR
624 option below\&. Both mechanisms are similarly powerful, though FIDO2 is the more modern technology\&. PKCS#11/PIV tokens have the benefit of being recognizable before authentication and hence can be used for implying the user identity to use for logging in, which FIDO2 does not allow\&. PKCS#11/PIV devices generally require initialization (i\&.e\&. storing a private/public key pair on them, see example below) before they can be used; FIDO2 security tokens generally do not required that, and work out of the box\&.
625 .sp
626 Added in version 245\&.
627 .RE
628 .PP
629 \fB\-\-fido2\-credential\-algorithm=\fR\fB\fISTRING\fR\fR
630 .RS 4
631 Specify COSE algorithm used in credential generation\&. The default value is
632 "es256"\&. Supported values are
633 "es256",
634 "rs256"
635 and
636 "eddsa"\&.
637 .sp
638 "es256"
639 denotes ECDSA over NIST P\-256 with SHA\-256\&.
640 "rs256"
641 denotes 2048\-bit RSA with PKCS#1\&.5 padding and SHA\-256\&.
642 "eddsa"
643 denotes EDDSA over Curve25519 with SHA\-512\&.
644 .sp
645 Note that your authenticator may choose not to support some algorithms\&.
646 .sp
647 Added in version 251\&.
648 .RE
649 .PP
650 \fB\-\-fido2\-device=\fR\fB\fIPATH\fR\fR
651 .RS 4
652 Takes a path to a Linux
653 "hidraw"
654 device (e\&.g\&.
655 /dev/hidraw1), referring to a FIDO2 security token implementing the
656 "hmac\-secret"
657 extension that shall be able to unlock the user account\&. A random salt value is generated on the host and passed to the FIDO2 device, which calculates a HMAC hash of the salt using an internal secret key\&. The result is then used as the key to unlock the user account\&. The random salt is included in the user record, so that whenever authentication is needed it can be passed to the FIDO2 token again\&.
658 .sp
659 Instead of a valid path to a FIDO2
660 "hidraw"
661 device the special strings
662 "list"
663 and
664 "auto"
665 may be specified\&. If
666 "list"
667 is passed, a brief table of suitable discovered FIDO2 devices is shown\&. If
668 "auto"
669 is passed, a suitable FIDO2 token is automatically selected, if exactly one is discovered\&. The latter is a useful shortcut for the most common case where a single FIDO2 hardware token is plugged in\&.
670 .sp
671 Note that FIDO2 devices suitable for this option must implement the
672 "hmac\-secret"
673 extension\&. Most current devices (such as the YubiKey 5 series) do\&. If the extension is not implemented the device cannot be used for unlocking home directories\&.
674 .sp
675 The FIDO2 device may be subsequently removed by setting the device path to an empty string (e\&.g\&.
676 \fBhomectl update $USER \-\-fido2\-device=""\fR)\&.
677 .sp
678 Note that many hardware security tokens implement both FIDO2 and PKCS#11/PIV (and thus may be used with either
679 \fB\-\-fido2\-device=\fR
680 or
681 \fB\-\-pkcs11\-token\-uri=\fR), for a discussion see above\&.
682 .sp
683 Added in version 246\&.
684 .RE
685 .PP
686 \fB\-\-fido2\-with\-client\-pin=\fR\fB\fIBOOL\fR\fR
687 .RS 4
688 When enrolling a FIDO2 security token, controls whether to require the user to enter a PIN when unlocking the account (the FIDO2
689 "clientPin"
690 feature)\&. Defaults to
691 "yes"\&. (Note: this setting is without effect if the security token does not support the
692 "clientPin"
693 feature at all, or does not allow enabling or disabling it\&.)
694 .sp
695 Added in version 249\&.
696 .RE
697 .PP
698 \fB\-\-fido2\-with\-user\-presence=\fR\fB\fIBOOL\fR\fR
699 .RS 4
700 When enrolling a FIDO2 security token, controls whether to require the user to verify presence (tap the token, the FIDO2
701 "up"
702 feature) when unlocking the account\&. Defaults to
703 "yes"\&. (Note: this setting is without effect if the security token does not support the
704 "up"
705 feature at all, or does not allow enabling or disabling it\&.)
706 .sp
707 Added in version 249\&.
708 .RE
709 .PP
710 \fB\-\-fido2\-with\-user\-verification=\fR\fB\fIBOOL\fR\fR
711 .RS 4
712 When enrolling a FIDO2 security token, controls whether to require user verification when unlocking the account (the FIDO2
713 "uv"
714 feature)\&. Defaults to
715 "no"\&. (Note: this setting is without effect if the security token does not support the
716 "uv"
717 feature at all, or does not allow enabling or disabling it\&.)
718 .sp
719 Added in version 249\&.
720 .RE
721 .PP
722 \fB\-\-recovery\-key=\fR\fB\fIBOOL\fR\fR
723 .RS 4
724 Accepts a boolean argument\&. If enabled a recovery key is configured for the account\&. A recovery key is a computer generated access key that may be used to regain access to an account if the password has been forgotten or the authentication token lost\&. The key is generated and shown on screen, and should be printed or otherwise transferred to a secure location\&. A recovery key may be entered instead of a regular password to unlock the account\&.
725 .sp
726 Added in version 247\&.
727 .RE
728 .SH "BLOB DIRECTORY USER RECORD PROPERTIES"
729 .PP
730 \fB\-\-blob=\fR\fB\fIPATH\fR\fR, \fB\-b\fR \fIPATH\fR, \fB\-\-blob=\fR\fB\fIFILENAME\fR\fR\fB=\fR\fB\fIPATH\fR\fR, \fB\-b\fR \fIFILENAME\fR=\fIPATH\fR
731 .RS 4
732 Accepts either a directory path, or a file name followed by a file path\&. If just a directory path is specified, then the user\*(Aqs entire blob directory is replaced the specified path\&. Note that this replacement is performed before per\-file manipulations are applied, which means these per\-file manipulations will be applied on top of the specified directory\&. If a filename and file path are specified, then the single specified blob file will be overwritten with the specified path\&. If completely blank, the entire blob directory is emptied out (which also resets all previous blob\-related flags up to this point)\&. If a filename is specified but the corresponding path is blank, that single file will be deleted from the blob directory\&. All changes are performed in temporary copies of the specified files in directories, which means that the originals specified on the command line are not modified\&. See
733 \m[blue]\fBUser Record Blob Directories\fR\m[]\&\s-2\u[3]\d\s+2
734 for more information about blob directories\&.
735 .sp
736 Added in version 256\&.
737 .RE
738 .PP
739 \fB\-\-avatar=\fR\fB\fIPATH\fR\fR, \fB\-\-login\-background=\fR\fB\fIPATH\fR\fR
740 .RS 4
741 Accept a file path\&. If set, the specified file is used to overwrite the corresponding file in the user\*(Aqs blob directory\&. If blank, the corresponding file is deleted from the blob directory\&. Essentially, these options are shortcuts to
742 \fB\-\-blob=\fR\fB\fIFILENAME\fR\fR\fB=\fR\fB\fIPATH\fR\fR
743 for the known filenames defined in
744 \m[blue]\fBUser Record Blob Directories\fR\m[]\&\s-2\u[3]\d\s+2\&.
745 .sp
746 Added in version 256\&.
747 .RE
748 .SH "ACCOUNT MANAGEMENT USER RECORD PROPERTIES"
749 .PP
750 \fB\-\-locked=\fR\fB\fIBOOLEAN\fR\fR
751 .RS 4
752 Takes a boolean argument\&. Specifies whether this user account shall be locked\&. If true logins into this account are prohibited, if false (the default) they are permitted (of course, only if authorization otherwise succeeds)\&.
753 .sp
754 Added in version 245\&.
755 .RE
756 .PP
757 \fB\-\-not\-before=\fR\fB\fITIMESTAMP\fR\fR, \fB\-\-not\-after=\fR\fB\fITIMESTAMP\fR\fR
758 .RS 4
759 These options take a timestamp string, in the format documented in
760 \fBsystemd.time\fR(7)
761 and configures points in time before and after logins into this account are not permitted\&.
762 .sp
763 Added in version 245\&.
764 .RE
765 .PP
766 \fB\-\-rate\-limit\-interval=\fR\fB\fISECS\fR\fR, \fB\-\-rate\-limit\-burst=\fR\fB\fINUMBER\fR\fR
767 .RS 4
768 Configures a rate limit on authentication attempts for this user\&. If the user attempts to authenticate more often than the specified number, on a specific system, within the specified time interval authentication is refused until the time interval passes\&. Defaults to 10 times per 1min\&.
769 .sp
770 Added in version 245\&.
771 .RE
772 .PP
773 \fB\-\-password\-hint=\fR\fB\fITEXT\fR\fR
774 .RS 4
775 Takes a password hint to store alongside the user record\&. This string is stored accessible only to privileged users and the user itself and may not be queried by other users\&. Example:
776 \fB\-\-password\-hint="My first pet\*(Aqs name"\fR\&.
777 .sp
778 Added in version 245\&.
779 .RE
780 .PP
781 \fB\-\-enforce\-password\-policy=\fR\fB\fIBOOL\fR\fR, \fB\-P\fR
782 .RS 4
783 Takes a boolean argument\&. Configures whether to enforce the system\*(Aqs password policy for this user, regarding quality and strength of selected passwords\&. Defaults to on\&.
784 \fB\-P\fR
785 is short for
786 \fB\-\-enforce\-password\-policy=no\fR\&.
787 .sp
788 Added in version 245\&.
789 .RE
790 .PP
791 \fB\-\-password\-change\-now=\fR\fB\fIBOOL\fR\fR
792 .RS 4
793 Takes a boolean argument\&. If true the user is asked to change their password on next login\&.
794 .sp
795 Added in version 245\&.
796 .RE
797 .PP
798 \fB\-\-password\-change\-min=\fR\fB\fITIME\fR\fR, \fB\-\-password\-change\-max=\fR\fB\fITIME\fR\fR, \fB\-\-password\-change\-warn=\fR\fB\fITIME\fR\fR, \fB\-\-password\-change\-inactive=\fR\fB\fITIME\fR\fR
799 .RS 4
800 Each of these options takes a time span specification as argument (in the syntax documented in
801 \fBsystemd.time\fR(7)) and configures various aspects of the user\*(Aqs password expiration policy\&. Specifically,
802 \fB\-\-password\-change\-min=\fR
803 configures how much time has to pass after changing the password of the user until the password may be changed again\&. If the user tries to change their password before this time passes the attempt is refused\&.
804 \fB\-\-password\-change\-max=\fR
805 configures how soon after it has been changed the password expires and needs to be changed again\&. After this time passes logging in may only proceed after the password is changed\&.
806 \fB\-\-password\-change\-warn=\fR
807 specifies how much earlier than then the time configured with
808 \fB\-\-password\-change\-max=\fR
809 the user is warned at login to change their password as it will expire soon\&. Finally,
810 \fB\-\-password\-change\-inactive=\fR
811 configures the time which has to pass after the password as expired until the user is not permitted to log in or change the password anymore\&. Note that these options only apply to password authentication, and do not apply to other forms of authentication, for example PKCS#11\-based security token authentication\&.
812 .sp
813 Added in version 245\&.
814 .RE
815 .SH "RESOURCE MANAGEMENT USER RECORD PROPERTIES"
816 .PP
817 \fB\-\-disk\-size=\fR\fB\fIBYTES\fR\fR
818 .RS 4
819 Either takes a size in bytes as argument (possibly using the usual K, M, G, \&... suffixes for 1024 base values), a percentage value, or the special strings
820 "min"
821 or
822 "max", and configures the disk space to assign to the user\&. If a percentage value is specified (i\&.e\&. the argument suffixed with
823 "%") it is taken relative to the available disk space of the backing file system\&. If specified as
824 "min"
825 assigns the minimal disk space permitted by the constraints of the backing file system and other limits, when specified as
826 "max"
827 assigns the maximum disk space available\&. If the LUKS2 backend is used this configures the size of the loopback file and file system contained therein\&. For the other storage backends configures disk quota using the filesystem\*(Aqs native quota logic, if available\&. If not specified, defaults to 85% of the available disk space for the LUKS2 backend and to no quota for the others\&.
828 .sp
829 Added in version 245\&.
830 .RE
831 .PP
832 \fB\-\-nice=\fR\fB\fINICE\fR\fR
833 .RS 4
834 Takes the numeric scheduling priority ("nice level") to apply to the processes of the user at login time\&. Takes a numeric value in the range \-20 (highest priority) to 19 (lowest priority)\&.
835 .sp
836 Added in version 245\&.
837 .RE
838 .PP
839 \fB\-\-rlimit=\fR\fB\fILIMIT\fR\fR\fB=\fR\fB\fIVALUE\fR\fR\fB[:\fIVALUE\fR]\fR
840 .RS 4
841 Allows configuration of resource limits for processes of this user, see
842 \fBgetrlimit\fR(2)
843 for details\&. Takes a resource limit name (e\&.g\&.
844 "LIMIT_NOFILE") followed by an equal sign, followed by a numeric limit\&. Optionally, separated by colon a second numeric limit may be specified\&. If two are specified this refers to the soft and hard limits, respectively\&. If only one limit is specified the setting sets both limits in one\&.
845 .sp
846 Added in version 245\&.
847 .RE
848 .PP
849 \fB\-\-tasks\-max=\fR\fB\fITASKS\fR\fR
850 .RS 4
851 Takes a non\-zero unsigned integer as argument\&. Configures the maximum number of tasks (i\&.e\&. threads, where each process is at least one thread) the user may have at any given time\&. This limit applies to all tasks forked off the user\*(Aqs sessions, even if they change user identity via
852 \fBsu\fR(1)
853 or a similar tool\&. Use
854 \fB\-\-rlimit=LIMIT_NPROC=\fR
855 to place a limit on the tasks actually running under the UID of the user, thus excluding any child processes that might have changed user identity\&. This controls the
856 \fITasksMax=\fR
857 setting of the per\-user systemd slice unit
858 user\-$UID\&.slice\&. See
859 \fBsystemd.resource-control\fR(5)
860 for further details\&.
861 .sp
862 Added in version 245\&.
863 .RE
864 .PP
865 \fB\-\-memory\-high=\fR\fB\fIBYTES\fR\fR, \fB\-\-memory\-max=\fR\fB\fIBYTES\fR\fR
866 .RS 4
867 Set a limit on the memory a user may take up on a system at any given time in bytes (the usual K, M, G, \&... suffixes are supported, to the base of 1024)\&. This includes all memory used by the user itself and all processes they forked off that changed user credentials\&. This controls the
868 \fIMemoryHigh=\fR
869 and
870 \fIMemoryMax=\fR
871 settings of the per\-user systemd slice unit
872 user\-$UID\&.slice\&. See
873 \fBsystemd.resource-control\fR(5)
874 for further details\&.
875 .sp
876 Added in version 245\&.
877 .RE
878 .PP
879 \fB\-\-cpu\-weight=\fR\fB\fIWEIGHT\fR\fR, \fB\-\-io\-weight=\fR\fB\fIWEIGHT\fR\fR
880 .RS 4
881 Set CPU and IO scheduling weights of the processes of the user, including those of processes forked off by the user that changed user credentials\&. Takes a numeric value in the range 1\&...10000\&. This controls the
882 \fICPUWeight=\fR
883 and
884 \fIIOWeight=\fR
885 settings of the per\-user systemd slice unit
886 user\-$UID\&.slice\&. See
887 \fBsystemd.resource-control\fR(5)
888 for further details\&.
889 .sp
890 Added in version 245\&.
891 .RE
892 .SH "STORAGE USER RECORD PROPERTIES"
893 .PP
894 \fB\-\-tmp\-limit=\fR\fB\fIBYTES\fR\fR, \fB\-\-tmp\-limit=\fR\fB\fIPERCENT\fR\fR, \fB\-\-dev\-shm\-limit=\fR\fB\fIBYTES\fR\fR, \fB\-\-dev\-shm\-limit=\fR\fB\fIPERCENT\fR\fR
895 .RS 4
896 Controls the per\-user quota on
897 /tmp/
898 and
899 /dev/shm/
900 that is applied when the user logs in\&. Takes either an absolute value in bytes (with the usual K, M, G, T suffixes to the base of 1024), or a percentage\&. In the latter case the limit is applied relative to the size of the respective file system\&. This limit is only applied if the relevant file system is
901 "tmpfs"
902 and has no effect otherwise\&. Note that if these options are not used, a default quota might still be enforced (typically 80%\&.)
903 .sp
904 Added in version 258\&.
905 .RE
906 .PP
907 \fB\-\-storage=\fR\fB\fISTORAGE\fR\fR
908 .RS 4
909 Selects the storage mechanism to use for this home directory\&. Takes one of
910 "luks",
911 "fscrypt",
912 "directory",
913 "subvolume",
914 "cifs"\&. For details about these mechanisms, see above\&. If a new home directory is created and the storage type is not specifically specified,
915 \fBhomed.conf\fR(5)
916 defines which default storage to use\&.
917 .sp
918 Added in version 245\&.
919 .RE
920 .PP
921 \fB\-\-image\-path=\fR\fB\fIPATH\fR\fR
922 .RS 4
923 Takes a file system path\&. Configures where to place the user\*(Aqs home directory\&. When LUKS2 storage is used refers to the path to the loopback file, otherwise to the path to the home directory (which may be in
924 /home/
925 or any other accessible filesystem)\&. When unspecified defaults to
926 /home/$USER\&.home
927 when LUKS storage is used and
928 /home/$USER\&.homedir
929 for the other storage mechanisms\&. Not defined for the
930 "cifs"
931 storage mechanism\&. To use LUKS2 storage on a regular block device (for example a USB stick) pass the path to the block device here\&. Specifying the path to a directory here when using LUKS2 storage is not allowed\&. Similar, specifying the path to a regular file or device node is not allowed if any of the other storage backends are used\&.
932 .sp
933 Added in version 245\&.
934 .RE
935 .PP
936 \fB\-\-drop\-caches=\fR\fB\fIBOOL\fR\fR
937 .RS 4
938 Automatically flush OS file system caches on logout\&. This is useful in combination with the fscrypt storage backend to ensure the OS does not keep decrypted versions of the files and directories in memory (and accessible) after logout\&. This option is also supported on other backends, but should not bring any benefit there\&. Defaults to off, except if the selected storage backend is fscrypt, where it defaults to on\&. Note that flushing OS caches will negatively influence performance of the OS shortly after logout\&.
939 .sp
940 Added in version 250\&.
941 .RE
942 .SH "LUKS STORAGE USER RECORD PROPERTIES"
943 .PP
944 \fB\-\-fs\-type=\fR\fB\fITYPE\fR\fR
945 .RS 4
946 When LUKS2 storage is used configures the file system type to use inside the home directory LUKS2 container\&. One of
947 "btrfs",
948 "ext4",
949 "xfs"\&. If not specified
950 \fBhomed.conf\fR(5)
951 defines which default file system type to use\&. Note that
952 "xfs"
953 is not recommended as its support for file system resizing is too limited\&.
954 .sp
955 Added in version 245\&.
956 .RE
957 .PP
958 \fB\-\-luks\-discard=\fR\fB\fIBOOL\fR\fR
959 .RS 4
960 When LUKS2 storage is used configures whether to enable the
961 "discard"
962 feature of the file system\&. If enabled the file system on top of the LUKS2 volume will report empty block information to LUKS2 and the loopback file below, ensuring that empty space in the home directory is returned to the backing file system below the LUKS2 volume, resulting in a "sparse" loopback file\&. This option mostly defaults to off, since this permits over\-committing home directories which results in I/O errors if the underlying file system runs full while the upper file system wants to allocate a block\&. Such I/O errors are generally not handled well by file systems nor applications\&. When LUKS2 storage is used on top of regular block devices (instead of on top a loopback file) the discard logic defaults to on\&.
963 .sp
964 Added in version 245\&.
965 .RE
966 .PP
967 \fB\-\-luks\-offline\-discard=\fR\fB\fIBOOL\fR\fR
968 .RS 4
969 Similar to
970 \fB\-\-luks\-discard=\fR, controls the trimming of the file system\&. However, while
971 \fB\-\-luks\-discard=\fR
972 controls what happens when the home directory is active,
973 \fB\-\-luks\-offline\-discard=\fR
974 controls what happens when it becomes inactive, i\&.e\&. whether to trim/allocate the storage when deactivating the home directory\&. This option defaults to on, to ensure disk space is minimized while a user is not logged in\&.
975 .sp
976 Added in version 246\&.
977 .RE
978 .PP
979 \fB\-\-luks\-extra\-mount\-options=\fR\fB\fIOPTIONS\fR\fR
980 .RS 4
981 Takes a string containing additional mount options to use when mounting the LUKS volume\&. If specified, this string will be appended to the default, built\-in mount options\&. Defaults to "compress=zstd:1,noacl,user_subvol_rm_allowed"\&.
982 .sp
983 Added in version 250\&.
984 .RE
985 .PP
986 \fB\-\-luks\-cipher=\fR\fB\fICIPHER\fR\fR, \fB\-\-luks\-cipher\-mode=\fR\fB\fIMODE\fR\fR, \fB\-\-luks\-volume\-key\-size=\fR\fB\fIBYTES\fR\fR, \fB\-\-luks\-pbkdf\-type=\fR\fB\fITYPE\fR\fR, \fB\-\-luks\-pbkdf\-hash\-algorithm=\fR\fB\fIALGORITHM\fR\fR, \fB\-\-luks\-pbkdf\-force\-iterations=\fR\fB\fIITERATIONS\fR\fR, \fB\-\-luks\-pbkdf\-time\-cost=\fR\fB\fISECONDS\fR\fR, \fB\-\-luks\-pbkdf\-memory\-cost=\fR\fB\fIBYTES\fR\fR, \fB\-\-luks\-pbkdf\-parallel\-threads=\fR\fB\fITHREADS\fR\fR, \fB\-\-luks\-sector\-size=\fR\fB\fIBYTES\fR\fR
987 .RS 4
988 Configures various cryptographic parameters for the LUKS2 storage mechanism\&. See
989 \fBcryptsetup\fR(8)
990 for details on the specific attributes\&.
991 .sp
992 Note that
993 \fBhomectl\fR
994 uses bytes for key size, like
995 /proc/crypto, but
996 \fBcryptsetup\fR(8)
997 uses bits\&.
998 .sp
999 Added in version 245\&.
1000 .RE
1001 .PP
1002 \fB\-\-auto\-resize\-mode=\fR
1003 .RS 4
1004 Configures whether to automatically grow and/or shrink the backing file system on login and logout\&. Takes one of the strings
1005 "off",
1006 "grow",
1007 "shrink\-and\-grow"\&. Only applies to the LUKS2 backend currently, and if the btrfs file system is used inside it (since only then online growing/shrinking of the file system is supported)\&. Defaults to
1008 "shrink\-and\-grow", if LUKS2/btrfs is used, otherwise is off\&. If set to
1009 "off"
1010 no automatic shrinking/growing during login or logout is done\&. If set to
1011 "grow"
1012 the home area is grown to the size configured via
1013 \fB\-\-disk\-size=\fR
1014 should it currently be smaller\&. If it already matches the configured size or is larger no operation is executed\&. If set to
1015 "shrink\-and\-grow"
1016 the home area is also resized during logout to the minimal size the used disk space and file system constraints permit\&. This mode thus ensures that while a home area is activated it is sized to the configured size, but while deactivated it is compacted taking up only the minimal space possible\&. Note that if the system is powered off abnormally or if the user otherwise not logged out cleanly the shrinking operation will not take place, and the user has to re\-login/logout again before it is executed again\&.
1017 .sp
1018 Added in version 250\&.
1019 .RE
1020 .PP
1021 \fB\-\-rebalance\-weight=\fR
1022 .RS 4
1023 Configures the weight parameter for the free disk space rebalancing logic\&. Only applies to the LUKS2 backend (since for the LUKS2 backend disk space is allocated from a per\-user loopback file system instead of immediately from a common pool like the other backends do it)\&. In regular intervals free disk space in the active home areas and their backing storage is redistributed among them, taking the weight value configured here into account\&. Expects an integer in the range 1\&...10000, or the special string
1024 "off"\&. If not specified, defaults to 100\&. The weight is used to scale free space made available to the home areas: a home area with a weight of 200 will get twice the free space as one with a weight of 100; a home area with a weight of 50 will get half of that\&. The backing file system will be assigned space for a weight of 20\&. If set to
1025 "off"
1026 no automatic free space distribution is done for this home area\&. Note that resizing the home area explicitly (with
1027 \fBhomectl resize\fR
1028 see below) will implicitly turn off the automatic rebalancing\&. To reenable the automatic rebalancing use
1029 \fB\-\-rebalance\-weight=\fR
1030 with an empty parameter\&.
1031 .sp
1032 Added in version 250\&.
1033 .RE
1034 .SH "MOUNTING USER RECORD PROPERTIES"
1035 .PP
1036 \fB\-\-nosuid=\fR\fB\fIBOOL\fR\fR, \fB\-\-nodev=\fR\fB\fIBOOL\fR\fR, \fB\-\-noexec=\fR\fB\fIBOOL\fR\fR
1037 .RS 4
1038 Configures the
1039 "nosuid",
1040 "nodev"
1041 and
1042 "noexec"
1043 mount options for the home directories\&. By default,
1044 "nodev"
1045 and
1046 "nosuid"
1047 are on, while
1048 "noexec"
1049 is off\&. For details about these mount options see
1050 \fBmount\fR(8)\&.
1051 .sp
1052 Added in version 245\&.
1053 .RE
1054 .SH "CIFS USER RECORD PROPERTIES"
1055 .PP
1056 \fB\-\-cifs\-domain=\fR\fB\fIDOMAIN\fR\fR, \fB\-\-cifs\-user\-name=\fR\fB\fIUSER\fR\fR, \fB\-\-cifs\-service=\fR\fB\fISERVICE\fR\fR, \fB\-\-cifs\-extra\-mount\-options=\fR\fB\fIOPTIONS\fR\fR
1057 .RS 4
1058 Configures the Windows File Sharing (CIFS) domain and user to associate with the home directory/user account, as well as the file share ("service") to mount as directory\&. The latter is used when
1059 "cifs"
1060 storage is selected\&. The file share should be specified in format
1061 "//\fIhost\fR/\fIshare\fR/\fIdirectory/\&...\fR"\&. The directory part is optional \(em if not specified, the home directory will be placed in the top\-level directory of the share\&. The
1062 \fB\-\-cifs\-extra\-mount\-options=\fR
1063 setting allows specifying additional mount options when mounting the share, see
1064 \fBmount.cifs\fR(8)
1065 for details\&.
1066 .sp
1067 Added in version 245\&.
1068 .RE
1069 .SH "LOGIN BEHAVIOUR RECORD PROPERTIES"
1070 .PP
1071 \fB\-\-stop\-delay=\fR\fB\fISECS\fR\fR
1072 .RS 4
1073 Configures the time the per\-user service manager shall continue to run after the all sessions of the user ended\&. The default is configured in
1074 \fBlogind.conf\fR(5)
1075 (for home directories of LUKS2 storage located on removable media this defaults to 0 though)\&. A longer time makes sure quick, repetitive logins are more efficient as the user\*(Aqs service manager does not have to be started every time\&.
1076 .sp
1077 Added in version 245\&.
1078 .RE
1079 .PP
1080 \fB\-\-kill\-processes=\fR\fB\fIBOOL\fR\fR
1081 .RS 4
1082 Configures whether to kill all processes of the user on logout\&. The default is configured in
1083 \fBlogind.conf\fR(5)\&.
1084 .sp
1085 Added in version 245\&.
1086 .RE
1087 .PP
1088 \fB\-\-auto\-login=\fR\fB\fIBOOL\fR\fR
1089 .RS 4
1090 Takes a boolean argument\&. Configures whether the graphical UI of the system should automatically log this user in if possible\&. Defaults to off\&. If less or more than one user is marked this way automatic login is disabled\&.
1091 .sp
1092 Added in version 245\&.
1093 .RE
1094 .PP
1095 \fB\-\-session\-launcher=\fR\fB\fILAUNCHER\fR\fR
1096 .RS 4
1097 Takes a string argument\&. Configures the user\*(Aqs preferred session launcher \&.desktop entry file (i\&.e\&.
1098 "gnome",
1099 "plasma", or other names that appear in
1100 /usr/share/xesssions/
1101 or
1102 /usr/share/wayland\-sessions)\&. This is read by the display manager to pick the default session that is launched when the user logs in\&.
1103 .sp
1104 Added in version 256\&.
1105 .RE
1106 .PP
1107 \fB\-\-session\-type=\fR\fB\fITYPE\fR\fR
1108 .RS 4
1109 Takes a string argument\&. Configures the user\*(Aqs preferred session type (i\&.e\&.
1110 "x11",
1111 "wayland", and other values accepted by
1112 \fI$XDG_SESSION_TYPE\fR)\&. This is read by the display manage to pick the default session type the user is logged into\&.
1113 .sp
1114 Added in version 256\&.
1115 .RE
1116 .SH "COMMANDS"
1117 .PP
1118 The following commands are understood:
1119 .PP
1120 \fBlist\fR
1121 .RS 4
1122 List all home directories (along with brief details) currently managed by
1123 systemd\-homed\&.service\&. This command is also executed if none is specified on the command line\&. (Note that the list of users shown by this command does not include users managed by other subsystems, such as system users or any traditional users listed in
1124 /etc/passwd\&.)
1125 .sp
1126 Added in version 245\&.
1127 .RE
1128 .PP
1129 \fBactivate\fR \fIUSER\fR [\fIUSER\&...\fR]
1130 .RS 4
1131 Activate one or more home directories\&. The home directories of each listed user will be activated and made available under their mount points (typically in
1132 /home/$USER)\&. Note that any home activated this way stays active indefinitely, until it is explicitly deactivated again (with
1133 \fBdeactivate\fR, see below), or the user logs in and out again and it thus is deactivated due to the automatic deactivation\-on\-logout logic\&.
1134 .sp
1135 Activation of a home directory involves various operations that depend on the selected storage mechanism\&. If the LUKS2 mechanism is used, this generally involves: inquiring the user for a password, setting up a loopback device, validating and activating the LUKS2 volume, checking the file system, mounting the file system, and potentially changing the ownership of all included files to the correct UID/GID\&.
1136 .sp
1137 Added in version 245\&.
1138 .RE
1139 .PP
1140 \fBdeactivate\fR \fIUSER\fR [\fIUSER\&...\fR]
1141 .RS 4
1142 Deactivate one or more home directories\&. This undoes the effect of
1143 \fBactivate\fR\&.
1144 .sp
1145 Added in version 245\&.
1146 .RE
1147 .PP
1148 \fBinspect\fR \fIUSER\fR [\fIUSER\&...\fR]
1149 .RS 4
1150 Show various details about the specified home directories\&. This shows various information about the home directory and its user account, including runtime data such as current state, disk use and similar\&. Combine with
1151 \fB\-\-json=\fR
1152 to show the detailed JSON user record instead, possibly combined with
1153 \fB\-\-export\-format=\fR
1154 to suppress certain aspects of the output\&.
1155 .sp
1156 Added in version 245\&.
1157 .RE
1158 .PP
1159 \fBauthenticate\fR \fIUSER\fR [\fIUSER\&...\fR]
1160 .RS 4
1161 Validate authentication credentials of a home directory\&. This queries the caller for a password (or similar) and checks that it correctly unlocks the home directory\&. This leaves the home directory in the state it is in, i\&.e\&. it leaves the home directory in inactive state if it was inactive before, and in active state if it was active before\&.
1162 .sp
1163 Added in version 245\&.
1164 .RE
1165 .PP
1166 \fBcreate\fR \fIUSER\fR, \fBcreate\fR \fB\-\-identity=\fR\fB\fIPATH\fR\fR [\fIUSER\fR]
1167 .RS 4
1168 Create a new home directory/user account of the specified name\&. Use the various user record property options (as documented above) to control various aspects of the home directory and its user accounts\&.
1169 .sp
1170 The specified user name should follow the strict syntax described on
1171 \m[blue]\fBUser/Group Name Syntax\fR\m[]\&\s-2\u[4]\d\s+2\&.
1172 .sp
1173 Added in version 245\&.
1174 .RE
1175 .PP
1176 \fBadopt\fR \fIPATH\fR [\fIPATH\fR\&...]
1177 .RS 4
1178 Adopts one or more existing home directories on the local system\&. Takes one or more paths to
1179 *\&.home
1180 LUKS home directories or
1181 *\&.homedir/
1182 standalone home directories or subvolumes previously created by
1183 systemd\-homed
1184 and makes them available locally for login\&. The referenced files are not moved\&. This is an alternative for moving such home directories into
1185 /home/
1186 (where they would be picked up automatically)\&.
1187 .sp
1188 Added in version 258\&.
1189 .RE
1190 .PP
1191 \fBregister\fR \fIFILE\fR [\fIFILE\fR\&...]
1192 .RS 4
1193 Registers one or more users, without creating their home directories\&. Takes one or more paths to JSON user record files\&. If the path is specified as
1194 "\-"
1195 reads the JSON user record from standard input\&.
1196 .sp
1197 Registering a user makes it accessible on the local system without creating a new home directory\&. This is particularly useful for making a user accessible on a system it was not originally created on\&.
1198 .sp
1199 Here\*(Aqs an example how to make a local user account with its home directory accessible on a remote system, using SMB/CIFS file sharing\&. With Samba installed in its default configuration invoke as
1200 "root":
1201 .sp
1202 .if n \{\
1203 .RS 4
1204 .\}
1205 .nf
1206 # smbpasswd \-a lennart
1207 .fi
1208 .if n \{\
1209 .RE
1210 .\}
1211 .sp
1212 Continue as regular user
1213 "lennart":
1214 .sp
1215 .if n \{\
1216 .RS 4
1217 .\}
1218 .nf
1219 $ homectl update lennart \-\-ssh\-authorized\-keys=\&... \-N \-\-storage=cifs \-\-cifs\-service="//$HOSTNAME/lennart"
1220 $ homectl get\-signing\-key | ssh targetsystem homectl add\-signing\-key \-\-key\-name="$HOSTNAME"\&.public
1221 $ homectl inspect \-E lennart | ssh targetsystem homectl register \-
1222 $ ssh lennart@targetsystem
1223 .fi
1224 .if n \{\
1225 .RE
1226 .\}
1227 .sp
1228 This first ensures the user account
1229 "lennart"
1230 is known to and accessible by Samba\&. It then registers a local SSH access that shall be used for accessing this user, and configures CIFS as default storage for non\-local systems on the account\&. It then adds the local system\*(Aqs account signing key to the target system\&. Then it registers the local user account with the target system\&. Finally it logs into the account on the target system\&. The target system will then connect back via SMB/CIFS to access the home directory\&.
1231 .sp
1232 Added in version 258\&.
1233 .RE
1234 .PP
1235 \fBunregister\fR \fIUSER\fR\&...
1236 .RS 4
1237 Unregisters one or more user accounts\&. This only removes the user record from the local system, it does not delete the home directory\&. The home directory can be readded via the
1238 \fBregister\fR
1239 or
1240 \fBadopt\fR
1241 command later, on this or another system\&. Note that unregistering a user whose home directory is placed in
1242 /home/
1243 will not make the user disappear from the local user database, as all supported home directories placed there will show up in the user database\&. However, the user record will become "unfixated", i\&.e\&. lose its binding to the local system\&. When logged into it will automatically regain the binding, and acquire a local UID/GID pair\&.
1244 .sp
1245 Added in version 258\&.
1246 .RE
1247 .PP
1248 \fBremove\fR \fIUSER\fR
1249 .RS 4
1250 Remove a home directory/user account\&. This will remove both the home directory\*(Aqs user record and the home directory itself, and thus delete all files and directories owned by the user\&.
1251 .sp
1252 Added in version 245\&.
1253 .RE
1254 .PP
1255 \fBupdate\fR \fIUSER\fR, \fBupdate\fR \fB\-\-identity=\fR\fB\fIPATH\fR\fR [\fIUSER\fR]
1256 .RS 4
1257 Update a home directory/user account\&. Use the various user record property options (as documented above) to make changes to the account, or alternatively provide a full, updated JSON user record via the
1258 \fB\-\-identity=\fR
1259 option\&.
1260 .sp
1261 Note that changes to user records not signed by a cryptographic private key available locally are not permitted, unless
1262 \fB\-\-identity=\fR
1263 is used with a user record that is already correctly signed by a recognized private key\&.
1264 .sp
1265 Added in version 245\&.
1266 .RE
1267 .PP
1268 \fBpasswd\fR \fIUSER\fR
1269 .RS 4
1270 Change the password of the specified home directory/user account\&.
1271 .sp
1272 Added in version 245\&.
1273 .RE
1274 .PP
1275 \fBresize\fR \fIUSER\fR \fIBYTES\fR
1276 .RS 4
1277 Change the disk space assigned to the specified home directory\&. If the LUKS2 storage mechanism is used this will automatically resize the loopback file and the file system contained within\&. Note that if
1278 "ext4"
1279 is used inside of the LUKS2 volume, it is necessary to deactivate the home directory before shrinking it (i\&.e the user has to log out)\&. Growing can be done while the home directory is active\&. If
1280 "xfs"
1281 is used inside of the LUKS2 volume the home directory may not be shrunk whatsoever\&. On all three of
1282 "ext4",
1283 "xfs"
1284 and
1285 "btrfs"
1286 the home directory may be grown while the user is logged in, and on the latter also shrunk while the user is logged in\&. If the
1287 "subvolume",
1288 "directory",
1289 "fscrypt"
1290 storage mechanisms are used, resizing will change file system quota\&. The size parameter may make use of the usual suffixes B, K, M, G, T (to the base of 1024)\&. The special strings
1291 "min"
1292 and
1293 "max"
1294 may be specified in place of a numeric size value, for minimizing or maximizing disk space assigned to the home area, taking constraints of the file system, disk usage inside the home area and on the backing storage into account\&.
1295 .sp
1296 Added in version 245\&.
1297 .RE
1298 .PP
1299 \fBlock\fR \fIUSER\fR
1300 .RS 4
1301 Temporarily suspend access to the user\*(Aqs home directory and remove any associated cryptographic keys from memory\&. Any attempts to access the user\*(Aqs home directory will stall until the home directory is unlocked again (i\&.e\&. re\-authenticated)\&. This functionality is primarily intended to be used during system suspend to make sure the user\*(Aqs data cannot be accessed until the user re\-authenticates on resume\&. This operation is only defined for home directories that use the LUKS2 storage mechanism\&.
1302 .sp
1303 Added in version 245\&.
1304 .RE
1305 .PP
1306 \fBunlock\fR \fIUSER\fR
1307 .RS 4
1308 Resume access to the user\*(Aqs home directory again, undoing the effect of
1309 \fBlock\fR
1310 above\&. This requires authentication of the user, as the cryptographic keys required for access to the home directory need to be reacquired\&.
1311 .sp
1312 Added in version 245\&.
1313 .RE
1314 .PP
1315 \fBlock\-all\fR
1316 .RS 4
1317 Execute the
1318 \fBlock\fR
1319 command on all suitable home directories at once\&. This operation is generally executed on system suspend (i\&.e\&. by
1320 \fBsystemctl suspend\fR
1321 and related commands), to ensure all active user\*(Aqs cryptographic keys for accessing their home directories are removed from memory\&.
1322 .sp
1323 Added in version 245\&.
1324 .RE
1325 .PP
1326 \fBdeactivate\-all\fR
1327 .RS 4
1328 Execute the
1329 \fBdeactivate\fR
1330 command on all active home directories at once\&. This operation is generally executed on system shut down (i\&.e\&. by
1331 \fBsystemctl poweroff\fR
1332 and related commands), to ensure all active user\*(Aqs home directories are fully deactivated before
1333 /home/
1334 and related file systems are unmounted\&.
1335 .sp
1336 Added in version 247\&.
1337 .RE
1338 .PP
1339 \fBwith\fR \fIUSER\fR \fICOMMAND\&...\fR
1340 .RS 4
1341 Activate the specified user\*(Aqs home directory, run the specified command (under the caller\*(Aqs identity, not the specified user\*(Aqs) and deactivate the home directory afterwards again (unless the user is logged in otherwise)\&. This command is useful for running privileged backup scripts and such, but requires authentication with the user\*(Aqs credentials in order to be able to unlock the user\*(Aqs home directory\&.
1342 .sp
1343 Added in version 245\&.
1344 .RE
1345 .PP
1346 \fBrebalance\fR
1347 .RS 4
1348 Rebalance free disk space between active home areas and the backing storage\&. See
1349 \fB\-\-rebalance\-weight=\fR
1350 above\&. This executes no operation unless there\*(Aqs at least one active LUKS2 home area that has disk space rebalancing enabled\&. This operation is synchronous: it will only complete once disk space is rebalanced according to the rebalancing weights\&. Note that rebalancing also takes place automatically in the background in regular intervals\&. Use this command to synchronously ensure disk space is properly redistributed before initiating an operation requiring large amounts of disk space\&.
1351 .sp
1352 Added in version 250\&.
1353 .RE
1354 .PP
1355 \fBfirstboot\fR
1356 .RS 4
1357 This command is supposed to be invoked during the initial boot of the system\&. It checks whether any regular home area exists so far, and if not queries the user interactively on the console for user name and password and creates one (only if
1358 \fB\-\-prompt\-new\-user\fR
1359 is specified)\&. Alternatively, if one or more service credentials whose name starts with
1360 "home\&.create\&."
1361 are passed to the command (containing a user record in JSON format) these users are automatically created at boot\&.
1362 .sp
1363 This command is invoked by the
1364 systemd\-homed\-firstboot\&.service
1365 service unit\&.
1366 .sp
1367 Added in version 256\&.
1368 .RE
1369 .PP
1370 \fBlist\-signing\-keys\fR
1371 .RS 4
1372 Show a list of public keys that home directories can be signed with to be allowed for local login\&. One such key (local\&.public) will be generated automatically for signing locally created home directories, but additional public keys may be registered to accept home directories from other origins too (see
1373 \fBadd\-signing\-key\fR
1374 below)\&.
1375 .sp
1376 Added in version 258\&.
1377 .RE
1378 .PP
1379 \fBget\-signing\-key\fR [\fINAME\&...\fR]
1380 .RS 4
1381 Write the public key identified by the specified name to standard output (in PEM format)\&. If no name is specified defaults to
1382 local\&.public, i\&.e\&. the automatically generated key for locally created home directories\&.
1383 .sp
1384 Added in version 258\&.
1385 .RE
1386 .PP
1387 \fBadd\-signing\-key\fR [\fIFILE\&...\fR]
1388 .RS 4
1389 Add public key(s) from the specified PEM key file(s) to the list of keys that home areas have to be signed by to be permitted for local login\&. If a path of
1390 "\-"
1391 is specified, or if no file is specified at all, the key will be read from standard input\&. The key file name(s) must carry the
1392 \&.public
1393 suffix, and the file name(s) will be used to name the key(s) once added, too\&. If a key is added from standard input the key name must be specified explicitly via
1394 \fB\-\-key\-name=\fR, see above\&.
1395 .sp
1396 This command is useful for permitting local home directories to be used on a remote system\&. Example:
1397 .sp
1398 .if n \{\
1399 .RS 4
1400 .\}
1401 .nf
1402 homectl get\-signing\-key | ssh myotherhost homectl add\-signing\-key \-\-key\-name="$HOSTNAME"\&.public
1403 .fi
1404 .if n \{\
1405 .RE
1406 .\}
1407 .sp
1408 Added in version 258\&.
1409 .RE
1410 .PP
1411 \fBremove\-signing\-key\fR \fINAME\&...\fR
1412 .RS 4
1413 Remove the public key identified by the specified name from the list of keys that control from which origins to permit home directories for login\&.
1414 .sp
1415 Added in version 258\&.
1416 .RE
1417 .SH "CREDENTIALS"
1418 .PP
1419 When invoked with the
1420 \fBfirstboot\fR
1421 command,
1422 \fBhomectl\fR
1423 supports the service credentials logic as implemented by
1424 \fIImportCredential=\fR/\fILoadCredential=\fR/\fISetCredential=\fR
1425 (see
1426 \fBsystemd.exec\fR(5)
1427 for details)\&. The following credentials are used when passed in:
1428 .PP
1429 \fIhome\&.create\&.*\fR
1430 .RS 4
1431 If one or more credentials whose names begin with
1432 "home\&.create\&.", followed by a valid UNIX username are passed, a new home area is created, one for each specified user record\&.
1433 .sp
1434 Added in version 256\&.
1435 .RE
1436 .SH "KERNEL COMMAND LINE"
1437 .PP
1438 \fIsystemd\&.firstboot=\fR
1439 .RS 4
1440 This boolean will disable the effect of
1441 \fBhomectl firstboot\fR
1442 command\&. It\*(Aqs primarily interpreted by
1443 \fBsystemd-firstboot\fR(1)\&.
1444 .sp
1445 Added in version 256\&.
1446 .RE
1447 .SH "EXIT STATUS"
1448 .PP
1449 On success, 0 is returned, a non\-zero failure code otherwise\&.
1450 .PP
1451 When a command is invoked with
1452 \fBwith\fR, the exit status of the child is propagated\&. Effectively,
1453 \fBhomectl\fR
1454 will exit without error if the command is successfully invoked
1455 \fIand\fR
1456 finishes successfully\&.
1457 .SH "ENVIRONMENT"
1458 .PP
1459 \fI$SYSTEMD_LOG_LEVEL\fR
1460 .RS 4
1461 The maximum log level of emitted messages (messages with a higher log level, i\&.e\&. less important ones, will be suppressed)\&. Takes a comma\-separated list of values\&. A value may be either one of (in order of decreasing importance)
1462 \fBemerg\fR,
1463 \fBalert\fR,
1464 \fBcrit\fR,
1465 \fBerr\fR,
1466 \fBwarning\fR,
1467 \fBnotice\fR,
1468 \fBinfo\fR,
1469 \fBdebug\fR, or an integer in the range 0\&...7\&. See
1470 \fBsyslog\fR(3)
1471 for more information\&. Each value may optionally be prefixed with one of
1472 \fBconsole\fR,
1473 \fBsyslog\fR,
1474 \fBkmsg\fR
1475 or
1476 \fBjournal\fR
1477 followed by a colon to set the maximum log level for that specific log target (e\&.g\&.
1478 \fBSYSTEMD_LOG_LEVEL=debug,console:info\fR
1479 specifies to log at debug level except when logging to the console which should be at info level)\&. Note that the global maximum log level takes priority over any per target maximum log levels\&.
1480 .RE
1481 .PP
1482 \fI$SYSTEMD_LOG_COLOR\fR
1483 .RS 4
1484 A boolean\&. If true, messages written to the tty will be colored according to priority\&.
1485 .sp
1486 This setting is only useful when messages are written directly to the terminal, because
1487 \fBjournalctl\fR(1)
1488 and other tools that display logs will color messages based on the log level on their own\&.
1489 .RE
1490 .PP
1491 \fI$SYSTEMD_LOG_TIME\fR
1492 .RS 4
1493 A boolean\&. If true, console log messages will be prefixed with a timestamp\&.
1494 .sp
1495 This setting is only useful when messages are written directly to the terminal or a file, because
1496 \fBjournalctl\fR(1)
1497 and other tools that display logs will attach timestamps based on the entry metadata on their own\&.
1498 .RE
1499 .PP
1500 \fI$SYSTEMD_LOG_LOCATION\fR
1501 .RS 4
1502 A boolean\&. If true, messages will be prefixed with a filename and line number in the source code where the message originates\&.
1503 .sp
1504 Note that the log location is often attached as metadata to journal entries anyway\&. Including it directly in the message text can nevertheless be convenient when debugging programs\&.
1505 .RE
1506 .PP
1507 \fI$SYSTEMD_LOG_TID\fR
1508 .RS 4
1509 A boolean\&. If true, messages will be prefixed with the current numerical thread ID (TID)\&.
1510 .sp
1511 Note that the this information is attached as metadata to journal entries anyway\&. Including it directly in the message text can nevertheless be convenient when debugging programs\&.
1512 .RE
1513 .PP
1514 \fI$SYSTEMD_LOG_TARGET\fR
1515 .RS 4
1516 The destination for log messages\&. One of
1517 \fBconsole\fR
1518 (log to the attached tty),
1519 \fBconsole\-prefixed\fR
1520 (log to the attached tty but with prefixes encoding the log level and "facility", see
1521 \fBsyslog\fR(3),
1522 \fBkmsg\fR
1523 (log to the kernel circular log buffer),
1524 \fBjournal\fR
1525 (log to the journal),
1526 \fBjournal\-or\-kmsg\fR
1527 (log to the journal if available, and to kmsg otherwise),
1528 \fBauto\fR
1529 (determine the appropriate log target automatically, the default),
1530 \fBnull\fR
1531 (disable log output)\&.
1532 .RE
1533 .PP
1534 \fI$SYSTEMD_LOG_RATELIMIT_KMSG\fR
1535 .RS 4
1536 Whether to ratelimit kmsg or not\&. Takes a boolean\&. Defaults to
1537 "true"\&. If disabled, systemd will not ratelimit messages written to kmsg\&.
1538 .RE
1539 .PP
1540 \fI$SYSTEMD_PAGER\fR, \fI$PAGER\fR
1541 .RS 4
1542 Pager to use when
1543 \fB\-\-no\-pager\fR
1544 is not given\&.
1545 \fI$SYSTEMD_PAGER\fR
1546 is used if set; otherwise
1547 \fI$PAGER\fR
1548 is used\&. If neither
1549 \fI$SYSTEMD_PAGER\fR
1550 nor
1551 \fI$PAGER\fR
1552 are set, a set of well\-known pager implementations is tried in turn, including
1553 \fBless\fR(1)
1554 and
1555 \fBmore\fR(1), until one is found\&. If no pager implementation is discovered, no pager is invoked\&. Setting those environment variables to an empty string or the value
1556 "cat"
1557 is equivalent to passing
1558 \fB\-\-no\-pager\fR\&.
1559 .sp
1560 Note: if
1561 \fI$SYSTEMD_PAGERSECURE\fR
1562 is not set,
1563 \fI$SYSTEMD_PAGER\fR
1564 and
1565 \fI$PAGER\fR
1566 can only be used to disable the pager (with
1567 "cat"
1568 or
1569 ""), and are otherwise ignored\&.
1570 .RE
1571 .PP
1572 \fI$SYSTEMD_LESS\fR
1573 .RS 4
1574 Override the options passed to
1575 \fBless\fR
1576 (by default
1577 "FRSXMK")\&.
1578 .sp
1579 Users might want to change two options in particular:
1580 .PP
1581 \fBK\fR
1582 .RS 4
1583 This option instructs the pager to exit immediately when
1584 Ctrl+C
1585 is pressed\&. To allow
1586 \fBless\fR
1587 to handle
1588 Ctrl+C
1589 itself to switch back to the pager command prompt, unset this option\&.
1590 .sp
1591 If the value of
1592 \fI$SYSTEMD_LESS\fR
1593 does not include
1594 "K", and the pager that is invoked is
1595 \fBless\fR,
1596 Ctrl+C
1597 will be ignored by the executable, and needs to be handled by the pager\&.
1598 .RE
1599 .PP
1600 \fBX\fR
1601 .RS 4
1602 This option instructs the pager to not send termcap initialization and deinitialization strings to the terminal\&. It is set by default to allow command output to remain visible in the terminal even after the pager exits\&. Nevertheless, this prevents some pager functionality from working, in particular paged output cannot be scrolled with the mouse\&.
1603 .RE
1604 .sp
1605 Note that setting the regular
1606 \fI$LESS\fR
1607 environment variable has no effect for
1608 \fBless\fR
1609 invocations by systemd tools\&.
1610 .sp
1611 See
1612 \fBless\fR(1)
1613 for more discussion\&.
1614 .RE
1615 .PP
1616 \fI$SYSTEMD_LESSCHARSET\fR
1617 .RS 4
1618 Override the charset passed to
1619 \fBless\fR
1620 (by default
1621 "utf\-8", if the invoking terminal is determined to be UTF\-8 compatible)\&.
1622 .sp
1623 Note that setting the regular
1624 \fI$LESSCHARSET\fR
1625 environment variable has no effect for
1626 \fBless\fR
1627 invocations by systemd tools\&.
1628 .RE
1629 .PP
1630 \fI$SYSTEMD_PAGERSECURE\fR
1631 .RS 4
1632 Common pager commands like
1633 \fBless\fR(1), in addition to "paging", i\&.e\&. scrolling through the output, support opening of or writing to other files and running arbitrary shell commands\&. When commands are invoked with elevated privileges, for example under
1634 \fBsudo\fR(8)
1635 or
1636 \fBpkexec\fR(1), the pager becomes a security boundary\&. Care must be taken that only programs with strictly limited functionality are used as pagers, and unintended interactive features like opening or creation of new files or starting of subprocesses are not allowed\&. "Secure mode" for the pager may be enabled as described below,
1637 \fIif the pager supports that\fR
1638 (most pagers are not written in a way that takes this into consideration)\&. It is recommended to either explicitly enable "secure mode" or to completely disable the pager using
1639 \fB\-\-no\-pager\fR
1640 or
1641 \fIPAGER=cat\fR
1642 when allowing untrusted users to execute commands with elevated privileges\&.
1643 .sp
1644 This option takes a boolean argument\&. When set to true, the "secure mode" of the pager is enabled\&. In "secure mode",
1645 \fBLESSSECURE=1\fR
1646 will be set when invoking the pager, which instructs the pager to disable commands that open or create new files or start new subprocesses\&. Currently only
1647 \fBless\fR(1)
1648 is known to understand this variable and implement "secure mode"\&.
1649 .sp
1650 When set to false, no limitation is placed on the pager\&. Setting
1651 \fISYSTEMD_PAGERSECURE=0\fR
1652 or not removing it from the inherited environment may allow the user to invoke arbitrary commands\&.
1653 .sp
1654 When
1655 \fI$SYSTEMD_PAGERSECURE\fR
1656 is not set, systemd tools attempt to automatically figure out if "secure mode" should be enabled and whether the pager supports it\&. "Secure mode" is enabled if the effective UID is not the same as the owner of the login session, see
1657 \fBgeteuid\fR(2)
1658 and
1659 \fBsd_pid_get_owner_uid\fR(3), or when running under
1660 \fBsudo\fR(8)
1661 or similar tools (\fI$SUDO_UID\fR
1662 is set
1663 \&\s-2\u[5]\d\s+2)\&. In those cases,
1664 \fISYSTEMD_PAGERSECURE=1\fR
1665 will be set and pagers which are not known to implement "secure mode" will not be used at all\&. Note that this autodetection only covers the most common mechanisms to elevate privileges and is intended as convenience\&. It is recommended to explicitly set
1666 \fI$SYSTEMD_PAGERSECURE\fR
1667 or disable the pager\&.
1668 .sp
1669 Note that if the
1670 \fI$SYSTEMD_PAGER\fR
1671 or
1672 \fI$PAGER\fR
1673 variables are to be honoured, other than to disable the pager,
1674 \fI$SYSTEMD_PAGERSECURE\fR
1675 must be set too\&.
1676 .RE
1677 .PP
1678 \fI$SYSTEMD_COLORS\fR
1679 .RS 4
1680 Takes a boolean argument\&. When true,
1681 \fBsystemd\fR
1682 and related utilities will use colors in their output, otherwise the output will be monochrome\&. Additionally, the variable can take one of the following special values:
1683 "16",
1684 "256"
1685 to restrict the use of colors to the base 16 or 256 ANSI colors, respectively\&. This can be specified to override the automatic decision based on
1686 \fI$TERM\fR
1687 and what the console is connected to\&.
1688 .RE
1689 .PP
1690 \fI$SYSTEMD_URLIFY\fR
1691 .RS 4
1692 The value must be a boolean\&. Controls whether clickable links should be generated in the output for terminal emulators supporting this\&. This can be specified to override the decision that
1693 \fBsystemd\fR
1694 makes based on
1695 \fI$TERM\fR
1696 and other conditions\&.
1697 .RE
1698 .SH "EXAMPLES"
1699 .PP
1700 \fBExample\ \&1.\ \&Create a user "waldo" in the administrator group "wheel", and assign 500 MiB disk space to them\&.\fR
1701 .sp
1702 .if n \{\
1703 .RS 4
1704 .\}
1705 .nf
1706 homectl create waldo \-\-real\-name="Waldo McWaldo" \-G wheel \-\-disk\-size=500M
1707 .fi
1708 .if n \{\
1709 .RE
1710 .\}
1711 .PP
1712 \fBExample\ \&2.\ \&Create a user "wally" on a USB stick, and assign a maximum of 500 concurrent tasks to them\&.\fR
1713 .sp
1714 .if n \{\
1715 .RS 4
1716 .\}
1717 .nf
1718 homectl create wally \-\-real\-name="Wally McWally" \-\-image\-path=/dev/disk/by\-id/usb\-SanDisk_Ultra_Fit_476fff954b2b5c44\-0:0 \-\-tasks\-max=500
1719 .fi
1720 .if n \{\
1721 .RE
1722 .\}
1723 .PP
1724 \fBExample\ \&3.\ \&Change nice level of user "odlaw" to +5 and make sure the environment variable \fI$SOME\fR is set to the string "THING" for them on login\&.\fR
1725 .sp
1726 .if n \{\
1727 .RS 4
1728 .\}
1729 .nf
1730 homectl update odlaw \-\-nice=5 \-\-setenv=SOME=THING
1731 .fi
1732 .if n \{\
1733 .RE
1734 .\}
1735 .PP
1736 \fBExample\ \&4.\ \&Set up authentication with a YubiKey security token using PKCS#11/PIV:\fR
1737 .sp
1738 .if n \{\
1739 .RS 4
1740 .\}
1741 .nf
1742 # Clear the Yubikey from any old keys (careful!)
1743 ykman piv reset
1744
1745 # Generate a new private/public key pair on the device, store the public key in \*(Aqpubkey\&.pem\*(Aq\&.
1746 ykman piv generate\-key \-a RSA2048 9d pubkey\&.pem
1747
1748 # Create a self\-signed certificate from this public key, and store it on the device\&.
1749 ykman piv generate\-certificate \-\-subject "Knobelei" 9d pubkey\&.pem
1750
1751 # We do not need the public key on disk anymore
1752 rm pubkey\&.pem
1753
1754 # Allow the security token to unlock the account of user \*(Aqlafcadio\*(Aq\&.
1755 homectl update lafcadio \-\-pkcs11\-token\-uri=auto
1756 .fi
1757 .if n \{\
1758 .RE
1759 .\}
1760 .PP
1761 \fBExample\ \&5.\ \&Set up authentication with a FIDO2 security token:\fR
1762 .sp
1763 .if n \{\
1764 .RS 4
1765 .\}
1766 .nf
1767 # Allow a FIDO2 security token to unlock the account of user \*(Aqnihilbaxter\*(Aq\&.
1768 homectl update nihilbaxter \-\-fido2\-device=auto
1769 .fi
1770 .if n \{\
1771 .RE
1772 .\}
1773 .PP
1774 \fBExample\ \&6.\ \&Add a recovery key to an existing user account:\fR
1775 .sp
1776 .if n \{\
1777 .RS 4
1778 .\}
1779 .nf
1780 # Generate and add a recovery key for user \*(Aqemily\*(Aq\&.
1781 homectl update emily \-\-recovery\-key=yes
1782 .fi
1783 .if n \{\
1784 .RE
1785 .\}
1786 .SH "SEE ALSO"
1787 .PP
1788 \fBsystemd\fR(1), \fBsystemd-homed.service\fR(8), \fBhomed.conf\fR(5), \fBuserdbctl\fR(1), \fBuseradd\fR(8), \fBcryptsetup\fR(8)
1789 .SH "NOTES"
1790 .IP " 1." 4
1791 JSON User Records
1792 .RS 4
1793 \%https://systemd.io/USER_RECORD
1794 .RE
1795 .IP " 2." 4
1796 Icon Naming Specification
1797 .RS 4
1798 \%https://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
1799 .RE
1800 .IP " 3." 4
1801 User Record Blob Directories
1802 .RS 4
1803 \%https://systemd.io/USER_RECORD_BLOB_DIRS
1804 .RE
1805 .IP " 4." 4
1806 User/Group Name Syntax
1807 .RS 4
1808 \%https://systemd.io/USER_NAMES
1809 .RE
1810 .IP " 5." 4
1811 It is recommended for other tools to set and check
1812 \fI$SUDO_UID\fR
1813 as appropriate, treating it is a common interface.
1814