I need to be able to run the "useradd" command via a script, but the problem is, is that the password doesnt get set properly using the -p option. When I run the following command
useradd -s /bin/false -p 1234 test
It adds the user, but the password in /etc/shadow isnt encrypted, it appears as "1234", and I cant logon via ftp or pop3 using this account until I manually set the password.
Is there any way I can set this password correctly using the useradd command in a shell script?