summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2019-10-01 19:37:00 -0600
committermo khan <mo.khan@gmail.com>2019-10-01 19:37:00 -0600
commite56cbefabfbdeb6d12d38adcc998b6b540a3b874 (patch)
tree1eb577cb7c115affe0d69152a8eb22b1315d758e
parenta89061ab6bdc2a6941aae2745b58f4f0482e1498 (diff)
Find entries missing a password
-rw-r--r--README.md7
-rwxr-xr-xbin/no-password3
2 files changed, 10 insertions, 0 deletions
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