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:
Diffstat (limited to 'include/tests_authentication')
-rw-r--r--include/tests_authentication62
1 files changed, 31 insertions, 31 deletions
diff --git a/include/tests_authentication b/include/tests_authentication
index 9e4d36db..abfd1c9d 100644
--- a/include/tests_authentication
+++ b/include/tests_authentication
@@ -37,7 +37,7 @@
logtext "Test: Searching accounts with UID 0"
FIND=`grep ':0:' /etc/passwd | egrep -v '^#|^root:|^:0:0:::' | cut -d ":" -f1,3 | grep ':0'`
if [ ! "${FIND}" = "" ]; then
- Display --indent 2 --text "- Search administrator accounts..." --result WARNING --color RED
+ Display --indent 2 --text "- Search administrator accounts" --result WARNING --color RED
logtext "Result: Found more than one administrator accounts"
ReportWarning "${TEST_NO}" "H" "Multiple users with UID 0 found in passwd file"
for I in ${FIND}; do
@@ -49,7 +49,7 @@
fi
done
else
- Display --indent 2 --text "- Search administrator accounts..." --result OK --color GREEN
+ Display --indent 2 --text "- Search administrator accounts" --result OK --color GREEN
logtext "Result: No accounts found with UID 0 other than root."
fi
fi
@@ -72,16 +72,16 @@
if [ -f ${PASSWD_FILE} ]; then
FIND=`cat ${PASSWD_FILE} | grep -v '^#' | cut -d ':' -f3 | uniq -d`
if [ "${FIND}" = "" ]; then
- Display --indent 2 --text "- Checking for non-unique UIDs... " --result OK --color GREEN
+ Display --indent 2 --text "- Checking for non-unique UIDs" --result OK --color GREEN
logtext "Result: all accounts found in ${PASSWD_FILE} are unique"
else
- Display --indent 2 --text "- Checking for non-unique UIDs... " --result WARNING --color RED
+ Display --indent 2 --text "- Checking for non-unique UIDs" --result WARNING --color RED
logtext "Result: found multiple accounts with same UID"
logtext "Output (non-unique UIDs): ${FIND}"
ReportWarning ${TEST_NO} "Multiple accounts found with same UID"
fi
else
- Display --indent 2 --text "- Checking UIDs... " --result SKIPPED --color WHITE
+ Display --indent 2 --text "- Checking UIDs" --result SKIPPED --color WHITE
logtext "Result: test skipped, ${PASSWD_FILE} file not available"
fi
logtext "Remarks: ${USER_PASSWD_DOUBLEUID_AUDIT_TEXT}"
@@ -94,15 +94,15 @@
if [ -f /usr/sbin/chkgrp ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
Register --test-no AUTH-9212 --preqs-met ${PREQS_MET} --weight L --network NO --description "Test group file"
if [ ${SKIPTEST} -eq 0 ]; then
- Display --indent 2 --text "- Checking chkgrp tool..." --result FOUND --color GREEN
+ Display --indent 2 --text "- Checking chkgrp tool" --result FOUND --color GREEN
logtext "Result: /usr/sbin/chkgrp binary found. Using this to perform next test(s)."
- logtext "Test: Testing consistency of /etc/group file... "
+ logtext "Test: Testing consistency of /etc/group file"
FIND=`/usr/sbin/chkgrp | grep -v 'is fine'`
if [ "${FIND}" = "" ]; then
- Display --indent 4 --text "- Checking consistency of /etc/group file..." --result OK --color GREEN
+ Display --indent 4 --text "- Checking consistency of /etc/group file" --result OK --color GREEN
logtext "Result: chkgrp test performed, Group file seems to be ok."
else
- Display --indent 4 --text "- Checking consistency of /etc/group file..." --result WARNING --color RED
+ Display --indent 4 --text "- Checking consistency of /etc/group file" --result WARNING --color RED
logtext "Result: chkgrp found some errors. Run the tool manually to see details."
logtext "chkgrp output: ${FIND}"
ReportWarning ${TEST_NO} "M" "chkgrp reported inconsistencies in /etc/group file"
@@ -118,7 +118,7 @@
if [ ${SKIPTEST} -eq 0 ]; then
# Test : run grpck to test group files (most likely /etc/group and shadow group files)
# Expected result : 0 (exit code)
- logtext "Test: Checking for grpck binary..."
+ logtext "Test: Checking for grpck binary"
if [ "${OS}" = "Linux" ]; then
# Read only mode
@@ -136,10 +136,10 @@
# Check exit-code
if [ "${FIND}" = "0" ]; then
- Display --indent 2 --text "- Checking consistency of group files (grpck)..." --result OK --color GREEN
+ Display --indent 2 --text "- Checking consistency of group files (grpck)" --result OK --color GREEN
logtext "Result: grpck binary didn't find any errors in the group files"
else
- Display --indent 2 --text "- Checking consistency of group files (grpck)..." --result WARNING --color RED
+ Display --indent 2 --text "- Checking consistency of group files (grpck)" --result WARNING --color RED
ReportWarning ${TEST_NO} "M" "grpck binary found errors in one or more group files"
ReportSuggestion ${TEST_NO} "Run grpck manually and check your group files"
fi
@@ -158,9 +158,9 @@
# Check for all shells, except: (/usr)/sbin/nologin /nonexistent
FIND=`cat /etc/master.passwd | grep "[a-z]:\*:" | egrep -v '^#|/sbin/nologin|/usr/sbin/nologin|/nonexistent' | sed 's/ /!space!/g'`
if [ "${FIND}" = "" ]; then
- Display --indent 2 --text "- Checking login shells..." --result OK --color GREEN
+ Display --indent 2 --text "- Checking login shells" --result OK --color GREEN
else
- Display --indent 2 --text "- Checking login shells..." --result WARNING --color RED
+ Display --indent 2 --text "- Checking login shells" --result WARNING --color RED
for I in ${FIND}; do
I=`echo ${I} | sed 's/!space!/ /g'`
J=`echo ${I} | awk -F: '{ print $10 }'`
@@ -183,7 +183,7 @@
fi
fi
else
- Display --indent 2 --text "- Checking login shells..." --result SKIPPED --color WHITE
+ Display --indent 2 --text "- Checking login shells" --result SKIPPED --color WHITE
logtext "Result: No /etc/master.passwd file found"
fi
fi
@@ -197,10 +197,10 @@
logtext "Test: Checking for non unique group ID's in /etc/group"
FIND=`cat /etc/group | grep -v '^#' | grep -v '^$' | awk -F: '{ print $3 }' | sort | uniq -d`
if [ "${FIND}" = "" ]; then
- Display --indent 2 --text "- Checking non unique group ID's..." --result OK --color GREEN
+ Display --indent 2 --text "- Checking non unique group ID's" --result OK --color GREEN
logtext "Result: All group ID's are unique"
else
- Display --indent 2 --text "- Checking non unique group ID's..." --result WARNING --color RED
+ Display --indent 2 --text "- Checking non unique group ID's" --result WARNING --color RED
logtext "Result: Found the same group ID multiple times"
logtext "Output: ${FIND}"
ReportWarning ${TEST_NO} "H" "Found multiple groups with same group ID"
@@ -218,10 +218,10 @@
logtext "Test: Checking for non unique group names in /etc/group"
FIND=`cat /etc/group | grep -v '^#' | grep -v '^$' | awk -F: '{ print $1 }' | sort | uniq -d`
if [ "${FIND}" = "" ]; then
- Display --indent 2 --text "- Checking non unique group names..." --result OK --color GREEN
+ Display --indent 2 --text "- Checking non unique group names" --result OK --color GREEN
logtext "Result: All group names are unique"
else
- Display --indent 2 --text "- Checking non unique group names..." --result WARNING --color WARNING
+ Display --indent 2 --text "- Checking non unique group names" --result WARNING --color WARNING
logtext "Result: Found the same group name multiple times"
logtext "Output: ${FIND}"
ReportWarning ${TEST_NO} "M" "Found inconsistencies in group file (multiple occurences of a single group)"
@@ -239,10 +239,10 @@
logtext "Test: Checking password file consistency (pwck)"
FIND=`/usr/sbin/pwck -q -r 2> /dev/null; echo $?`
if [ "${FIND}" = "0" ]; then
- Display --indent 2 --text "- Checking password file consistency..." --result OK --color GREEN
+ Display --indent 2 --text "- Checking password file consistency" --result OK --color GREEN
logtext "Result: pwck check didn't find any problems"
else
- Display --indent 2 --text "- Checking password file consistency..." --result WARNING --color RED
+ Display --indent 2 --text "- Checking password file consistency" --result WARNING --color RED
logtext "Result: pwck found one or more errors/warnings in the password file."
ReportWarning ${TEST_NO} "M" "pwck found one or more errors/warnings in the password file"
ReportSuggestion ${TEST_NO} "Run pwck manually and correct found issues."
@@ -260,10 +260,10 @@
# logtext "Test: Checking password file consistency (usrck)"
# FIND=`/usr/bin/usrck -n ALL 2>; echo $?`
# if [ "${FIND}" = "0" ]; then
-# Display --indent 2 --text "- Checking password file consistency..." --result OK --color GREEN
+# Display --indent 2 --text "- Checking password file consistency" --result OK --color GREEN
# logtext "Result: usrck finished didn't find problems"
# else
-# Display --indent 2 --text "- Checking password file consistency..." --result WARNING --color RED
+# Display --indent 2 --text "- Checking password file consistency" --result WARNING --color RED
# logtext "Result: usrck found one or more errors/warnings in the password file."
# ReportWarning ${TEST_NO} "M" "usrck found one or more errors/warnings in the password file"
# ReportSuggestion ${TEST_NO} "Run usrck manually and correct found issues."
@@ -280,10 +280,10 @@
logtext "Test: Checking password file consistency (pwck)"
FIND=`/usr/sbin/pwck 2> /dev/null; echo $?`
if [ "${FIND}" = "0" ]; then
- Display --indent 2 --text "- Checking password file consistency..." --result OK --color GREEN
+ Display --indent 2 --text "- Checking password file consistency" --result OK --color GREEN
logtext "Result: pwck finished didn't find problems"
else
- Display --indent 2 --text "- Checking password file consistency..." --result WARNING --color RED
+ Display --indent 2 --text "- Checking password file consistency" --result WARNING --color RED
logtext "Result: pwck found one or more errors/warnings in the password file."
ReportWarning ${TEST_NO} "M" "pwck found one or more errors/warnings in the password file"
ReportSuggestion ${TEST_NO} "Run pwck manually and correct found issues."
@@ -301,10 +301,10 @@
# logtext "Test: Checking password file consistency (pwck)"
# FIND=`/usr/sbin/pwck 2> /dev/null; echo $?`
# if [ "${FIND}" = "0" ]; then
-# Display --indent 2 --text "- Checking password file consistency..." --result OK --color GREEN
+# Display --indent 2 --text "- Checking password file consistency" --result OK --color GREEN
# logtext "Result: pwck finished didn't find problems"
# else
-# Display --indent 2 --text "- Checking password file consistency..." --result WARNING --color RED
+# Display --indent 2 --text "- Checking password file consistency" --result WARNING --color RED
# logtext "Result: pwck found one or more errors/warnings in the password file."
# ReportWarning ${TEST_NO} "M" "pwck found one or more errors/warnings in the password file"
# ReportSuggestion ${TEST_NO} "Run pwck manually and correct found issues."
@@ -321,10 +321,10 @@
# logtext "Test: Checking group file consistency (grpck)"
# FIND=`/usr/sbin/grpck 2> /dev/null; echo $?`
# if [ "${FIND}" = "0" ]; then
-# Display --indent 2 --text "- Checking group file consistency..." --result OK --color GREEN
+# Display --indent 2 --text "- Checking group file consistency" --result OK --color GREEN
# logtext "Result: grpck finished didn't find problems"
# else
-# Display --indent 2 --text "- Checking group file consistency..." --result WARNING --color RED
+# Display --indent 2 --text "- Checking group file consistency" --result WARNING --color RED
# logtext "Result: grpck found one or more errors/warnings in the group file."
# ReportWarning ${TEST_NO} "M" "grpck found one or more errors/warnings in the group file"
# ReportSuggestion ${TEST_NO} "Run grpck manually and correct found issues."
@@ -340,7 +340,7 @@
# OpenBSD/NetBSD: unknown
Register --test-no AUTH-9234 --os Linux --weight L --network NO --description "Query user accounts"
if [ ${SKIPTEST} -eq 0 ]; then
- logtext "Test: Read real system users (including root user) from /etc/passwd..."
+ logtext "Test: Read real system users (including root user) from /etc/passwd"
FIND=""
if [ "${OS}" = "FreeBSD" ]; then
@@ -358,7 +358,7 @@
FIND=`awk -F: '($3 > 100 && $3 != 60001 && $3 != 65534) || ($3 == 0) { print $1","$3 }' /etc/passwd`
fi
- Display --indent 2 --text "- Query system users (non daemons)..." --result DONE --color GREEN
+ Display --indent 2 --text "- Query system users (non daemons)" --result DONE --color GREEN
# Check if we got any output
if [ "${FIND}" = "" ]; then
Display --indent 4 --text "Result: No users found/unknown result"