0

I have a series of scripts that run at the load of one standard user, one admin user and the Default User Template. For this particular example, they configure the background and the screensaver (since those are ByHost preferences that can't effectively be built into an image.)

However, with /sbin/ no longer accessible in 10.11, my scripts have all failed. When changing them to run from my Admin Files folder, they still aren't doing anything at all.

Here's the command that usually goes in /sbin/

#!/bin/sh

## Admin Platform Services User Customization Script - Default User Desktop - (Version 7.0 - Twilight Sparkle) B
## 7.1 (Late 2015) 10.10 Version - Updated with new directory structure and script 
## Single-Run Script to Change the Default User's Background

## Force background for Default User
/Admin-Files/Cosmetic\ Scripts/Background\ Engine/ChangeDesktop.py --path /Admin-Files/Admin\ Backgrounds/7.0\ Default\ User\ Backgrounds/OSX10\ -\ Geblin\ Mekkatorque\ -\ Default\ Large.png 

## Removes the .plist LaunchAgent from inside the User Launch Agent Folder. 
rm -f ~/Library/LaunchAgents/set-user-bg-osx10.plist

The PLIST is here:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>Label</key>
   <string>set-user-bg-osx10</string>
   <key>Program</key>
   <string>/Admin-Files/Scripts/Scripts/OSX10/set-user-bg-osx10</string>
   <key>RunAtLoad</key>
   <true/>
</dict>
</plist>

Now simply nothing happens. This did work in a previous beta of OSX11, but no longer works in the GM.

Oh one more thing: the permissions:

chmod 444 /Blizzard-Files/Scripts/Scripts/OSX10/set-user-bg-osx10.plist 
chmod +X /Blizzard-Files/Scripts/Scripts/OSX10/set-user-bg-osx10
ghostof101
  • 187
  • 1
  • 9
  • This was useful to me, not because of the solution (a valid one, given the problem) but because the clue for resolving my issue was in the question; I needed to make my .plist files executable. They did work before but perhaps during an OS upgrade that changed, or launchctl is stricter about file permissions in 10.11. – Kevin Teljeur Jul 25 '16 at 10:39

1 Answers1

0

If anyone comes across an issue like this, the solution is insanely simple.

Change /sbin/ to private/etc/

And then it works like a charm.

ghostof101
  • 187
  • 1
  • 9
  • it's not clear how you solved the problem. change where? – EsseTi Oct 20 '15 at 10:53
  • I changed the location of where the files were going. /sbin/ is now inaccessible even by the root user. /private/etc is still user accessible. By moving the scripts there instead, the entire configuration worked. – ghostof101 Oct 20 '15 at 16:33