svn自动发用户名密码到邮件(明文密码)

时间:2023-03-09 07:32:01
svn自动发用户名密码到邮件(明文密码)
#!/bin/sh
touch testlist
cat /dev/null > testlist
grep "=" passwd |grep -v "#"|grep -v "admin" > testlist
cat testlist |tr -s [:space:] > list.conf
rm -rf testlist user_list=`grep "=" list.conf |awk -F'=' '{print $1}'` for i in $user_list; do
pass=`grep $i list.conf |awk -F'=' '{print $2}'`
echo "svn://xxx:xxx USER : $i PASSWORD : "$pass |mail -s "【阅】svn" $i'@xxx.com'
done

0 0 * * 0  sh sendPass.sh  每周日凌晨发送