Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

8r1g

macrumors newbie
Original poster
Aug 22, 2014
2
0
I am trying to create a script to copy preference files from one location to "any" student who logs in the iMacs.

the script works when I am logged in but doesn't at login.

the command is simply
1st I tried
cp /script/script.sh ~/library/preferences/

I made the script an executable with chmod u+x

I entered
sudo defaults write com.apple.loginwindow loginhook /script/script.sh

This didn't work so I tried

cp /script/script.sh /users/"$1"/library/preferences/

still doesn't work. HEEEEEELP!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.