Portable Home Directories and Login Hooks

We recently switched from Network Home Directories to Portable Home Directories. We used to use login hooks to do all kinds of nifty things to a user's home folder at login, but now it's complicated. I can't figure out at what point in the login+sync process the login hook executes.
If the login hook executes before syncing, then I need to modify the network copy of the home folder, i.e. Network/Servers/servername/.../username. If the login hook executes after syncing, then I need to modify the local copy of the home folder, i.e. /Users/username. Unless I'm mistaken, you can't just use the tilde (~) in the script to denote the path the home folder, so you have to list the path explicitly.
My testing seemed to result in inconsistent behavior. Can anyone give me some guidance?
(Keywords: Loginhook Logouthook Login Script Logout Script Mobility Mobile PHD)

Thank you for the advice, Syth, but I'm already aware of the basics of writing and implementing login and logout hooks. I wrote a lot of them when we were using Network Home Directories. The root of my question has to do with Portable Home Directories and login hooks.
This is a computer lab environment where every user has their own account, network home folder, and "Mobility" preferences set in Workgroup Manager. When a user logs into a lab computer, syncing kicks in and they work from a local copy of their home folder which then syncs to the server at login and logout.
So the core question is: Do login and logout hooks execute before or after login/logout home syncing occurs?
For example, if a user with a brand new network account, i.e. who doesn't even have a network home yet, logs into a computer, what's the order of events? I would hope it would be:
1) server creates network home
2) computer creates local home, i.e. syncs
3) login hook executes
But my testing has been inconsistent. Anyone have any experience or insights to share?

