Need Loginhook help

Discussion in 'OS X Mountain Lion (10.8)' started by 8r1g, Aug 22, 2014.

  1. 8r1g macrumors newbie

    Joined:
    Aug 22, 2014
    #1
    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!
     
  2. 8r1g thread starter macrumors newbie

    Joined:
    Aug 22, 2014

Share This Page