From e56cbefabfbdeb6d12d38adcc998b6b540a3b874 Mon Sep 17 00:00:00 2001 From: mo khan Date: Tue, 1 Oct 2019 19:37:00 -0600 Subject: Find entries missing a password --- README.md | 7 +++++++ bin/no-password | 3 +++ 2 files changed, 10 insertions(+) create mode 100755 bin/no-password diff --git a/README.md b/README.md index d6fbbf0..4889909 100644 --- a/README.md +++ b/README.md @@ -1139,6 +1139,13 @@ Rootly Powers and Processes ``` b. Find entries that have that have no password (needs /etc/shadow). + + ```bash + #!/bin/bash + + grep -E '^\w+::.*' /etc/passwd + ``` + c. Find any sets of entries that have duplicate UIDs. d. Find entries that have duplicate login names. e. Find entries that have no expiration date (needs /etc/shadow). diff --git a/bin/no-password b/bin/no-password new file mode 100755 index 0000000..7ed2797 --- /dev/null +++ b/bin/no-password @@ -0,0 +1,3 @@ +#!/bin/bash + +grep -E '^\w+::.*' /etc/passwd -- cgit v1.2.3