I have an automatic script which works, only it just never makes a home directory. The data is extracted from a database.
Heres the script:
$SQL -s -e "SELECT uid, password FROM registrations WHERE processed = 0"   \
|  while read A B; do
        sudo useradd   $A -p $B -m /home/
as you can see the -m is there, but it seems to ignore it and never make a home directory and I have no idea why. I must be missing something but i've no idea what
                        
If you run
man useraddyou'll see that the-mdoes not expect a parameter.Running it this way should do the trick (or at least it just did on my Debian Squeeze):
In the man pages you'll also find other useful options such as:
-dor-b