Ana Guerrero 2025-01-29 15:10:06 +00:00 committed by Git OBS Bridge
commit c0a91f7503
3 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jan 27 16:41:20 UTC 2025 - Thorsten Kukuk <kukuk@suse.com>
- Add support for "u!" with useradd (shadow). busybox has no
support for account/password expiration
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Dec 11 11:05:25 UTC 2024 - Thorsten Kukuk <kukuk@suse.com> Wed Dec 11 11:05:25 UTC 2024 - Thorsten Kukuk <kukuk@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package sysuser-tools # spec file for package sysuser-tools
# #
# Copyright (c) 2024 SUSE LLC # Copyright (c) 2025 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed

View File

@ -46,7 +46,11 @@ else
fi fi
fi fi
;; ;;
u) u|u\!)
if [ "${1}" = "u!" ]; then
EXPIRE_DATE="1970-01-02"
fi
shift shift
ARGUMENTS="$1" ARGUMENTS="$1"
@ -89,6 +93,9 @@ else
fi fi
run /usr/sbin/useradd -r -c "$3" -d "${homedir}" $ARGUMENTS run /usr/sbin/useradd -r -c "$3" -d "${homedir}" $ARGUMENTS
if [ -n "$EXPIRE_DATE" ]; then
TZ=UTC chage -E "$EXPIRE_DATE" "$1"
fi
elif [ -x "$busybox" ]; then elif [ -x "$busybox" ]; then
if [ -n "$GROUP_ID" ] && [ "$GROUP_ID" != "-" ]; then if [ -n "$GROUP_ID" ] && [ "$GROUP_ID" != "-" ]; then
run $busybox adduser -S -H -g "$3" -G "GROUP_ID" -h "${homedir}" $ARGUMENTS run $busybox adduser -S -H -g "$3" -G "GROUP_ID" -h "${homedir}" $ARGUMENTS