5 # Check if homectl is installed, and if it isn't bail out early instead of failing
6 if ! test -x /usr
/bin
/homectl
; then
12 # As updating disk-size-related attributes can take some time on
13 # some filesystems, let's drop these fields before comparing the
14 # outputs to avoid unexpected fails. To see the full outputs of both
15 # homectl & userdbctl (for debugging purposes) drop the fields just
16 # before the comparison.
17 homectl inspect
$1 |
tee /tmp
/a
18 userdbctl user
$1 |
tee /tmp
/b
20 local PATTERN
='/^\s*Disk (Size|Free|Floor|Ceiling):/d'
21 diff <(sed -r "$PATTERN" /tmp
/a
) <(sed -r "$PATTERN" /tmp
/b
)
25 systemd-analyze log-level debug
26 systemd-analyze log-target console
28 NEWPASSWORD
=xEhErW0ndafV4s homectl create test-user
--disk-size=20M
31 PASSWORD
=xEhErW0ndafV4s homectl authenticate test-user
33 PASSWORD
=xEhErW0ndafV4s homectl activate test-user
36 PASSWORD
=xEhErW0ndafV4s homectl update test-user
--real-name="Inline test"
39 homectl deactivate test-user
42 PASSWORD
=xEhErW0ndafV4s NEWPASSWORD
=yPN4N0fYNKUkOq homectl passwd test-user
45 PASSWORD
=yPN4N0fYNKUkOq homectl activate test-user
48 SYSTEMD_LOG_LEVEL
=debug PASSWORD
=yPN4N0fYNKUkOq NEWPASSWORD
=xEhErW0ndafV4s homectl passwd test-user
51 homectl deactivate test-user
54 PASSWORD
=xEhErW0ndafV4s homectl activate test-user
57 PASSWORD
=xEhErW0ndafV4s homectl deactivate test-user
60 PASSWORD
=xEhErW0ndafV4s homectl update test-user
--real-name="Offline test"
63 PASSWORD
=xEhErW0ndafV4s homectl activate test-user
66 PASSWORD
=xEhErW0ndafV4s homectl deactivate test-user
69 ! PASSWORD
=xEhErW0ndafV4s homectl with test-user
-- test -f /home
/test-user
/xyz
70 PASSWORD
=xEhErW0ndafV4s homectl with test-user
-- touch /home
/test-user
/xyz
71 PASSWORD
=xEhErW0ndafV4s homectl with test-user
-- test -f /home
/test-user
/xyz
72 PASSWORD
=xEhErW0ndafV4s homectl with test-user
-- rm /home
/test-user
/xyz
73 ! PASSWORD
=xEhErW0ndafV4s homectl with test-user
-- test -f /home
/test-user
/xyz
75 homectl remove test-user
77 systemd-analyze log-level info