USERDBCTL(1) userdbctl USERDBCTL(1) userdbctl - userdbctl [...] {} [...] userdbctl ( ) . / JSON / ( JSON[1] JSON[2]) / UNIX NSS/glibc. / Varlink[3] / JSON /etc/userdb/ /run/userdb/ /run/host/userdb/ /usr/lib/userdb/ ( nss-systemd(8) ). : --output= . "classic" "friendly" "table" "json". "classic" /etc/passwd /etc/group. "friendly" . "table" . "json" JSON. "friendly" / "table" . . "classic" "table" . . "json" . 245. --json= JSON ( --output=json) . "pretty" "short". "pretty" JSON . "short" . 250. --service=[:...], -s :... /. ":". . . 245. --with-nss= / glibc/NSS . --with-nss=no / glibc NSS. --with-nss=yes / ( ). 245. --with-varlink= / Varlink / Varlink[3]. --with-varlink=no / Varlink. --with-varlink=yes / ( ). 249. --with-dropin= / /etc/userdb/ /run/userdb/ /run/host/userdb/ /usr/lib/userdb/. --with-dropin=no . --with-dropin=yes / ( ). 249. --synthesize=BOOL / root nobody / UID "". ( "yes") . "no" . 245. -N --with-nss=no --synthesize=no. JSON NSS/glibc . 245. --multiplexer=_ ( ) ( ). . 250. --chain ssh-authorized-keys . SSH . 250. --fuzzy, -z user group . . . 257. --disposition= user group . "intrinsic" "system" "regular" "dynamic" "container". . 257. -I -S -R --disposition=intrinsic --disposition=system --disposition=regular . 257. --uid-min= --uid-max= user group UID/GID. UID/GID . . user UIDs. group GIDs ( ). 0 ( ) 4294967294 ( ) UID/GID . 257. --uuid= user group UUID . UUID. 259. --boundaries= user group UID/GID . . true. 257. -B --boundaries=no. 257. --from-file=PATH -F user group JSON . "-" JSON . JSON . 258. --no-pager (pager). --no-legend . -h --help . --version . : user [USER...] . --output= . --from-file= JSON . . 245. group [GROUP...] . --output= . --from-file= JSON . . 245. users-in-group [GROUP...] . / . --output= . 245. groups-of-user [USER...] . / ( groups-of-user users-in-group ). --output= . 245. / . . 245. ssh-authorized-keys SSH . SSH . 245. load-credentials : userdb.user.*, userdb.group.* JSON User[1] JSON Group[2] . /etc/userdb/ nss-systemd(8). UID GID . GID ( UID/GID ). ( "userdb.user.foobar" "foobar") . 258. 258. userdbctl services . : io.systemd.DynamicUser ( PID 1) () DynamicUser= ( systemd.exec(5) ). 245. io.systemd.Home systemd-homed.service(8) () . 245. io.systemd.Machine systemd-machined.service(8) / . 246. io.systemd.Multiplexer systemd-userdbd.service(8) / . / . userdbctl --with-nss= --service= . 245. io.systemd.NameServiceSwitch () systemd-userdbd.service(8) / NSS/glibc JSON / . --with-nss=no . : nss-systemd(8) / NSS/glibc JSON / API API NSS/glibc . 245. io.systemd.DropIn () systemd-userdbd.service(8) JSON / /etc/userdb/ /run/userdb/ /run/host/userdb/ /usr/lib/userdb/. 249. userdbctl NSS . io.systemd.Multiplexer io.systemd.NameServiceSwitch / . SSH userdbctl SSH SSH . sshd_config(5): ... AuthorizedKeysCommand /usr/bin/userdbctl ssh-authorized-keys %u AuthorizedKeysCommandUser root ... SSH . --chain userdbctl ssh-authorized-keys SSH . : ... AuthorizedKeysCommand /usr/bin/userdbctl ssh-authorized-keys %u --chain /usr/bin/othertool %u AuthorizedKeysCommandUser root ... userdb SSH /usr/bin/othertool . 0 . $SYSTEMD_LOG_LEVEL ( ). . ( ) emerg alert crit err warning notice info debug 0 7. syslog(3) . console syslog kmsg journal (: SYSTEMD_LOG_LEVEL=debug,console:info debug info). . $SYSTEMD_LOG_COLOR . tty . journalctl(1) . $SYSTEMD_LOG_TIME . . journalctl(1) . $SYSTEMD_LOG_LOCATION . . . . $SYSTEMD_LOG_TID . (TID). . . $SYSTEMD_LOG_TARGET . : console ( ) console-prefixed ( "" syslog(3) kmsg ( ) journal ( ) journal-or-kmsg ( kmsg ) auto ( ) null ( ). $SYSTEMD_LOG_RATELIMIT_KMSG kmsg . . "true". systemd kmsg. $SYSTEMD_PAGER $PAGER --no-pager. $SYSTEMD_PAGER $PAGER. $SYSTEMD_PAGER $PAGER less(1) more(1) . . "cat" --no-pager. : $SYSTEMD_PAGERSECURE $SYSTEMD_PAGER $PAGER ( "cat" "") . $SYSTEMD_LESS less ( "FRSXMK"). : K Ctrl+C. less Ctrl+C . $SYSTEMD_LESS "K" less Ctrl+C . X termcap . . . $LESS less systemd. less(1) . $SYSTEMD_LESSCHARSET less ( "utf-8" UTF-8). $LESSCHARSET less systemd. $SYSTEMD_PAGERSECURE (pager) less(1) "" . sudo(8) pkexec(1) . . " " ( ). " " --no-pager PAGER=cat . . (true) " " . " " LESSSECURE=1 . less(1) " ". false (pager). SYSTEMD_PAGERSECURE=0 . $SYSTEMD_PAGERSECURE systemd " " . " " UID geteuid(2) sd_pid_get_owner_uid(3) sudo(8) ( $SUDO_UID [4]). SYSTEMD_PAGERSECURE=1 " " . . $SYSTEMD_PAGERSECURE . $SYSTEMD_PAGER $PAGER $SYSTEMD_PAGERSECURE . $SYSTEMD_COLORS (boolean) . ( ) systemd . $COLORTERM "truecolor" "24bit" 24 256 $NO_COLOR $TERM . true $NO_COLOR. false . "16" "256" "24bit" ANSI 16 256 24 . "auto-16" "auto-256" "auto-24bit" $TERM . $SYSTEMD_URLIFY . . systemd $TERM . systemd(1), systemd-userdbd.service(8), systemd-homed.service(8), nss-systemd(8), getent(1) 1. JSON https://systemd.io/USER_RECORD 2. JSON https://systemd.io/GROUP_RECORD 3. / Varlink https://systemd.io/USER_GROUP_API 4. $SUDO_UID . 3 . . : . systemd 260.2 USERDBCTL(1)