Skip to content

Commit e522840

Browse files
authored
Merge pull request #180 from linuxserver/noble-usermod
2 parents c852467 + 46c4683 commit e522840

File tree

1 file changed

+7
-2
lines changed
  • root/etc/s6-overlay/s6-rc.d/init-adduser

1 file changed

+7
-2
lines changed

root/etc/s6-overlay/s6-rc.d/init-adduser/run

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@ PUID=${PUID:-911}
55
PGID=${PGID:-911}
66

77
if [[ -z ${LSIO_READ_ONLY_FS} ]] && [[ -z ${LSIO_NON_ROOT_USER} ]]; then
8-
groupmod -o -g "$PGID" abc
9-
usermod -o -u "$PUID" abc
8+
USERHOME=$(grep abc /etc/passwd | cut -d ":" -f6)
9+
usermod -d "/root" abc
10+
11+
groupmod -o -g "${PGID}" abc
12+
usermod -o -u "${PUID}" abc
13+
14+
usermod -d "${USERHOME}" abc
1015
fi
1116

1217
if { [[ -z ${LSIO_READ_ONLY_FS} ]] && [[ -z ${LSIO_NON_ROOT_USER} ]]; } || [[ ! ${LSIO_FIRST_PARTY} = "true" ]]; then

0 commit comments

Comments
 (0)