mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-30 09:14:18 +02:00
NIS improvement for test
This commit is contained in:
parent
7cb9e364c7
commit
401bf26c91
@ -31,11 +31,12 @@
|
|||||||
|
|
||||||
# Test : AUTH-9204
|
# Test : AUTH-9204
|
||||||
# Description : Check users with UID zero (0)
|
# Description : Check users with UID zero (0)
|
||||||
|
# Notes : Ignores :0: in file if match is in NIS related line
|
||||||
Register --test-no AUTH-9204 --weight L --network NO --description "Check users with an UID of zero"
|
Register --test-no AUTH-9204 --weight L --network NO --description "Check users with an UID of zero"
|
||||||
if [ ${SKIPTEST} -eq 0 ]; then
|
if [ ${SKIPTEST} -eq 0 ]; then
|
||||||
# Search accounts with UID 0
|
# Search accounts with UID 0
|
||||||
logtext "Test: Searching accounts with UID 0"
|
logtext "Test: Searching accounts with UID 0"
|
||||||
FIND=`grep ':0:' /etc/passwd | egrep -v '^#|^root:|^:0:0:::' | cut -d ":" -f1,3 | grep ':0'`
|
FIND=`grep ':0:' /etc/passwd | egrep -v '^#|^root:|^(\+:\*)?:0:0:::' | cut -d ":" -f1,3 | grep ':0'`
|
||||||
if [ ! "${FIND}" = "" ]; then
|
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"
|
logtext "Result: Found more than one administrator accounts"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user