[IT 알아보기]/IT 소식

서버 사용자 패스워드 일괄 변경

이호스트ICT 2011. 5. 3. 16:24


awk -F: '$3 >= 500 { print $1,$7 }' /etc/passwd | grep /bin/bash > aa.txt

cat aa.txt | awk '{print "echo \x27" $1"&*&*x\x27 | passwd --stdin "$1}' > change_passwd.sh

vi change_passwd.sh

cat change_passwd.sh | awk '{print $6,$2}'
                                                                                                    - Posted by Woo Seung -