diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -1161,3 +1161,18 @@ Rootly Powers and Processes ``` e. Find entries that have no expiration date (needs /etc/shadow). + + ```bash + #!/bin/bash + + cd "..$(dirname $PWD)" + + for i in `cat /etc/shadow`; do + login=$(echo $i | cut -d: -f1) + expiration=$(echo $i | cut -d: -f8) + + if [ -z "$expiration" ]; then + echo $login: does not have an expiration date + fi + done + ``` |