Similar Messages

  • Portable Home Directories and iphoto - problems

    Hi
    We have recently set up the 'mobility' funtion for our staff via our 10.4 server - thuse creating Portable Home Directories. This all seems to be working fine and documents sync perfectly. What is not behaving is iphoto - we keep getting synchronization conflicts based around iphoto files - not the images themselves but files such as:
    Library6.iphoto
    iphoto.ipspot
    Dir.data
    Albumdata.xml
    .lpoptions (not sure if this one relates to iphoto but is recurring on numerous acccounts)
    Anyone have any clues on this. Iphoto does not seem to be syncing the images at all........and I can't resolve the conflict.
    Chris

    iPhoto works fine with my users so I can't offer much assistance there, but .lpoptions is where the default printer is stored, and that's typically not something you'd want to synchronize. I personally exclude it.

  • Portable Home Directories and Entourage

    I going to be implementing Portable Home Directories into our office, but I am trying to figure out what I want to be syncing.
    The office uses Entourage and having 60+ users. From what I can if I exclude the microsoft user data folder I don't get the account to show up in Entourage when I switch to another computer.
    I really don't want to be syncing Microsoft User Data folder for each user onto the server. Considering we have a mail cap of 2gig some users are larger due to historical reasons and rank. We also use public folders heavily and some public folders can be about 10gig.
    So my question is, is there away to get around this. Can I get the account information to sync for Entourage, but not the email. I see how it works with apple mail were it syncs the mail folder, but excludes the folders that contain the email.
    I have a feeling the answer to my question no, but just checking if any one else has found a work around.

    Since Entourage is a DB it would sync the whole 2GB or 10GB every time. This is why Apple pushes there product as thy use a flat file system where only the files that changed would be sync'd. Entourage is a db and since there is no program out there that can open the db up and just sync or backup what has changed you will sync the whole profile /db.

  • Help with Portable Home Directories and AD

    Is it possible to implement "Portable Home Directories" without an Open Directory server, using just binding to an Active Directory Domain. (no "Golden Triangle")?
    We are just starting to integrate Macs into our company (finally!) and I'm looking for the best way to allow Macbook Pro users to have their files sync'ed with their NW home folder and still available locally when they are offline.
    I'm able to bind to AD successfully but can't find any documentation on how to make the sync happen.
    Thanks

    If you are putting Macs in a LARGE business environment then bookmark the site www.MacWindows.com. They do nothing then connect lone macs into Windows Domains. Pay attention to the links on side panel of the slash page to get to the section you want to read the reader reports.

  • Portable Home Directories and OS 10.6.3

    It appears background syncing of users home folders was not working correctly/automatically in OS 10.6.2 client and OS 10.6.2 server.
    I recently upgraded to OS 10.6.3 client and it appears background syncing of home folders is now working to OS 10.6.2 server. Unfortunately, users are now getting home sync errors galore...
    Message: "An error occurred reading or writing the file. Please try again later" or "There is a home sync conflict." The latter error is not unusual, but the user selected "keep latest" and the same error returned three times.
    Has anyone else been experience this issue.

    We have hade the same issue popping up on a number of machines. All the errors concern open files. All running 10.6.3 client. Running 10.5.8 on the server though. Have been running the same set up for months without these errors popping up prior.
    The log shows 10-15 of these
    10/04/13 20:26:36.766 EXCEPTION: Resource temporarily unavailable
    10/04/13 20:26:36.766 <ERROR> network: MODIFY "Library/Application Support/Firefox/Profiles/default.7o9/.parentlock" {(Priority=1, EXECUTING)} (-[SStoreFileOperator_FS _openFile] (StoreFileOperator-FS.m:1350): open('/Users/networkaccounts/username/Library/Application Support/Firefox/Profiles/default.7o9/.parentlock', oflag=0x14, ...)--> Error Domain=NSPOSIXErrorDomain Code=35 UserInfo=0x1185c4df0 "Resource temporarily unavailable")
    But then the last entry is more interesting
    10/04/13 20:27:34.446 EXCEPTION: data writeToFile:'/Volumes/home/username/.FileSync/PHD-R-sHtPZTmmqR6-username.FileSy ncHistory' options:0 error:&error (Cocoa error 512)

  • Portable Home Directories, FileSyncAgent, and Case-sensitive drives

    I have a 10.5.3 Server machine that is serving (via NFS) home directories to a mixed group of Leopard (10.5.3) and Linux clients. The drive containing user home directories is formatted to be case-sensitive. I also use Portable Home Directories and mobile accounts on all the Leopard clients. Many of the client machines have case-insensitive drives.
    FileSyncAgent is dying on the client machines with a lot of "Reverification failed" messasges in ~/Library/Logs/FileSyncAgent.log. The files being verified often have mixed case file names, while the error messages show lower case file names.
    Anyone else seeing FileSyncAgent dying on every home sync?

    Hi Guys, So far I have found what seems to be a fix for this issue. I was also having the issue happen to me around some iphoto file but that seems to be coincidental. I will detail what I did below but please first backup the mobile account on the local machine as you will need to recreate it.
    Backup the local mobile home folder
    Log into a admin account and delete the mobile account under the Accounts Pane in System Prefs
    Log into the users Network account on the notebook
    Delete all the following items
    ~/Library/Application Support/SyncServices
    ~/Library/Mirrors
    ~/Library/Preferences/ByHost/com.apple.syncservices.*
    ~/Library/Preferences/com.apple.filesync.plist
    ~/Library/Preferences/com.apple.homesync.plist
    ~/Library/Preferences/com.apple.LaunchServices.plist
    ~/Library/Preferences/com.apple.syndication.plist
    ~/Library/Preferences/Syndication
    Logout of the Network account and then back in
    Recreate the Mobile Account
    From this point on I have not seen any issues with the FileSyncAgent crashing. Omit any of the files listed above that do not exist. I generally have the notebooks sync on login and logout and I forced a sync while logged in to make sure everything was okay and so far so good. Hope this helps.

  • Disabling portable home directories? (network wide)

    We're fed up with portable home directories and the constant sync errors they throw up.
    Can I just turn off PHD to make it function as it did before?
    How best to go about this?

    If you just want to up and shut down the entire portable home directory, and some of your users use it and some don't, the best way would be to select all the users in the directory at the same time and go to the preferences area.  Hit the Mobile button, and turn off everything that has to do with portable home directories.
    I have a bunch of users that also find they get sync errors. 
    95 times out of 100 the problems are solveable if the user just reads the sync problem.
    With a friendly attitude, point out that they just have to read the error.  Perhaps explain what it means...  If you do this once, your users will usually figure it out the next time it happens.
    Also, remember that sync errors don't have to solved right away.  You can fix it later.
    HTH
    -Graham

  • Very slow login/logout with Portable Home Directories

    I've set up Portable Home Directories for our department so that people can work from different computers if need be (also, I think our network is too slow to use network home directories). However, the login times are excruciating - some users report average 45 minute login times. None of these users are moving huge files or anything, and even if I just log someone out (completing the sync) and then log back in, the login will be very slow.
    If I disconnect the computers from the network, obviously it logs in quickly because it can't connect to the server, but I don't want to do that (or disable login/logout sync altogether). I tried removing things from the login/logout sync rules, but often the sync takes time just on 'Finishing' or 'Stopping', so I don't think that it's any particular files that take a lot of time.
    On a possibly related note, for some reason our computers all take perhaps 30 seconds to get an IP address when starting up, waking up from sleep, etc. Is there any reason why the computer would need to be doing this repeatedly? Especially on logout, this wouldn't seem relevant, but I've seen that mentioned in other threads.
    Thanks in advance for any advice,
    Greg

    Apple Discussions has a special forum just for Portable Home Directories, you might want to search and/or post your question there:
    http://discussions.apple.com/forum.jspa?forumID=1249

  • Portable Home Directories in 10.8 Server?

    I have a Mac mini Server running 10.6.8. Now that 10.8 is out, Apple will probably stop supporting 10.6 (as is their policy) and that means either slowly eroding security or moving to 10.8. I have been looking at the documentation and it seems underneath it all is still by an large the same basic unix-stuff like postfix, dovecot, a dns system, etc. Giving the lack of support for GUI-managing the more complex setups, I'll probably be doing it command-line (stuff like multiple virtual mail domains, multiple web domains, etc.). Not fun (and a business opportunity for some enterprising software engineer).
    But what I haven't been able to see in the documentation or anywhere else is Portable Home Directories. In my current setup, I have a 10.6.8 Server and 10.7 clients. On these clients is a single local administrator acocunt and the rest are 'managed mobile accounts'. These are local acocunts. They work when away form the network on which the server is, but when in range of the server, the server may push settings and stuff. And on login/logout and when connected to the LAN and during work, the home directory of the user is constantly synchronized with a copy of the user's home directory on the server. This means my users can take any computer and get their own account and a synchronized copy of their home directory. They can also take a laptop off line for a while and when they return to my LAN (either physically or by VPN), any changes will be synced. This is a sweet setup and it works with 10.7 clients and 10.6.8 server.
    But what I haven't been able to find if this will still work with 10.8 Server. I have looked at teh 10.8 Server documentation and haven't found anything about it. Will it still work somehow and if not, is there a good alternative?

    Gerben Wierda wrote:
    Or: you create the users anew in the network directory, you replace their home directories with the content of what is on the MacBook (TDM is your friend) and do the chmod. Easier still.
    That way, I suggest the migration in that way; because, you can test everything out before the data gets moved over. There's nothing like something going wrong in the setup/migration, and you have to do it all over again.
    Kirk, you can always put the Home directories/folder on an external. But if you do, you'll probably want to run this command in Terminal:
    sudo defaults write /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisksWithoutUserLogin -bool YES
    That sets the system-wide setting to mount external HDs on startup. The default behavior  in OS X, probably around 10.3 onward (but Apple may have flip-flopped on this), is to mount externals on user GUI-login, not on startup like internal HDs. The default behavior is a huge problem with network users, whose home directories reside on the external, since the external on GUI login often mounts "too late" and new "phantom" home directories are created (along with warning messages that the home directory can't be found) and you sometimes get duplicate mount points. In short, the default behavior creates a bit of mess. To spare you some frustration, run that command, which will mount the externals on startup, so the home folders are always available.
    It's also handy if you plan on creating other shares on the external; it prevents some flaky behavior.
    Gerben's "general description" can be applied to Lion and Mountain Lion, although with Mountain Lion you have fewer tools, and you'll often be working in Server.app rather than some of the older tools like Server Admin.
    Again, basically you need to:
    (1) Setup file sharing, where you designate a directory/folder as a share to hold the network home directories. On the default install, Apple makes /Users a share, and you could (similar to what Gerben did) use that to hold not only local accounts' but also the network accounts' home directories. In that setup all users' home directories reside in the same place. All you have to do then is check the box "Make available for home directories over" and leave "AFP". See below; note the very last checkbox; that needs to be checked:
    I preferred to keep the local and network users separate, so I actually use a different share for the network users, and not /Users. If you go that route, pay attention to the permissions, it's somewhat easy to get them wrong. I think I cheated and used Carbon Copy Cloner to clone the /Users directory to another HD, then just renamed the directory. FYI you're actually not seeing this in these screen shots, since I'm using a "fresh install" virtual machine to make the screen shots.
    Also if you don't need it, I'd probably uncheck "Share with Windows clients (SMB).
    2. You need to setup Open Directory, so you can manage Network Users. Since you want portable home directories, then you might consider using Profile Manager (introduced in Lion Server), which is Apple's latest tool for that. You can also download separate Workgroup Manager as well. Not sure which is better, or exactly why there are both. I think the documention indicated for older pre-Lion OSes, Workgroup Manager is still around.
    2a - If you go straight to Profile Manager, and set it up, it will first make you setup Open Directory, then the rest of the setup for Profile Manager itself.
    2b - Or you can always "two-step", first setup Open Directory, then later if you want "Profile Manager".
    3. Once you have OD (step 2), and the share setup for network home directories (step), you use Server.app to create the network users, and assign their home directory to the share not local. Note the entry "Home Folder"; use the pull-down menu to select your share. See below.
    If you forget to set the Home Folder, you can always "edit" the user and change the Home Folder to the share, and not Local Only.
    4. To get portable Home directories, I'm pretty sure you're going to have to setup and activate Profile Manager or use Workgroup Manager. Sorry not much details I can provide there, I've only played with it a bit, and was planning on upgrading my MacBook Pro to Mountain Lion before giving it a go again.

  • Portable Home Directories on ReadyNAS

    I have a MacMini runing OS X 10.6 in an environment with about 15 users.  Portable Home Directories are currently setup and working on the server.  The server is almost out of space and I would like to move these PHD's to a ReadyNAS and have them sync properly.
    I am having a tough time figuring this out.  I have created shares on the ReadyNAS and can access the shares without a problem.
    Through Server Admin I have tried both AFP and NFS shares.  I can successfully create a user's home drive on either type of share. 
    When I share by NFS I can log in as a user and it tries to begin syncing.  It gets stuck on connecting to network drive and then gives me an error that the NFS share is not available.
    If I share via AFP I get a message that says the user cannot login due to an error. 
    I have searched quite a bit and have found that PHD's are not documented very well.  Does anyone have experience with PHD's and a ReadyNAS?  If so I would appreciate any help.

    Hi Guys, So far I have found what seems to be a fix for this issue. I was also having the issue happen to me around some iphoto file but that seems to be coincidental. I will detail what I did below but please first backup the mobile account on the local machine as you will need to recreate it.
    Backup the local mobile home folder
    Log into a admin account and delete the mobile account under the Accounts Pane in System Prefs
    Log into the users Network account on the notebook
    Delete all the following items
    ~/Library/Application Support/SyncServices
    ~/Library/Mirrors
    ~/Library/Preferences/ByHost/com.apple.syncservices.*
    ~/Library/Preferences/com.apple.filesync.plist
    ~/Library/Preferences/com.apple.homesync.plist
    ~/Library/Preferences/com.apple.LaunchServices.plist
    ~/Library/Preferences/com.apple.syndication.plist
    ~/Library/Preferences/Syndication
    Logout of the Network account and then back in
    Recreate the Mobile Account
    From this point on I have not seen any issues with the FileSyncAgent crashing. Omit any of the files listed above that do not exist. I generally have the notebooks sync on login and logout and I forced a sync while logged in to make sure everything was okay and so far so good. Hope this helps.

  • Home Sharing, Network accounts with Portable Home Directories, iTunes 10

    I am using OS X Server an on that server is my account. I am also using a MBA with that same account using portable home directories (PHD). The MBA home directory does not contain my iTunes music, that is somewhere in /Users/Shared, because I do not want the added burden of encryption (the home dir is FileVault protected on the MBA, but not on the server)
    Thusfar, I worked on the MBA with iTunes and used rsync to sync with the server. There are reasons I want to stop that route (which are not important for the question)
    I have just upgraded to iTunes 10 before trying the following:
    1. Enable home sharing on the server
    2. Look for shared libraries on the MBA
    And found out that my account on the server needs to be logged in permanently and iTunes running to use Home Sharing that way. That stops the ordinary syncing of PHD so that is not a solution. Besides, I do not want to have an account logged in all the time.
    So, given the scenario that I want full two-way syncing of my iTunes library between my computers and that I prefer not to have an account logged in on the server, is there a solution?

    I ended up creating a dedicated local account for iTunes serving on my mini server.

  • Portable Home Directories - Migrating from a PowerBook to MacBook Pro

    On my Powerbook, I'm using one account as PHD. Now, I bought a new MacBook Pro and at the initial setup, I transferred all data from the old Powerbook to the new MacBook Pro, including accounts.
    When I now login the first time to the Mac OS X Server from the new Mac with the PHD account, do I have to take care of anything in particular? Does the sync work as usual?
    Thanks for your promt help!
    Thomas
    MacBook Pro   Mac OS X (10.4.7)  

    I'm going to take a wild stab in the dark here:
    When you logged on to the new Macbook Pro, was it on an account that you set up locally on that machine? One perhaps with the same user short name as your Server account?
    The way this works is, when you enter a username in the login panel, the Mac OS client looks into it's own local machine database (Netinfo) to find out if that client exists. If not, it checks the servers it's bound to in the "Authentication" tab of Directory Access and checks there.
    So if your old Powerbook was using an account named "kirk", which is exists on your server and synced as a Portable Home Directory, and then you created a new account on your new Macbook named "kirk", your Macbook's OS won't even look on the server because it found a "kirk" locally.
    If this is what happened, just do this: create a new administrator account on your MacBook, log into it, and delete your fresh new Macbook "kirk" user. Log out. At the login window, select "Other" and use your server "kirk" login. Now you'll get the option to copy your server-based home directory as a PHD.

  • Does a 10.7 client work with a 10.6.8 server with portable home directories??

    Subject says it all. I need to move to 10.7 on the clients because I need XCode. But 10.7 Server seems dumbed-down, brittle and bug-ridden, so I'd rather stay at 10.6.8 server for the time being. I know already from some off site users of my server that mail works fine between 10.7 clients and 10.6.8 server. But what about mobile accounts and portable home directories? That is a very important feature for me.

    It seems to work. Slow and I have seen it hang at logout once (had to force shutdown the machine), maybe because I had two clients open at the same time.

  • Moving Portable Home Directories from one server to another

    I am in the process of migrating users from an older xserve running 10.3 with open directory to a new xserve running 10.5. So far, everything is looking good with the migration, the only major issue I'm running into in my testing is with Portable Home Directories. Presently, the portable home directory on the computer still points to the old server for existing user accounts after they are moved to the new open directory server. On the 10.3 server, the home directories are all mounted under /Volumes/Home, where on Leopard it appears it wants to create the shares under /Volumes/ServerName/Folder. Granted, at present the original server's Home Folders are on a fiber attached raid and in testing I don't have this available. Any suggestions on a way to test easily without moving the raid? Also, is there an easy way to do a mass change on user machines where if I move my raid over to the new server, I can make sure that users data is being backed up to the proper location?
    Sorry for the lengthy post, just trying to make sure I'm covering all my bases, heh.

    Antonio, thanks for the response. I do have one more question regarding this. On the client side, the mirrors.plist file references the old server FQDN and share name. Because this will be being moved over to the new server, is there an easy method to update the clients mirror plist without breaking the PHD mirror? My big concern here is that either the users will not be able to synchronize phd's or we will have to re-establish all the phd's from the client machines to the server. My thought here is simply using a cname to direct any traffic still trying to hit the old server name to the new server name.

  • Portable Home Directories usage

    Hi, I think I see where portable home directory is good for laptop users that might be away from server at times. Would one sugget this for a remote home user that has an iMac who wants to connect to their server, hve it secure (VPN?), have access files on the server from home, yet be able to run the home iMac as a stand alone, not-connected to the server at all times. There's a high speed cable connection at each end. Thanks - Lewis

    I came across this information a while back. Not exactly what you are looking for but contains good information on how you might achieve what you want to do. WARNING: this is not for the faint of heart. It take deep technical knowledge of the inner workings of OS X and LDAP.
    http://managingosx.wordpress.com/2006/03/15/portable-home-directories-without-op en-directory/

Maybe you are looking for

  • Downloading Vendor Email ID in SRM

    Hi, Need to download Vendors Email ID for all vendors in SRM,w/o help of Query and ABAP. I am aware of table BUT000 and ADR6..and ADR6 stores all vendor Email's but i am not able to find a linking table between BUT000 and ADR6. The Address field in B

  • ITunes appends incrementing number to file name

    Hi, I noticed that with some of my mp3 files iTunes 6 keeps on creating copies of them, appends an incrementing number to the file name and adds the new file to my iTunes library, which means I end up with multiple copies of the same song in my libra

  • Apple tv from US in Australia

    I am an American with an American Address but going on assignment in Australia, will my apple tv2/netflix work there?  I have a macbook pro that is unable to access netflix when over there temporarily which works fine back in the states.  any advice?

  • Investing in new laptop-Will Premiere Pro CS6 run OK?

    I'm planning to buy a computer with the following specs: NVIDIA GeForce GT745, Core i7-4700MQ, 8GB RAM, 1000GB HDD/SSD Will this PC meet the performance requirements for Adobe Premiere Pro CS6?

  • EliteBook 8570p Fingerprint Sensor Issue and Windows 8 and 8.1 Built-In Biometric Framework

    Hello there, i'm currently testing the Preview Build of Windows 8.1 on my HP EliteBook 8570p and have a small Problem using the Fingerprint... but back to start... In Windows 8 there wheren't any microsoft builtin biometric framework, to get the fing