#!/bin/sh
TEMPFILE1=/tmp/ehong.1.$$
IFS=":" ; export IFS
cat /cygdrive/h/etc/passwd | while read username passwd_placeholder userid groupid gecos home_dir shell; do
if [ $userid -gt 500 ] ; then
shadow_line=`grep "^$username:" /cygdrive/h/etc/shadow`
`echo $shadow_line | awk -F: '{ print $1":"$3":"$4":"$5":"$6 }' /cygdrive/h/etc/shadow` > $TEMPFILE1
fi
done
i have been figuring out abt this for a week. i have problem extracting info from /etc/shadow with username input from /etc/passwd & output to a temp file for comparing data later on. help is appreciated! thanks!