mirror of
https://github.com/aquasecurity/linux-bench.git
synced 2025-02-23 06:35:33 +01:00
8 lines
No EOL
224 B
Bash
8 lines
No EOL
224 B
Bash
#!/bin/bash
|
|
|
|
for i in $(cut -s -d: -f4 /etc/passwd | sort -u ); do
|
|
grep -q -P "^.*?:[^:]*:$i:" /etc/group
|
|
if [ $? -ne 0 ]; then
|
|
echo "Group $i is referenced by /etc/passwd but does not exist in /etc/group"
|
|
fi
|
|
done |