Skip to content

Instantly share code, notes, and snippets.

@elight
Created October 17, 2011 18:23
Show Gist options
  • Save elight/1293356 to your computer and use it in GitHub Desktop.
Save elight/1293356 to your computer and use it in GitHub Desktop.
#!/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment