# adduser toto << adduser.sh>>Ctrl+D#
testtest
#des commandes avantadduser --home /home/toto -s /bin/bash toto << FINpasspass # confirmationFIN#des commandes après...
adduser toto << FINtesttestFIN
serv:/# ./user.shAjout de l'utilisateur toto...Adding new group `toto' (1005).Adding new user `toto' (1005) with group `toto'.Création du répertoire personnel /home/toto.Copie des fichiers depuis /etc/skelEnter new UNIX password: Retype new UNIX password: Sorry, passwords do not matchpasswd : Authentication information cannot be recoveredadduser: `/usr/bin/passwd toto' returned error code 10. Aborting.Cleaning up.Suppression du répertoire /home/totoSuppression de l'utilisateur « toto ».Suppression du groupe « toto ».groupdel : le groupe toto n'existe passerv:/#
expect "Enter Unix Password :"send $passwordexpect "(re) Enter Unix Password :"send $passwordinteract
useradd -p $password (en rajoutant tous les arguments qui vont bien)