From 357bc47355e519a212e2f01e1c8114653a24e38b Mon Sep 17 00:00:00 2001 From: savetree Date: Fri, 31 Jan 2025 11:29:10 +0100 Subject: [PATCH] Update tests_authentication Command returns toor:0 instead of toor --- include/tests_authentication | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/tests_authentication b/include/tests_authentication index 9a33cea1..8e0448f0 100644 --- a/include/tests_authentication +++ b/include/tests_authentication @@ -41,9 +41,9 @@ LogText "Test: Searching accounts with UID 0" # Check if device is a QNAP, as the root user is called admin, and not root if [ ${QNAP_DEVICE} -eq 1 ]; then - FIND=$(${GREPBINARY} ':0:' ${ROOTDIR}etc/passwd | ${GREPBINARY} -E -v '^#|^admin:|^(\+:\*)?:0:0:::' | ${CUTBINARY} -d ":" -f1,3 | ${GREPBINARY} ':0') + FIND=$(${GREPBINARY} ':0:' ${ROOTDIR}etc/passwd | ${GREPBINARY} -E -v '^#|^admin:|^(\+:\*)?:0:0:::' | ${CUTBINARY} -d ":" -f1,3 | ${GREPBINARY} ':0' | ${CUTBINARY} -d ":" -f1) else - FIND=$(${GREPBINARY} ':0:' ${ROOTDIR}etc/passwd | ${GREPBINARY} -E -v '^#|^root:|^(\+:\*)?:0:0:::' | ${CUTBINARY} -d ":" -f1,3 | ${GREPBINARY} ':0') + FIND=$(${GREPBINARY} ':0:' ${ROOTDIR}etc/passwd | ${GREPBINARY} -E -v '^#|^root:|^(\+:\*)?:0:0:::' | ${CUTBINARY} -d ":" -f1,3 | ${GREPBINARY} ':0' | ${CUTBINARY} -d ":" -f1) fi if [ -n "${FIND}" ]; then Display --indent 2 --text "- Administrator accounts" --result "${STATUS_WARNING}" --color RED