Created
September 21, 2015 11:58
-
-
Save robmiller/b40b4feec91940c033c7 to your computer and use it in GitHub Desktop.
Delete unwanted users from your system (prompts before each one)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for user in $(cat /etc/passwd | cut -d: -f1); do; read "DELETE?Delete $user? "; [[ "$DELETE" =~ ^[Yy]$ ]] && echo "Removing $user"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment