diff --git a/sysuser-tools.changes b/sysuser-tools.changes index c3ba692..e576b9a 100644 --- a/sysuser-tools.changes +++ b/sysuser-tools.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Sat Aug 3 06:09:03 UTC 2024 - Thorsten Kukuk + +- Disable UID:GID support for now + +------------------------------------------------------------------- +Fri Aug 2 12:18:53 UTC 2024 - Thorsten Kukuk + +- UID:GID: don't create group with GID if it does not exist + ------------------------------------------------------------------- Fri Aug 2 08:24:06 UTC 2024 - Thorsten Kukuk diff --git a/sysusers2shadow.sh b/sysusers2shadow.sh index 9a74f6a..ee7a5fd 100644 --- a/sysusers2shadow.sh +++ b/sysusers2shadow.sh @@ -53,9 +53,11 @@ else fi # Split user and Group id - userGrouArr=(${2//:/ }) - USER_ID=${userGrouArr[0]} - GROUP_ID=${userGrouArr[1]} + #userGrouArr=(${2//:/ }) + #USER_ID=${userGrouArr[0]} + #GROUP_ID=${userGrouArr[1]} + USER_ID=$2 + GROUP_ID="" if [ -n "$USER_ID" ] && [ "$USER_ID" != "-" ]; then ARGUMENTS="-u $USER_ID $ARGUMENTS" @@ -75,15 +77,6 @@ else if [ -x /usr/sbin/useradd ]; then if [ -n "$GROUP_ID" ] && [ "$GROUP_ID" != "-" ]; then - # the group needs to exist if we want to use it for useradd - if ! /usr/bin/getent group "$GROUP_ID" >> /dev/null; then - if [ -x /usr/sbin/groupadd ]; then - run /usr/sbin/groupadd -g "$GROUP_ID" "$1" - else - echo "ERROR: groupadd not found!" - exit 1 - fi - fi ARGUMENTS="-g $GROUP_ID $ARGUMENTS" else # this is useradd/shadow specific