Re: Al Users with PackageMaker
site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type; bh=0IiK2ErcpGTwopnUmCf5nmoXHdyjRm3iJePhfu9UGjk=; b=m0XrR69kqyiQkmonlePaRnfsDkjE0H4qsrbWE2COhhgAtP5gCzbJTBR38KHLxijq1U fwOYL/48vsebl2XEvLhIFqEvDGDLT790XCWjRFwDDmtfnu3O1BEqE/4ZAIWAv/8Vj1V0 AFshyGWRw0GkXawlS7WEmjcAmCaCKX2vlDrPs= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=APciTnNOhFBD7yvcw9aWng1GMAX+pB4bPNJiZNmFUhMA0ssN/9pCMod65iNmVK66hw SWU4yWyg/uf15CyxXBqAuvc1jgkRkhCrykWv5w5G4LRhMeDsPHy+wDBLcE1SNPQubuNA Mae/TXfX5DDxWIs/Ke15kWCxsVQBPqKCSS+GE= On Mon, Feb 8, 2010 at 3:23 PM, Russ Miller <russ@phoenixedit.com> wrote:
OK, I'd like to distribute preference files to all users on all machines on my network. Is there a way or a wildcard to install say "all users"/Library/Preferences since having multiple users on each machine (Open Directory) makes an absolute path irrelevant? I'd like to kick this package out over ARD.
It's not for a package installer, but I have a shell script that works similarly, and might be adaptable for your needs. It needs to be run with admin/root privs, so a postflight installer script ought to work. plistpath="Library/Preferences/com.acme.roadrunnerzapper" property="dynamite" value="kaboom" for dsuser in `dscl . -list /Users | egrep -v '_|daemon|root' do dshome=`dscl . read /users/$dsuser NFSHomeDirectory | awk '{print $2}' plist="$dshome/$plistpath" defaults read $plist $property defaults write $plist $property $value sleep 1 defaults read $plist $property done This will consult the local Open Directory database, get a list of non-system accounts (there's actually a bunch more than the above, but I'm getting main ones in for clarify; re-run `dscl . -list /Users` to see all of them). Then, for each one, it just figures out their home directory, constructs a .plist file based on that path, then uses `defaults` to write the setting you want into each of those, whether or not it previously existed. Then it reads back the value to make sure the change worked as expected. If you already have a canned, working, portable .plist file, then you could replace the `defaults` commands with the right `cp $source $plist` line to put your version in place. Hope this helps. -- Chris Devers _______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Chris Devers