Alias for AD network folder (script?)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 08-27-2008 12:52 AM
Hi,
This isn't much of a Casper question, but maybe someone can help.
Our Macs have single sign-on enabled with Active Directory, and are also
bound to our Open Directory server for managed preferences. Users save to
their network folder (their user folder listed in AD). But because the user
network folders are stored in hard-to-find subfolders in a server share
containing all network folders, it's difficult for users to find theirs when
trying to save documents. (For instance, the path to a user's folder might
be smb://file1/users/bsmith.)
The actual server share (e.g., "users") is mounted by OS X as a volume when
a user logs in, but they'd have to find their folder inside another folder
in that volume. Although OS X automatically creates an alias directly to
their folder on the dock, that alias isn't accessible from a file saving
window. I couldn't find a way of "copying" the dock alias to the desktop.
Can anyone think of a way (possibly with a script) for OS X to create an
alias on the user's desktop that links directly to the current user's AD
home directory - like the one that appears on the dock, but on the desktop?
Any ideas would be appreciated.
Ben Slutzky

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 08-27-2008 01:01 PM
hmm
not at my server at the moment,
i have exaclty the same setup as us, AA and OD, and my users folder get
mounted correctly as their home folder, you can find it by the home icon
and this is accessable in programs save box, so how do you mount yours?
do they not save files to their Home folder???
with WGM you can also mount the users home folder at login as a folder
on the desktop, you should also be able to navigate this from a save as
box, but not at my server to test
Criss
Criss Myers
Senior Customer Support Analyst (Mac Services)
Apple Certified Technical Coordinator v10.5
LIS Business Support Team
Library 301
University of Central Lancashire
Preston PR1 2HE
Ex 5054
01772 895054
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 08-27-2008 01:23 PM
No, with our Casper setup, we're wiping/re-imaging everything each week on
most machines, so users must save files to their network folder. (Don't
confuse this with their actual Mac home with Library, Music, etc. - I'm
talking about a mounted location specified by AD, which would normally be
mapped on a Windows workstation, and is mounted as a network volume in the
Finder sidebar on Macs, where they can save files.)
The user's network folder itself is not actually mounted, because each
user's network folder is located *inside another folder in the actual server
share* for all users' network folders. Users can theoretically navigate to
their network folder inside that mounted volume (on the sidebar and desktop
like you say), but that doesn't go directly to their own folder.
For instance, our file server is MPHFS2, the share for all student folders
is ST_HOME, and inside ST_HOME are a bunch of folders representing each
graduating class. So the folder for John Smith, in the graduating class of
2008, would be at smb://MPHFS2/ST_HOME/08/JSMITH. The Mac would mount the
ST_HOME volume on the sidebar and desktop, but John probably wouldn't know
to find his folder in the 08 folder. We'd like a way to automatically create
an alias to JSMITH on his desktop and sidebar.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 08-27-2008 03:11 PM
I took this as a challenge, and now I'm frustrated. I believe I've got most
of the pieces of this together, and that another pair of eyes will be able
to see where my syntax is failing.
### Start Script
userhome=""/Volumes/Uservolume/Users/"whoami
" # tested
echo $userhome > /tmp/userhome #tested
osascript -e 'read posix file "/tmp/userhome"' # tested
# above line returns contents of file which is the POSIX path to the
client's folder, surrounded by quotes
osascript -e 'set userhome to read posix file "/tmp/userhome"' -e 'tell
application "Finder" to make alias file to posix file (userhome) at desktop'
# above line fails with error: 77:128: execution error: Finder got an error:
AppleEvent handler failed. (-10000)
### end script
The following bash command:
osascript -e 'tell application "Finder" to make alias file to posix file
"/Users" at desktop'
puts an alias on your desktop that points to /Users. I'm having trouble
with the syntax to pass a variable to the Applescript "make alias" function
from the bash shell. Based on the fact that the command above works, I
assume that when the variable is properly inserted into the osascript
command, you'll get the needed alias.
Of course, you should be able to use the ln command:
/bin/ln -s /Volumes/Uservolume/Users/whoami
~/Desktop/whoami
