You are not logged in.

Announcement

[2017.09.08] DeployStudio build v1.7.8 (checksum, release note).
[2016.08.26] DeployStudio build v1.6.19 (release note).
[2013.02.23] DeployStudio last universal build v1.5.17 (release note).

#1 2014-03-04 12:59:14

jelockwood
Member
Registered: 2009-11-11

Problem setting one particular preference file via defaults

Like I suspect most administrators I have created a shell script I run as a post imaging task to configure the just imaged computer. I have all sorts of things in it including setting energy saver settings, enabling the firewall, enabling location services, etc.

One of the steps I would like to include is to disable guest access to any shared folder on the freshly imaged computer. (As default guest login is disabled but guest file access is enabled.) This can be done using the following command

/usr/bin/defaults write /Library/Preferences/com.apple.AppleFileServer guestAccess -bool false

Note: It is not necessary to use sudo in this case as DeployStudio runs scripts with admin level privileges.

This works perfectly in Terminal.app after the the imaged computer has booted normally and after you login normally. However it is not being successfully applied by DeployStudio, all my other similar commands for all the other various plists I am modifying using defaults write do work including com.apple.loginwindow and com.apple.screensaver

Does anyone have an idea why just this one preference file does not work in DeployStudio?

After the workflow has finished and the imaged Mac has finished the final normal boot, I have double checked using

/usr/bin/defaults read /Library/Preferences/com.apple.AppleFileServer

and I can see my setting is not there, there is just a KerberosPrincipal entry.

I am using DeployStudio 1.6.3 running on a Mavericks 10.9.2 Mac and the NetBoot image being used is 10.8.5 and the image being restored is also 10.8.5.

Offline

#2 2014-03-04 13:44:12

jelockwood
Member
Registered: 2009-11-11

Re: Problem setting one particular preference file via defaults

Having checked I have noticed that the problem plist file is the only one I am configuring which has uppercase letters in its name i.e. com.apple.AppleFileServer compared to com.apple.loginwindow I don't see that that should be a problem as I have taken care to use the correct capitalisation since even though I am not using case-sensitive HFS+ most Unix (command line) commands are case sensitive.

However this could possibly be pointing to a bug in DeployStudio. Remember the exact same command (and capitalisation) works in Terminal.app afterwards.

Offline

#3 2014-03-05 11:35:12

jelockwood
Member
Registered: 2009-11-11

Re: Problem setting one particular preference file via defaults

Doh!

Happened to be watching the DeployStudio log window and noticed before it scrolled off the screen that I had made a minute type error in the command.

Now all ok. :)

Offline

Board footer

Powered by FluxBB