Can I automatically create a passworded user with pw adduser on freebsd?
pw useradd [name] [switches] -V etcdir alternate /etc location -C config configuration file -q quiet operation Adding users: -n name login name -u uid user id -c comment user name/comment -d directory home directory -e date account expiry date -p date password expiry date -g grp initial group -G grp1,grp2 additional groups -m [ -k dir ] create and set up home -M mode home directory permissions -s shell name of login shell -o duplicate uid ok -L class user class -h fd read password on fd -H fd read encrypted password on fd -Y update NIS maps -N no update Setting defaults: -V etcdir alternate /etc location -D set user defaults -b dir default home root dir -e period default expiry period -p period default password change period -g group default group -G grp1,grp2 additional groups -L class default user class -k dir default home skeleton -M mode home directory permissions -u min,max set min,max uids -i min,max set min,max gids -w method set default password method -s shell default shell -y path set NIS passwd file path
According to this, I can. But I am not sure how... It seems I need to use a file descriptor but I've not been able to see any example of how to do this. I have a bash script which needs to automatically do this with no user input...