From b7e8d5af06ee840cc48217ca4629cf28aeeb3c50 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 17:35:19 +0200 Subject: Adding debian version 252.22-1~deb12u1. Signed-off-by: Daniel Baumann --- debian/extra/make-sysusers-basic | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 debian/extra/make-sysusers-basic (limited to 'debian/extra/make-sysusers-basic') diff --git a/debian/extra/make-sysusers-basic b/debian/extra/make-sysusers-basic new file mode 100755 index 0000000..8ff1b15 --- /dev/null +++ b/debian/extra/make-sysusers-basic @@ -0,0 +1,18 @@ +#!/bin/sh +# generate a sysusers.d(5) file from Debian's static master passwd/group files +set -eu + +echo '# generated from /usr/share/base-passwd/{passwd,group}.master' + +# only take groups whose name+gid != the corresponding user in passwd.master +export IFS=: +while read name _ id _; do + if ! grep -q "^$name:\*:$id:$id:" /usr/share/base-passwd/passwd.master; then + printf "g %-10s %-5s -\n" $name $id + fi +done < /usr/share/base-passwd/group.master + +echo + +# treat "nobody:nogroup" specially: same ID, but different name, so prevent creating a "nobody" group +awk -F: '{ i = ($3 == $4 && $4 != 65534) ? $3 : $3":"$4; printf("u %-10s %-7s - %-20s %s\n", $1,i,$6,$7) }' < /usr/share/base-passwd/passwd.master -- cgit v1.2.3