I run home directories for 115,000 users out of OpenAFS.  Sometimes, just to spite the user, we have an outage, network blip, or some other planetary alignment that prevents your home directory from being available.  Sucks to be you.

For my Linux workstations I support, I’d really like to setup GDM to detect this and go into save the day mode.  Create a directory in /tmp, toss the user in there, altert them with a dialog, and continue with a semi-normal session.

With SSH and normal terminal sessions this works with some fairly simple scripting. Detect the problem, set the HOME environment variable to a temporary directory, copy in /etc/skel, alter the user, off they go. However, I’ve never had much success doing with in the GDM controled environment. The script integration points always use their own, made on the spot, environments, and altering them does no good. The Gnome bits are also quick to query the system libraries to find your home directory again as well. I guess I can’t fault that as that should also be a “propper” way to find your home directory. Nautilus tosses up some evil looking errors to the user and you can’t get rid of them.

I’ve been trying to get a script in /etc/X11/xinit/xinitrc.d to at least let a user log in semi-normally. I’ve had some success in altering your HOME environment variable there. Your session will start, Gconf blows up badly, and Nautilus errors even worse. But it does work. What really grinds my gears is still in 2010 we have issues with environment variables here. In terminal/ssh mode I set a TMPHOME variable to indicate we are working under emergency conditions. However, if I set that variable in my xinitrc script, that will blow up the user session. Log in all you want, all you ever see is the GDM Simple Greeter.

At least I have some form of getting the feature I want. In the future, I think I will make the automounter use a program to find the maps to your home directory rather than directly using the LDAP maps. I can detect this condition then and re-route your home directory. Now, if only my current LDAP setup used the automounted-path for the “homeDirectory” attribute rather than the direct AFS path. Sigh…

Previous | Back | Next

comments powered by Disqus