error while change password in ubuntu automatically
Hi
i made a shell scripts in centos for auto password generation as below sudo useradd -d /opt $3 passwd: unrecognized option '--stdin' chmod -R 777 /opt setfacl -m u:$3:rwx /opt /etc/init.d/vsftpd restart echo -e " Access\nftp url= ftp://$ip\nusername=$3\npassword=$passftp\ncustomername=$1" | mail -s 'Automated server scripts' xx@gmail.com When i execute a same scripts in ubuntu lucid 10.04 version im facing error passftp=$(</dev/urandom tr -dc A-Za-z0-9 | head -c6) ; echo $passftp upto these line its exe fine im facing error in echo $passftp | passwd --stdin $3 root@wipro-desktop:~# passftp=$(</dev/urandom tr -dc A-Za-z0-9 | head -c6) ; echo $passftp ; echo $passftp | passwd --stdin wipro NsrW9L passwd: unrecognized option '--stdin' Usage: passwd [options] [LOGIN] Regards arun |
According to an Ubuntu forum thread, this should work:
Code:
useradd username -p `mkpasswd newpassword` |
All times are GMT -5. The time now is 08:57 PM. |