Bash Create User Script

This is a very simple script to create users and set them up in a userdir enabled Apache environ.

#!/bin/bash
if [ "$#" -ne 1 ]; then
	echo "Usage: ./mkacct.sh <username>"
	exit;
else
	sudo useradd -m -s '/bin/bash' $1
	sudo chmod 711 "/home/$1"
	sudo mkdir "/home/$1/public_html"
	sudo chmod 755 "/home/$1/public_html"
	sudo chown "$1.$1" /home/$1/public_html
	sudo passwd $1
fi;