{"id":53,"date":"2006-04-04T08:21:22","date_gmt":"2006-04-04T15:21:22","guid":{"rendered":"http:\/\/www.steveneppler.com\/blog\/2006\/04\/04\/locally-cache-mac-os-x-network-login-folders"},"modified":"2006-04-04T08:21:22","modified_gmt":"2006-04-04T15:21:22","slug":"locally-cache-mac-os-x-network-login-folders","status":"publish","type":"post","link":"https:\/\/steveneppler.com\/blog\/2006\/04\/04\/locally-cache-mac-os-x-network-login-folders","title":{"rendered":"Locally Cache Mac OS X Network Login Folders"},"content":{"rendered":"<p>Here at the school district I was running into a problem where if several Mac OS X wireless clients logged into the network at once, everything slowed down to a crawl.  After researching the problem, it looked like the user&#8217;s Library and Microsoft User Data folders were causing the problem.  I tried turning on OS X&#8217;s home folder syncronization, but that didn&#8217;t work very well, and filled up our older computers fast.  The solution I found was to locally cache the user&#8217;s Library and Microsoft User Data folder.  To do this, create a symbolic link from the user&#8217;s networked &#8216;Library&#8217; folder and point it to a local source.  I chose \/tmp\/UserCache\/username\/Library.  Here is the login script I created to automate the process:<\/p>\n<pre>\r\n#! \/bin\/bash\r\n\r\n# Create local user caches of important directories\r\n# Written by Steven Eppler 04\/04\/2006\r\n\r\nexport PATH=\/bin:\/usr\/bin:\/usr\/local\/bin:\/sbin:\/usr\/sbin\r\n\r\n# Set user variable\r\nuser=\"$1\"\r\n\r\n# This grabs the user's home directory server\r\ninput=`dscl localhost read Search\/Users\/$user NFSHomeDirectory`\r\nnethomedir=${input:18}\r\n\r\n# Or you can hardcode it...\r\n# nethomedir=\"\/Network\/Servers\/ServerName\/Volume\/$user\"\r\n\r\n# Check for blank nethomedir - otherwise you will delete\r\n# the root \/Library folder!\r\nif [ \"\"\"$nethomedir\"\"\" != \"\" ]; then\r\n\r\necho $user\r\necho $nethomedir\r\n\r\n# Create local caching directories\r\nmkdir \/tmp\/UserCache\r\nmkdir \/tmp\/UserCache\/$user\r\nmkdir \/tmp\/UserCache\/$user\/Microsoft\\ User\\ Data\r\nmkdir \/tmp\/UserCache\/$user\/Library\r\n\r\n# Give everyone rights to them...\r\nchmod -R ugo=rwx \/tmp\/UserCache\r\n\r\n# Create Documents and Desktop folder (sometimes they don't exist)\r\nmkdir $nethomedir\/Documents\r\nmkdir $nethomedir\/Desktop\r\n\r\n# Delete old folders or links\r\nrm -rf $nethomedir\/Library\r\nrm -rf $nethomedir\/Documents\/Microsoft\\ User\\ Data\r\n\r\n# Create new links\r\nln -s \/tmp\/UserCache\/$user\/Library $nethomedir\/Library\r\nln -s \/tmp\/UserCache\/$user\/Microsoft\\ User\\ Data $nethomedir\/Documents\/Microsoft\\ User\\ Data\r\n\r\nfi\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Here at the school district I was running into a problem where if several Mac OS X wireless clients logged into the network at once, everything slowed down to a crawl. After researching the problem, it looked like the user&#8217;s Library and Microsoft User Data folders were causing the problem. I tried turning on OS &#8230; <a title=\"Locally Cache Mac OS X Network Login Folders\" class=\"read-more\" href=\"https:\/\/steveneppler.com\/blog\/2006\/04\/04\/locally-cache-mac-os-x-network-login-folders\" aria-label=\"Read more about Locally Cache Mac OS X Network Login Folders\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,4],"tags":[],"class_list":["post-53","post","type-post","status-publish","format-standard","hentry","category-mac-os-x","category-on-the-job"],"_links":{"self":[{"href":"https:\/\/steveneppler.com\/blog\/wp-json\/wp\/v2\/posts\/53","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/steveneppler.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/steveneppler.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/steveneppler.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/steveneppler.com\/blog\/wp-json\/wp\/v2\/comments?post=53"}],"version-history":[{"count":0,"href":"https:\/\/steveneppler.com\/blog\/wp-json\/wp\/v2\/posts\/53\/revisions"}],"wp:attachment":[{"href":"https:\/\/steveneppler.com\/blog\/wp-json\/wp\/v2\/media?parent=53"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/steveneppler.com\/blog\/wp-json\/wp\/v2\/categories?post=53"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/steveneppler.com\/blog\/wp-json\/wp\/v2\/tags?post=53"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}