Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Bookmark.plist to all users

WGM has me stumpted with trying to add a bookmark.plist to each uses Library/Safari file. Using the preference option will only allow me to develop the Library/Preferences folder and I cant figure what file type is require to go in the Computer Group Name, under Preferenses - Login - Scripts section, as this is the only logical place I can think it should go.


There is of course the option to copy and paste the bookmark into each individual folder but this is a massive time killer due to the fact that not all the Library files are avaiable due to some of the OS X's being 10.7 and .8, plus there are over 300 users.


I've also tried to copy via terminal but run into loads of trouble as a simple copy and paste script seems to start running through the files checking wheather they have permissions or not.


Idealy, I'd like to have a bookmark.plist exported from the master/teachers computer to a shared mount. As there is no simple deployment option, I'd like to be able to run a script at each terminal, at login to copy the most recent bookmark.plist to their user Library.


If there is anyone that thinks they have achieved such a task and manage to write the script, would they be kind enough to offer it?


Thanks


cwj

Xserve, Mac OS X (10.5.8), Enable preferences...

Posted on Dec 6, 2013 4:31 AM

Reply
2 replies

Dec 6, 2013 7:02 AM in response to cwjones73

I've managed to solve this one of sorts without the use of WGM, using Terminal and Excel to create a csv file.


for any one interested;

Create a Bookmark list on the servers Safari and export the bookmark.plist to the Hard Drive for easy finding later.


create an excel file that has Column A with these details:


[copy][space][source location][space][destination location part 1]


cp /Bookmark.plist /Volumes/ServerName/Home \Folder/


FYI. Terminal doesn't like spaces when running these commands so make sure you include the backslash after the space if a directory name has a space. e.g. Home Folder = /Home \Folder/


Column B

[usernames]

jblogs


FYI. This will be a variable column as username differ.


Column C

[destination location part 2]

/Library/Safari/


Copy the cells down for as many users there are for columns A & C and enter the individual usernames in column B. Personaly I give all my users number so its automatic...


Save the file as .CSV, make sure you close the Excel file. Open the CSV file using TextEditor and use Find and Replace to clean up the double quotes so it looks something like:


cp /Bookmark.plist /Volumes/ServerName/Home \Folder/jblogs/Library/Safari/


There should be a long list of these lines with individual usernames.


Select All and Copy the whole text file


Open Terminal and Pate all of the content.


Thats it!


Now go and check it has copied the file to the correct location by opening Safari whilst logged in as a user.


I hope that this has helped.


If anyone would like to share the Script option I mentioned earlier, I'd be happy to try it out

Dec 6, 2013 8:50 AM in response to cwjones73

ARD is commonly used to push out files.


For shell scripting, the backslash mentioned is one option, and quoting the filename string is another. There's a list of common bash shell script pitfalls here, and spaces in filenames feature in several different variations.


It's also possible to have a login script copy in a fresh set of bookmarks, each time the user logs in.


Or set up a central site as the home page or as a known web page, and put the bookmarks there.


But to your script, that same pitfalls discussion mentioned earlier also has example scripts that can be used to rummage through directories based on a pattern. These can be used to copy a file into a known directory across a common volume.


sudo would be used to override permissions (sudo /path/to/script), or you can modify the permissions on the student files and directories to add an ACL to allow organizational administration users (as distinguished from system administrative users) access to the directories, without requiring them to be in the admin group; add some local group to an ACL on the files.


ps and FWIW and you already undoubtedly know this: it would be /Home\ Folder/, not /Home \Folder/.

Bookmark.plist to all users

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.