I'm trying to add a user in Ubuntu Linux 11.04 with a single useradd directive.
I found something similar here but I can't seem to figure it out completely: Useradd using crypt password generation
Let's say my username is ohill and my password is justpass, what would the command line directive be exactly? Here is what I have so far that I borrowed from the above link.
useradd -p $(perl -e 'print crypt("justpass", "aa")') -g sudo -s /bin/bash -m ohill
It doesn't seem to work and I'm sure I'm missing something.
Any ideas or an easier way? I'm looking for something I can easily put in a shell script.