From 9fd52adacf0909081ffe58e75c95935a75a8d164 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Sun, 21 Apr 2024 20:49:14 +0200 Subject: [PATCH] mkosi: Backport Fedora basic users/groups sysusers files to CentOS CentOS does not ship these sysusers dropins which set up basic system users and groups. Until we can move to CentOS Stream 10, let's add the dropins ourselves to make sure the base system users/groups are available on CentOS. --- .../usr/lib/sysusers.d/20-setup-groups.conf | 24 +++++++++++++++++++ .../usr/lib/sysusers.d/20-setup-users.conf | 13 ++++++++++ 2 files changed, 37 insertions(+) create mode 100644 mkosi.images/system/mkosi.conf.d/10-centos/mkosi.extra/usr/lib/sysusers.d/20-setup-groups.conf create mode 100644 mkosi.images/system/mkosi.conf.d/10-centos/mkosi.extra/usr/lib/sysusers.d/20-setup-users.conf diff --git a/mkosi.images/system/mkosi.conf.d/10-centos/mkosi.extra/usr/lib/sysusers.d/20-setup-groups.conf b/mkosi.images/system/mkosi.conf.d/10-centos/mkosi.extra/usr/lib/sysusers.d/20-setup-groups.conf new file mode 100644 index 0000000000..d69ff91cc3 --- /dev/null +++ b/mkosi.images/system/mkosi.conf.d/10-centos/mkosi.extra/usr/lib/sysusers.d/20-setup-groups.conf @@ -0,0 +1,24 @@ +g root 0 +g bin 1 +g daemon 2 +g sys 3 +g adm 4 +g tty 5 +g disk 6 +g lp 7 +g mem 8 +g kmem 9 +g wheel 10 +g cdrom 11 +g mail 12 +g man 15 +g dialout 18 +g floppy 19 +g games 20 +g tape 33 +g video 39 +g ftp 50 +g lock 54 +g audio 63 +g users 100 +g nobody 65534 diff --git a/mkosi.images/system/mkosi.conf.d/10-centos/mkosi.extra/usr/lib/sysusers.d/20-setup-users.conf b/mkosi.images/system/mkosi.conf.d/10-centos/mkosi.extra/usr/lib/sysusers.d/20-setup-users.conf new file mode 100644 index 0000000000..bea0ab3447 --- /dev/null +++ b/mkosi.images/system/mkosi.conf.d/10-centos/mkosi.extra/usr/lib/sysusers.d/20-setup-users.conf @@ -0,0 +1,13 @@ +u root 0:0 "Super User" /root /bin/bash +u bin 1:1 "bin" /bin - +u daemon 2:2 "daemon" /sbin - +u adm 3:4 "adm" /var/adm - +u lp 4:7 "lp" /var/spool/lpd - +u sync 5:0 "sync" /sbin /bin/sync +u shutdown 6:0 "shutdown" /sbin /sbin/shutdown +u halt 7:0 "halt" /sbin /sbin/halt +u mail 8:12 "mail" /var/spool/mail - +u operator 11:0 "operator" /root - +u games 12:100 "games" /usr/games - +u ftp 14:50 "FTP User" /var/ftp - +u nobody 65534:65534 "Kernel Overflow User" - - -- 2.25.1