I have to set up useraccounts with rexec. So I'm only able te execute a
command. I can't use dialogs (as needed for passwd). What I do so far is
useradd -u <UID> -d /<HOMEDIR>/<LOGNAME> -c '<DESCRIPTION>' <LOGNAME>
which creates an new account with all options I need.
The next I use is chpass, which sources I found in a newsgroup.
chpass <LOGNAME> <PASSWORD>
which set's a password for the account.
Everything is ok with chpass for accounts that already exist. The new
password is set correctly. With new accounts the user gets an "account
expired" on ...