Re: Push a plist file to all users - ownership question
Re: Push a plist file to all users - ownership question
- Subject: Re: Push a plist file to all users - ownership question
- From: Per Olofsson <email@hidden>
- Date: Wed, 3 Nov 2010 07:39:03 +0000
- Thread-topic: Push a plist file to all users - ownership question
3 nov 2010 kl. 06.31 skrev Don Montalvo:
> We have a plist file we need to push out to the User Template and all existing users. We can push them easily to the User template since we know the plist files need to be owned by root:wheel. However, putting a copy of this file in each existing user's home directory is proving to be a challenge.
How about a LoginHook:
#!/bin/bash
LOGINUSER="$1"
PREFS=`eval echo "~$LOGINUSER/Library/Preferences"`
UIDGID=`stat -f "%u:%g" "$PREFS"`
if [ ! -e "$PREFS/com.example.pref.plist ]; then
cp "/Library/Application Support/IBetItsAJavaApp/com.example.pref.plist" "$PREFS/"
chown "$UIDGID" "$PREFS/com.example.pref.plist"
fi
--
Per Olofsson
System Administrator, ITS, University of Gothenburg
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden