-
-
Save jimnanney/4136406 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| def delete_ssh_user(username) | |
| `rm -rf /Users/#{username}` | |
| `dseditgroup -o edit -d #{username} -t user com.apple.access_ssh` | |
| `dscl . -delete /Users/#{username}` | |
| end | |
| username = ARGV.shift | |
| delete_ssh_user username |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Part of the Pairing scripts used by Evan Light
http://evan.tiggerpalace.com/articles/2011/10/17/some-people-call-me-the-remote-pairing-guy-/