I am trying to set a password for users in a non-interactive script. The only 
way the users will be able to access my system is to use their private keys. I 
create the user in the script like this:

sudo ${USERADD} -d /export/home/${USER_ID} -s /usr/bin/bash -c "${FIRST_NAME} 
${LAST_NAME}" -m ${USER_ID}

what I would like to do is this:

sudo ${USERADD} -p ${PASSWORD} -d /export/home/${USER_ID} -g ${OTHER_ID} -s 
/bin/bash -c "${FIRST_NAME} ${LAST_NAME}" -m ${USER_ID}

where PASSWORD is some encrypted password needed just to activate the home 
directory so I can put the user's public key in .ssh. This obviously fails 
because the -p option is not available in opensolaris.

Is there a way to do this without having to separately (interactively) run the 
passwd command?
-- 
This message posted from opensolaris.org

Reply via email to