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

10 lines
342 B
Plaintext

_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