Thanks.
Just remembered this is why I post things on my blog, I forget otherwise!!
This is from a screensaver script:
# Sets screen saver to require password (not always needed)
/usr/bin/defaults write "$loggedInUserHome"/Library/Preferences/ByHost/com.apple.screensaver."$LEOUUID" "Require Password" -bool TRUE
#
#Correctng Permissions for /Users/loggedInUser/Library/Preferences/ByHost/com.apple.screensaver.UUID
chmod 777 "$loggedInUserHome"/Library/Preferences/ByHost/com.apple.screensaver."$LEOUUID".plist
Regards,
Ben.
sudo -s -u <username> defaults write com.someplist.plist -options -arguments
This is not tested, see the sudo man page. Also you can deploy user agents, they always run as the user
sudo -s -u <username> defaults write com.someplist.plist -options -arguments
On 10/5/11 1:32 PM, "Thomas Larkin" <tlarki at kckps.org<mailto:tlarki at kckps.org>> wrote:
This is not tested, see the sudo man page. Also you can deploy user agents, they always run as the user
Be sure to omit the ".plist" from the command but if necessary you can specify the path to the file.
--
William Smith
Technical Analyst
Merrill Communications LLC
(651) 632-1492
what are you trying to do with this that can't be done with mcx?
i'd avoid a complicated solution here, if possible. maybe you can outline your intentions.
No mcx in use.
The below's an excerpt from a script manage screen savers.
This new issue is to set the default paper size to A4 if not set to any A size.
@ build we'll have a plist to set the default (with fut).
If we used mcx it'd be an once setting.
I've always used mcx, but only to hide sys prefs & mount drives.
This new environment has far too many groups, so could only set computer level... But tbh, can't see the need.
Regards,
Ben.