Home Forums OS X Server and Client Discussion Questions and Answers Login Hook with Network Home Directories

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #373215
    sglasgow
    Participant

    I am running leopard server 10.5.3 and manage a bunch of macs setup with network home directories.
    The first time a user logs in I would like to be able to run a login hook that will move certain files and folders in to their home directory from a local directory. For example, one of these folders is the Microsoft Office User Data Folder.
    My problem is that I cannot figure out how to have the script access the network directories.
    I have tried using the server mount path “Network/Servers/server.example.com/Volumes/Data/Users/” however this has not worked, either because it has not mounted at the time of the scripts execution or because the local root user that executes the script does not have permission to access it.
    Thanks in advance for the help, it would be much appreciated.

    -Sam

    #373237
    sglasgow
    Participant

    Thank you to those who looked at this, but I figured it out none the less.

    I used the following lines to access the network directories.

    mkdir /Volumes/SharePoint
    mount_afp afp://username:[email protected]/SharePoint /Volumes/SharePoint

    The I can access the directories by working in /Volumes/SharePoint

    #373240
    sglasgow
    Participant

    Thanks for information about your script. Unfortunately I cannot use it since I am OD based.
    My one remaining question is, how can I find the location of a users home directory using the dscl command.
    In your script you used the following…
    [quote]/usr/bin/dscl localhost -read /Active\ Directory/All\ Domains/Users/$USER SMBHome | /usr/bin/sed -e ‘s/\\\/\\//g’ | /usr/bin/awk ‘{print $2}[/quote]
    Is there an equivalent of this for Open Directory based system.
    Thanks

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Comments are closed