error: Invalid group content on FreeBSD
I did this
service kanidm_unixd enable
service kanidm_unixd start
I expected the following
Run without errors.
This happened instead
Jun 5 16:42:34 server1 kanidm_unixd[95447]: 00000000-0000-0000-0000-000000000000 INFO M- [info]: Started system provider
Jun 5 16:42:34 server1 kanidm_unixd[95447]: 00000000-0000-0000-0000-000000000000 INFO M- [info]: Started kanidm provider
Jun 5 16:42:34 server1 kanidm_unixd[95447]: 00000000-0000-0000-0000-000000000000 WARN M-^_M-^Z [warn]: Unable to read /etc/shadow, some features will be disabled. | err: Os { code: 2, kind: NotFound, message: "No such file or directory" }
Jun 5 16:42:34 server1 kanidm_unixd[95447]: 00000000-0000-0000-0000-000000000000 ERROR M-^_M-^Z [error]: Failed to process system id providers | err: "Invalid group content"
Kanidm version details
- Output of
kanidm(d) version:1.5.0 - Are you running it in a container? If so, which image/tag?:
No - If not a container, how'd you install it:
pkg install kanidm-server - Operating System / Version (On Unix please post the output of
uname -a):FreeBSD server1.lan 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64
Any other comments
config: https://github.com/kanidm/kanidm/blob/master/examples/config unixd: https://github.com/kanidm/kanidm/blob/master/examples/unixd
We should add support for reading /etc/shadow on FreeBSD:
Jun 5 16:42:34 server1 kanidm_unixd[95447]: 00000000-0000-0000-0000-000000000000 WARN M-^_M-^Z [warn]: Unable to read /etc/shadow, some features will be disabled. | err: Os { code: 2, kind: NotFound, message: "No such file or directory" }
It's trying to read /etc/shadow but can't access the file, so that'a a permissions error.
"Invalid group content" comes from being unable to read /etc/group
The main difference between /etc/group on FreeBSD and Linux seems to be FreeBSD uses * where Linux uses x:
FreeBSD
# $FreeBSD$
#
wheel:*:0:root,yonas,kanidm
daemon:*:1:
kmem:*:2:
sys:*:3:
tty:*:4:
operator:*:5:root
Linux
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
tty:x:5:
disk:x:6:
The issue is actually the comments lines 😄 Raised a PR to handle it.
@yaleman Thanks!
Fixed in 1.7