Hi all,
I got nearly 2000 users on my system and some reason their home_path owners changed as root.I want to change their home_path owners by a script.They has to have their own owners name and datau as group.
I got two output one of them like ;
/usr/users/user1
/usr/users/user2
/usr/users/user3
and other file is like ;
user1
user2
user3
All i want to do is
chown user1:datau /usr/users/user1
I have tried with
for i in `cat userspath|awk ' {print $1}'`
do
for e in `cat owners|awk ' {print $1}'`
do
chown $e:datau $i
read a
done
done
But didn't work as i want.
Thanks for any help.