Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2019-06-24 14:43:19 +0300
committerGitHub <noreply@github.com>2019-06-24 14:43:19 +0300
commitf6f7a69857c59ca0c02e7c8bcab53784388e89f2 (patch)
treed27e481bb9d77506ea18dd58f24e918bde7a8038
parent6cd903e0792ad712f0d84c85eda5b1f9ba4aa8e0 (diff)
parent10b8da1c6a50ccd0598324dfa108c4a6ec46c25a (diff)
Merge pull request #713 from bcs016/patch-1
Update tests_authentication - AUTH-9402
-rw-r--r--include/tests_authentication7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/tests_authentication b/include/tests_authentication
index 7b8bacda..6c867da6 100644
--- a/include/tests_authentication
+++ b/include/tests_authentication
@@ -40,7 +40,12 @@
if [ ${SKIPTEST} -eq 0 ]; then
# Search accounts with UID 0
LogText "Test: Searching accounts with UID 0"
- FIND=$(${GREPBINARY} ':0:' ${ROOTDIR}etc/passwd | ${EGREPBINARY} -v '^#|^root:|^(\+:\*)?:0:0:::' | ${CUTBINARY} -d ":" -f1,3 | ${GREPBINARY} ':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 | ${EGREPBINARY} -v '^#|^admin:|^(\+:\*)?:0:0:::' | ${CUTBINARY} -d ":" -f1,3 | ${GREPBINARY} ':0')
+ else
+ FIND=$(${GREPBINARY} ':0:' ${ROOTDIR}etc/passwd | ${EGREPBINARY} -v '^#|^root:|^(\+:\*)?:0:0:::' | ${CUTBINARY} -d ":" -f1,3 | ${GREPBINARY} ':0')
+ fi
if [ ! -z "${FIND}" ]; then
Display --indent 2 --text "- Administrator accounts" --result "${STATUS_WARNING}" --color RED
LogText "Result: Found more than one administrator accounts"