Created new user from shell script using following command:
sudo useradd $1 -p $2 --home /var/www/$1
I'm not able to login to FTP or SSH as that user, do i need to add the user to some group for that?
Have you entered the password in encrypted form as returned by
Also note the first sentence of the Description section of useradd(8):
It's likely that adduser(8) would have done whatever it is that needs doing.