Home Forums Software InstaDMG What Defualts Write items do you use?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #374264

    (2 of 2 related threads search identifier: creating default settings)
    So I figure a bunch of us are in environments without apple servers, but with enough apple machines that we are using instadmg AND have a need to set certain default settings that end-users can change, but should start the same on all machines at least the first time.
    Some of these things can be done using MCX records and WorkGroup Manager with the ‘set once’ choice, however I find it easier to do it using the ‘defaults write’ command during the instadmg process.
    Which ones do you use? What about items that can only be set after startup, what do you do with those? What scripts and settings do you set in that manner?

    these are the ones I have collected/used so far.
    (some taken from my script and some from my collection, so commenting varies)
    [code]#No .ds-store on network shares
    defaults write com.apple.desktopservices DSDontWriteNetworkStores true

    #turn off time machine
    defaults write /Library/Preferences/com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool YES

    #disable time machine in general
    defaults write /Library/Preferences/com.apple.TimeMachine AutoBackup 0

    #disable time machine new disk requests
    defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup 1

    #Adds Recents Things Stack to dock
    defaults write com.apple.dock persistent-others -array-add ‘{ “tile-data” = { “list-type” = 1; }; “tile-type” = “recents-tile”; }’

    #Hide sub 500UID users
    defaults write /Library/Preferences/com.apple.loginwindow Hide500Users -bool TRUE

    #Hide SPecific users from the fast user and login window lists (Replace $USERNAME with users name)
    defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array $USERNAME

    #Hide the Other user from login etc.
    defaults write /Library/Preferences/com.apple.loginwindow SHOWOTHERUSERS_MANAGED -bool FALSE

    #change status of the firewall: 0=off 1=on for specific services and 2=on for essential services
    sudo defaults write /Library/Preferences/com.apple.alf globalstate -int 1

    #Globaly set the large print dialouge box
    defaults write /Library/Preferences/.GlobalPreferences PMPrintingExpandedStateForPrint -bool TRUE

    #use expanded save dialouges
    defaults write -g NSNavPanelExpandedStateForSaveMode -bool TRUE

    #use short name as default for logging into network shares
    defaults write /Library/Preferences/com.apple.NetworkAuthorization UseDefaultName -bool NO
    defaults write /Library/Preferences/com.apple.NetworkAuthorization UseShortName -bool YES

    #set screen capture file format
    defaults write com.apple.screencapture type pdf

    #set the clock to display seconds
    defaults write com.apple.MenuBarClock DisplaySeconds 1

    #disable itunes update checking
    defaults write com.apple.iTunes disableCheckForUpdates -bool YES

    #remove itunes store links (bandwith)
    defaults write com.apple.iTunes show-store-arrow-links -bool FALSE

    #Change Login Window Background (I set a custom logon background pic)
    defaults write $3/Library/Preferences/com.apple.loginwindow DesktopPicture /Library/LoginManagement/Login.jpg

    #launch the login script (I use a login hook to display a security warning that must be agreed to)
    defaults write $3/Library/Preferences/com.apple.loginwindow LoginHook /Library/LoginManagement/warning.sh

    #these items can only be done after startup
    #systemsetup use cannot address non-boot volume, so these are commented out
    #systemsetup -settimezone America/Los_Angeles
    #systemsetup -setusingnetworktime on
    #systemsetup -setcomputersleep 180
    #systemsetup -setdisplaysleep 30
    #systemsetup -setcomputername NCI-Image-M

    #Configure ARD – after startup
    /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -users admin -privs -all -restart -agent -menu

    what can you add? which items do you do differently? what suggestions can you make?

    Greg Neagle

    I would think that most of these would not work in an InstaDMG workflow without modification, since you are usually targeting the startup disk with `defaults write …`. The ones that aren’t global – that is, they don’t affect /Library/Preferences/some.plist, would have to be part of a global login script to be useful – otherwise they affect the user whom the command is run as.

    I used to use a combination of a StartupItem (for the global defaults), and a login script that was run for each user at startup (for the user defaults) to do these sort of things, and ti worked pretty well. But since Leopard shipped, I’ve moved as much of this as I can to local MCX records.


    You just have to target all of the write commands against the target disk ($3), and give the (almost *) full path to the plist file, and that will work fine.

    * You need to omit the “.plist” from the end of the path…. That reminds me to file that bug against defaults…

    Greg Neagle

    [QUOTE][u]Quote by: larkost[/u][p]You just have to target all of the write commands against the target disk ($3), and give the (almost *) full path to the plist file, and that will work fine.

    * You need to omit the “.plist” from the end of the path…. That reminds me to file that bug against defaults…[/p][/QUOTE]

    It will work fine for global defaults (those in $3/Library/Preferences/) and non-ByHost prefs for already-existing local users. And the User Template.


    I just target the instadmg drive ($3) and it has worked beautifully. Some things need to be put into startup scripts, but thats not a big deal as those things are few and far between (and noted) for the most part.
    So I ask again, how do you handle these settings? whats on your defaults list?


    just for the fun of it, I am going to revive this old thread… How do you (you being the community at large) handle these settings? Defaults write? MCX? something different?
    I have been leaning more and more to MCX BUT not everything works well that way…. at least for me (firewall for instance)

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Comments are closed