![]() No need for sudo because you're writing to your own user space and just creating a new file. In Terminal, you could enter this to write to a file on your Desktop instead:ĭefaults write ~/Desktop/ CleanExit -string "YES" For example, you already have this command: I'll add something else.īecause you already know the plist names and settings, you may find it easier to write these to plist files on your Desktop to avoid altering your own settings and make the files easier to find. You can't enforce anything with a script, but you can enforce using a configuration profile. Sudo -u $user defaults -currentHost write styleKey -string "Classic" Sudo -u $user defaults -currentHost write SelectedSource -int 3 Sudo -u $user defaults -currentHost write SelectedFolderPath -string "/Users/Shared/cure" Sudo -u $user defaults -currentHost write LastViewedPhotoPath -string "" Sudo -u $user defaults -currentHost write tokenRemovalAction -int 0 Sudo -u $user defaults -currentHost write moduleDict -dict moduleName -string "iLifeSlideshows" path -string "/System/Library/Frameworks/amework/Resources/iLifeSlideshows.saver" type -int 0 Sudo -u $user defaults -currentHost write idleTime -int 120 Sudo -u $user defaults -currentHost write showClock -string "YES" Sudo -u $user defaults -currentHost write PrefsVersion -int 100 Sudo -u $user defaults -currentHost write CleanExit -string "YES" User= ls -l /dev/console | cut -d " " -f 4 !/bin/sh Get user logged into console and put into variable "user" I was hoping there was a way via as configuration profile of adding the script but cant see a way to do this. Not sure if this is most efficient way of doing this as it runs every time any user logs in, repeatedly. I have a policy that should trigger this at login/ ongoing and it reports that it runs successfully but it doesn't. But only if I manually trigger it via Casper remote. I have a a policy that successfully copies the screen savers to the Macs ok.Īnd I have a script stolen from another discussion that works, see below. I am required to force all users screen saver to display a collection of images as supplied by our IT Security department, and I'm trying to work out the best way to achieve this.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |