Search This Blog

Tuesday, August 18, 2009

Add users from copied passwd file


for U in $(awk -F":" '{print $1}' passwd)
do
echo "________________ $U __________________"
UDIR=$(awk -F":" "/$U/"'{print $6}' passwd)
mkdir $UDIR
chown $U $UDIR
done