milis/talimatname/genel/f/firefox/firefox.kur-kos

10 lines
342 B
Plaintext
Raw Normal View History

2017-09-21 20:59:33 +02:00
_l="/etc/login.defs"
_p="/etc/passwd"
l=$(grep "^UID_MIN" $_l)
l1=$(grep "^UID_MAX" $_l)
users=(`awk -F':' -v "min=${l##UID_MIN}" -v "max=${l1##UID_MAX}" '{ if ( $3 >= min && $3 <= max && $7 != "/sbin/nologin" ) print $1 }' "$_p"`)
for user in "${users[@]}"; do
cp -r /tmp/.mozilla "/home/$user/"
sudo chmod -R 777 /home/$user/.mozilla
done