Accepting request 1191330 from home:kukuk:cleanup
- Disable UID:GID support for now - UID:GID: don't create group with GID if it does not exist OBS-URL: https://build.opensuse.org/request/show/1191330 OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=58
This commit is contained in:
parent
6b5a150fa9
commit
008c2cc775
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 3 06:09:03 UTC 2024 - Thorsten Kukuk <kukuk@suse.com>
|
||||
|
||||
- Disable UID:GID support for now
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 2 12:18:53 UTC 2024 - Thorsten Kukuk <kukuk@suse.com>
|
||||
|
||||
- UID:GID: don't create group with GID if it does not exist
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 2 08:24:06 UTC 2024 - Thorsten Kukuk <kukuk@suse.com>
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user