Yu Watanabe
bd8339bf00
sysusers: support new ! line flag for creating fully locked accounts
...
For https://github.com/systemd/systemd/pull/34876 .
Follow-ups for e42eed4afd .
2024-12-16 03:40:18 +09:00
Zbigniew Jędrzejewski-Szmek
7e62bd0762
sysusers.generate-pre.sh: properly escape quotes in description strings
...
... (rhbz#2104141)
In the first version, I wanted to use POSIX quotes with $''. But that required
'printf %q', which brings in a dependency on coreutils.
Following mcr0mmand's suggestion, ${foo@Q} is used instead, which should work
equivalently, and does not require anything new.
Tested with 'sysusers.generate-pre.sh /usr/lib/sysusers.d/*conf'. The output is
the same before and after, apart from the dovecot user with a quote.
2023-04-26 13:27:07 +02:00
Zbigniew Jędrzejewski-Szmek
ef79df9490
sysusers.generate-pre.sh: fix indentation in generated scripts
...
We need to use a mix of spaces and tabs: the tabs are removed because of -EOF,
and then the spaces indent the output. Jesus.
2023-04-26 13:23:03 +02:00
Martin Osvald
83301531c0
Support user:group notation by sysusers.generate-pre.sh script
...
#Type Name ID GECOS Home directory Shell
u user_name uid:gid "User Description" /home/dir /path/to/shell
According to: https://www.freedesktop.org/software/systemd/man/sysusers.d.html
2022-11-24 13:35:27 +01:00
Zbigniew Jędrzejewski-Szmek
3c5b26ff79
Fix indentation in %sysusers_create_compat macro (rhbz#2132835)
...
Automatic unindentation after <<-EOF only works with tabs. Jesus.
2022-10-09 15:20:41 +02:00
Luca BRUNO
f27d461663
sysusers/generate: bridge 'm' entries to usermod
...
This tweaks the sysusers.d handling logic so that 'm' entries are
now translated to a series of groupadd + useradd + usermod call.
The last usermod call is the notable change, effectively affecting
the list of secondary groups now.
2022-09-30 15:31:34 +00:00
Luca BRUNO
d00b46ea87
Align sysusers-generated shell value with upstream systemd default
2022-08-09 13:02:59 +02:00
Zbigniew Jędrzejewski-Szmek
a65bd010dd
Supress errors from useradd/groupadd
2022-05-25 14:18:25 +02:00
Zbigniew Jędrzejewski-Szmek
975bf63eb5
Shellcheckify sysusers.generate-pre.sh
...
There should be almost no functional change, but shellcheck complains
less. User/group descriptions with escaped characters are handled
properly.
2021-06-01 09:01:14 +02:00
Zbigniew Jędrzejewski-Szmek
1575061001
sysusers.generate-pre: indentation
2021-06-01 09:01:14 +02:00
Christian Glombek
493f6fa66b
sysusers.generate-pre.sh: Fix parsing files that don't end with newline
2020-05-11 12:52:13 +02:00
Zbigniew Jędrzejewski-Szmek
ced9237a14
Add the sysusers compat parts
2020-02-10 17:19:18 +01:00