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:
-rw-r--r--include/tests_authentication2
-rw-r--r--include/tests_nameservices2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/tests_authentication b/include/tests_authentication
index e69f3aaa..06d732f6 100644
--- a/include/tests_authentication
+++ b/include/tests_authentication
@@ -69,7 +69,7 @@
fi
# Check password file
if [ -f ${PASSWD_FILE} ]; then
- FIND=`cat ${PASSWD_FILE} | grep -v '^#' | cut -d ':' -f3 | uniq -d`
+ FIND=`cat ${PASSWD_FILE} | grep -v '^#' | cut -d ':' -f3 | sort | uniq -d`
if [ "${FIND}" = "" ]; then
Display --indent 2 --text "- Checking for non-unique UIDs" --result OK --color GREEN
logtext "Result: all accounts found in ${PASSWD_FILE} are unique"
diff --git a/include/tests_nameservices b/include/tests_nameservices
index 9365c9f6..06aa98c3 100644
--- a/include/tests_nameservices
+++ b/include/tests_nameservices
@@ -588,7 +588,7 @@
if [ ${SKIPTEST} -eq 0 ]; then
logtext "Test: check duplicate line in /etc/hosts"
if [ -f /etc/hosts ]; then
- sFIND=`cat /etc/hosts | egrep -v '^(#|$)' | uniq -d`
+ sFIND=`cat /etc/hosts | egrep -v '^(#|$)' | sort | uniq -d`
if [ "${sFIND}" = "" ]; then
logtext "Result: OK, no duplicate lines found"
Display --indent 4 --text "- Checking /etc/hosts (duplicates)" --result OK --color GREEN