mirror of
https://github.com/aquasecurity/linux-bench.git
synced 2025-02-23 14:45:33 +01:00
10 lines
254 B
Bash
10 lines
254 B
Bash
![]() |
#!/bin/bash
|
||
|
|
||
|
cut -f3 -d":" /etc/passwd | sort -n | uniq -c | while read x ; do
|
||
|
[ -z "$x" ] && break
|
||
|
set - $x
|
||
|
if [ $1 -gt 1 ]; then
|
||
|
users=$(awk -F: '($3 == n) { print $1 }' n=$2 /etc/passwd | xargs)
|
||
|
echo "Duplicate UID ($2): $users"
|
||
|
fi
|
||
|
done
|