Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- set -e
- echo "This tool will create a new sudo user."
- echo "================================================"
- echo ""
- echo "Choose username:"
- read NEWUSER
- echo "Choose password:"
- read PASSWORD
- echo "Creating user, setting 'defaultpass', adding to sudoers"
- useradd $NEWUSER
- echo $NEWUSER:$PASSWORD | /usr/sbin/chpasswd
- echo "$NEWUSER ALL=(ALL:ALL) ALL" >> /etc/sudoers
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement