mirror of
https://github.com/unraid/webgui.git
synced 2026-02-19 15:39:32 -06:00
passwd file handling correction
This commit is contained in:
@@ -222,7 +222,7 @@ if [[ -r /boot/config/passwd ]]; then
|
||||
if [[ $USERNAME == root ]]; then
|
||||
/bin/sed -i "s|^root:.*|root:x:0:0:$COMMENT:/root:/bin/bash|" /etc/passwd
|
||||
fi
|
||||
if (( USERID >= 1000 )); then
|
||||
if (( USERID >= 1000 )) && ! grep -q ":$USERID:" /etc/passwd ; then
|
||||
/bin/echo "$USERNAME:x:$USERID:$GROUPID:$COMMENT:/:/bin/false" >> /etc/passwd
|
||||
fi
|
||||
done </boot/config/passwd
|
||||
|
||||
Reference in New Issue
Block a user