creation of users

Hello, I'm preparing a script for creating users automatically.
I,m using this command

useradd -c "Name foo" -d /export/home/my -f 10 -g other -u 10001 -s /bin/bash my

the problem i have is when i create the user by command line, this acount is locked. What do i have to change in the command line ??

what else, what i want, but i do not how,is that each month the password account must be changed

thanks

The default behaviour is to disable the account unless you include the password (using -p option) when setting up the account.

passwd -d -w 7 -x 30 user_name

-d = clear password(no password)
-w 7 = warning 7 days before password expired.
-x 30 = password expire in 30 days

try U do.
Ratcha.