Bug#986015: opensysusers: does not create groups implicitly with "m" action
Control: tags -1 patch
Hi,
On Sat, 27 Mar 2021 15:03:02 -0700 Vagrant Cascadian
<vagrant@debian.org> wrote:
> Package: opensysusers
> Version: 0.6-2
> Severity: normal
> X-Debbugs-Cc: vagrant@debian.org
>
> With /etc/sysusers.d/test.conf:
> #Type Name ID GECOS Home
> directory Shell u _testuser0 - "test user 0"
> /var/empty /usr/sbin/nologin m _testuser0 _testgroup
>
> $ sudo opensysusers-sysusers
> groupadd: invalid group ID '4:65534'
> groupadd: invalid group ID '65534:65534'
> usermod: group '_testgroup' does not exist
I think I found the problem, see the patch at the bottom
>
> According the the opensysusers.d man page:
>
> m
> Add a user to a group. If the user or group do not exist
> yet, they will be implicitly created.
>
> The systemd implementation does implicitly create groups that do not
> exist yet, but the opensysusers version does not appear to do so.
>
>
> live well,
> vagrant
>
Lorenzo
--- ./sysusers 2020-12-22 12:41:37.754884910 +0100
+++ ./sysusers.new 2021-09-17 19:14:06.090291921 +0200
@@ -80,7 +80,7 @@
fi
;;
m)
- add_group "${name}" '-'
+ add_group "${id}" '-'
if id "${name}" >/dev/null 2>&1; then
usermod -a -G "${id}" "${name}"
else
Reply to: