Tuesday, 13 September 2011

Network Home Redirector - reverting back

Back when we had OS X 10.5 installed throughout the computer suites we had to run a script at startup which created a symlink for Caches in the users Library folder. These scripts were called NHR (Network Home Redirector) This linked to a folder stored locally, as the caches folder stored on the Active Directory smb shares had permissions issues for some applications.

The only thing which didn't work quite as planned was the fact that the logout scripts never ran, and so people were left with the symlink in their Library folder.

Now we have updated to OS X 10.6.6, this permissions issue seems to have resolved itself. But anyone who logged in last year has now got a symlink for their Caches folder, and not a folder! To resolve it I plan to make a small script which, upon login, looks for a symlink, deletes it and makes a nice new folder.


I've had a look at the man page for 'ls' function, and if you use the -l command in it, it shows you more info on the files and folders. Any with a 'l' at the beginning of the line are symbolic links. I ran the command with the grep command to pick out the Caches folder:

ls -l Library/ | grep 'Caches'
lrwxrwxrwx+ 1 leachs  CHSTFADMIN\teaching_global     19 15 Sep 14:00 Caches -> /tmp/leachs/Caches/
So thats a good start.

No comments:

Post a Comment