support/scripts/mkusers: fix UID/GID confusion
Commit41ea61d59c
(support/scripts/mkusers: allow option for system uid/gid) confused GID and UID variables: the GID limits were used to create UIDs. Fix that. Note that this fixes a shellcheck error; although there are many more shellcheck errors, these fixes are semantically a bug that need to be fixed separately from the coding style issues reported by shellcheck. Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Cc: Norbert Lange <nolange79@gmail.com> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> (cherry picked from commitebbcf5a0a7
) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
3c2463c9cf
commit
9698702615
@ -324,9 +324,9 @@ add_one_user() {
|
|||||||
|
|
||||||
# Generate a new UID if needed
|
# Generate a new UID if needed
|
||||||
if [ ${uid} -eq ${AUTO_USER_ID} ]; then
|
if [ ${uid} -eq ${AUTO_USER_ID} ]; then
|
||||||
uid="$( generate_uid "${username}" $FIRST_USER_GID $LAST_USER_GID )"
|
uid="$( generate_uid "${username}" $FIRST_USER_UID $LAST_USER_UID )"
|
||||||
elif [ ${uid} -eq ${AUTO_SYSTEM_ID} ]; then
|
elif [ ${uid} -eq ${AUTO_SYSTEM_ID} ]; then
|
||||||
uid="$( generate_uid "${username}" $FIRST_SYSTEM_GID $LAST_SYSTEM_GID )"
|
uid="$( generate_uid "${username}" $FIRST_SYSTEM_UID $LAST_SYSTEM_UID )"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove any previous instance of this user
|
# Remove any previous instance of this user
|
||||||
|
Loading…
Reference in New Issue
Block a user