Hello again!
We are experimenting with setting our 10.5.5 iMacs to run a 'localhomes' set-up. This means that when a user logs in they are given a fresh home folder from a template, with links made to their documents on the network. A script performs the template copying and redirection on login. This works perfectly on our 10.4.11 machines, but under 10.5 the 'Desktop' folder will not redirect!
I was looking at cache redirection on the forums here, and was thinking if there was a way to delete the /Users/%@/Desktop folder, and make it link to their Desktop on the network?
Is there are variable like '%@' for user, for the home path?
Thanks!
In osx, the tilde ~ character designates current users home folder. So you'd have ~/Desktop or ~/Documents. That's it. As far as i'm aware that will only work with the current logged on user but i see no reason why you can't use that in a script....although i'm not sure if it might be applescript or bash specific.
btw, i'd be interested in seeing that script, if your happy to share. We want to setup something akin to manadatory profiles for network home folders on 10.4 and we want more granular control over things like access to the desktop for users - so that script sounds quite useful![]()
Last edited by torledo; 21st November 2008 at 03:05 PM.
Here's our script:
Linking to documents works, as does everything else. It just WON'T do the desktop! It leaves the user's local desktop folder in place like it's ignoring that part.Code:#!/bin/bash # Leopard Localhomes script July 2008 homePath=`/bin/ls /Volumes/ | /usr/bin/grep "NetworkHomes\|year\|extra"` if [ "$homePath" ]; then ######## Softlink homefolder # Remove the dummy desktop if it's there /bin/rm -rf /Users/${USER}/Desktop # Check the Desktop folder exists then softlink if [ ! -d /Volumes/$homePath/$USER/Desktop ]; then mkdir /Volumes/$homePath/$USER/Desktop fi /bin/ln -Fs /Volumes/$homePath/$USER/Desktop ~/Desktop # Check the Documents folder exists then softlink if [ ! -d /Volumes/$homePath/$USER/Documents ]; then mkdir /Volumes/$homePath/$USER/Documents fi /bin/ln -fs /Volumes/$homePath/$USER/Documents ~/Documents # Check the Pictures folder exists then softlink if [ ! -d /Volumes/$homePath/$USER/Pictures ]; then mkdir /Volumes/$homePath/$USER/Pictures fi /bin/ln -fs /Volumes/$homePath/$USER/Pictures ~/Pictures # Check the Music folder exists then softlink if [ ! -d /Volumes/$homePath/$USER/Music ]; then mkdir /Volumes/$homePath/$USER/Music fi /bin/ln -fs /Volumes/$homePath/$USER/Music ~/Music /bin/rm ~/Library/Preferences/com.apple.sidebarlists.plist /bin/chmod a-w /Users/$USER ###### Create C13 SMHF subfolders # Check we are in C13 if [ `hostname | grep C13` ]; then # Check that the folder doesn't already exist if [ ! -d /Save\ Movie\ Here\ First/${USER} ]; then mkdir /Save\ Movie\ Here\ First/${USER} chmod -R 770 /Save\ Movie\ Here\ First/${USER} fi fi # Restart Finder killall Finder # Inform User config is done osascript -e 'tell application "Finder"' -e 'display dialog "This Mac OS X Leopard Computer is now ready for you to enjoy" buttons {"OK"} default button 1' -e 'end tell' else osascript -e 'tell application "Finder"' -e 'display dialog "Unable to connect to homefolder"' -e 'end tell' fi
We found Mike Bombich's scripts useful on his site, if that helps with your mandatory profiles set-up.
I'm trying to do something very similar and have run into the same issue as you, unable to redirect the Desktop folder!
Did you manage to fix the issue?
We didn't. In the end we ended up sticking with Network Home Folders (roaming profiles). The slowness which prompted me to try out this redirection was actually down to misconfigured DNS.
I ended up sticking with Network Homes. I redirected most of the contents of the Library folder to the local drive using WGM. The performance increase is very noticable!
If you are using 10.5 Open Directory and it's subsequent Folder Redirection, you cannot create a redirection to force the user’s home, or a sub-folder, to an upstream or network location. These redirections take place before any mount points are available, so the redirection would fail.
There are currently 1 users browsing this thread. (0 members and 1 guests)