Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions unix-privesc-check
Original file line number Diff line number Diff line change
Expand Up @@ -778,14 +778,14 @@ fi
if [ -r "$SHADOW" ]; then
echo "Checking for accounts with no passwords"
if [ "$OS" = "linux" ]; then
passwd -S -a | while read LINE
while read LINE
do
USER=`echo "$LINE" | awk '{print $1}'`
STATUS=`echo "$LINE" | awk '{print $2}'`
USERNAME=`echo "$LINE" | cut -f 1 -d ":"`
STATUS=`passwd -S $USERNAME | awk '{print $2}'`
if [ "$STATUS" = "NP" ]; then
echo "[UPC015] WARNING: User $USER doesn't have a password"
echo "[UPC015] WARNING: User $USERNAME doesn't have a password"
fi
done
done < $SHADOW
elif [ "$OS" = "solaris" ]; then
passwd -s -a | while read LINE
do
Expand Down