+ Post New Thread
Results 1 to 4 of 4
Mac Thread, Mounting Home Directories in Technical; Hi all, We have Macs (OS X 10.6.8) bound to AD/OD in the "Golden Triangle" setup, with workgroup manager on ...
  1. #1
    JNStiles's Avatar
    Join Date
    Jun 2013
    Location
    Liskeard, Cornwall
    Posts
    19
    Thank Post
    2
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Mounting Home Directories

    Hi all,

    We have Macs (OS X 10.6.8) bound to AD/OD in the "Golden Triangle" setup, with workgroup manager on OS X 10.6.8 server managing some preferences. We have successfully managed to map staff and student shares through the login items preference on workgroup manager, mounting the drives to the desktop on user login.

    My issue is with mounting Windows home directories. Using the Automator application on a Mac client I built an app called HomeFolder.app that runs the shell script below, which WILL mount the home folder on the desktop (obviously this script is for staff accounts only)

    #!/bin/bash
    #pause for kerberos ticket

    #/bin/sleep 15

    #get current logged in user

    cur_user=`/bin/ls -l /dev/console | awk '/ / { print $3 }'`

    #input full path of home folder

    home_folder="/Volumes/Home$/staff/$cur_user /Users/$cur_user/Desktop"

    #now make sure it is mounted

    if [[ -e $home_folder ]]

    then /bin/echo "home folder is mounted"

    else /sbin/mount_smbfs //10.0.48.39/home$/staff/$cur_user /Users/$cur_user/Desktop

    fi

    /bin/echo "done"

    exit 0

    I've then placed the app in the login items on a Mac client under System Preferences > Accounts > Login Items and taken a copy of the com.apple.loginitems plist from ~/Library/Preferences. I then placed it in workgroup manager > details. (this is how we have customised the dock, for example) with the hope that the app will run upon login.

    When I log on to a Mac client as a member of staff, the applications doesn't seem to run as there's no home folder mounted on the desktop. Does anyone know what I might be doing wrong here? the application will run fine manually. This method must seem really ridiculous, but I've exhausted all other possibilities!

  2. #2

    Join Date
    Sep 2013
    Location
    Oakville, ON
    Posts
    43
    Thank Post
    0
    Thanked 6 Times in 5 Posts
    Rep Power
    4
    In WGM there's a spot to specify login items, it might work better than trying to add it as you did. I think it's Preferences->Login->Items.

    Also make sure that there is a copy of the app on all the local machines (login items want to run from a specific local path). In my case I put them all into a subfolder in /Users/Shared on each of my lab machines. I did something similar but I did it with a straight Applescript app (to mount student shares) and it worked out ok for me.

    Lastly a suggestion, try using the command "whoami" instead of looking to the console. I've seen some strange things happen with console in the past. whoami should always return the shortname of the currently logged in user (and if it doesn't it might give you some extra info for debugging).

    Hope this helps.

  3. Thanks to Gerk from:

    JNStiles (25th October 2013)

  4. #3
    JNStiles's Avatar
    Join Date
    Jun 2013
    Location
    Liskeard, Cornwall
    Posts
    19
    Thank Post
    2
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Thanks for the reply.

    I've tried using Preferences>Login>Items before, but I didn't place the app in the /Users/Shared folder of the clients. I'll give it a go!

    Also I didn't have any luck creating an apple script with the script I've got, as it kept returning "unknown token" errors for a lot of the characters in the script and then errors such as "expected 'then' but found 'else'". I gave up and used the automator application to package the shell script in to an application. Could you possibly post the script you used? Maybe I can see where I'm going wrong!

  5. #4
    JNStiles's Avatar
    Join Date
    Jun 2013
    Location
    Liskeard, Cornwall
    Posts
    19
    Thank Post
    2
    Thanked 1 Time in 1 Post
    Rep Power
    0
    You're a genius, thank you!

    One thing I will add is that the app/script needs to be in the same file path location on the server!



SHARE:
+ Post New Thread

Similar Threads

  1. Home Directories on Moodle
    By apeo in forum Virtual Learning Platforms
    Replies: 4
    Last Post: 13th June 2007, 12:20 PM
  2. Home Directory Creation - how ??
    By pooley in forum How do you do....it?
    Replies: 4
    Last Post: 26th April 2007, 01:49 PM
  3. Replies: 27
    Last Post: 25th January 2007, 04:42 PM
  4. Replies: 19
    Last Post: 20th June 2006, 04:53 PM
  5. Replies: 9
    Last Post: 16th June 2006, 10:28 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •