- This topic has 5 replies, 3 voices, and was last updated 16 years, 1 month ago by
knowmad.
-
AuthorPosts
-
September 26, 2008 at 4:37 pm #374264
knowmad
Participant(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
[/code]what can you add? which items do you do differently? what suggestions can you make?
thanks,
KnowmadSeptember 27, 2008 at 4:42 pm #374270Greg Neagle
ParticipantI 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.
September 27, 2008 at 6:24 pm #374271larkost
ParticipantYou 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…
September 29, 2008 at 6:49 pm #374285Greg Neagle
Participant[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.
October 2, 2008 at 5:23 pm #374327knowmad
Participantgneagle,
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?
knowmadMarch 4, 2009 at 8:52 pm #375622knowmad
Participantjust 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) -
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed