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  每周日凌晨发送

posted on 2013-08-28 12:39  wangbokun  阅读(305)  评论(0编辑  收藏  举报

导航