Bug 236533 - Autofs-configured home dirs are not mounted on login
Summary: Autofs-configured home dirs are not mounted on login
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: gdm
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ray Strode [halfline]
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC7Blocker
TreeView+ depends on / blocked
 
Reported: 2007-04-16 08:33 UTC by Mikko Huhtala
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-04-19 11:55:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mikko Huhtala 2007-04-16 08:33:08 UTC
== Description of problem:

Users are on OpenLDAP. Directories under /home are automounted using
NFS v3 and autofs. The autofs config is as follows:

/etc/nsswitch.conf:

  passwd:     files ldap
  shadow:     files ldap
  group:      files ldap
  automount:  files

/etc/auto.master

  /home      /etc/auto.home

/etc/auto.home:

  * -rw,nosuid,nodev,hard,intr,udp,nfsvers=3  server.domain:/local/export/home/&


Login from a virtual console works as expected. Home directories get
mounted automatically. Login from gdm results in a 'home directory
does not exist' error if the home directory is not already
automounted. If the automount has been triggered by login from a
virtual console or by root doing e.g. ls /home/user, then login from
gdm works as expected.

The gdm config is the F7 default, except the 'include all users from
/etc/passwd' option is disabled from the gdm config dialog (the LDAP
database contains a large number of users). No user icons are
displayed in the login screen. I tried disabling all the home directory
related security settings (check home dir owner, permissions), but
they have no effect.

== Version-Release number of selected component (if applicable):

  gdm-2.18.0-10.fc7
  autofs-5.0.1-7
  kernel-2.6.20-1.3069.fc7

== How reproducible:

Always (when home dir not already mounted when login is attempted).

== Steps to Reproduce:

1. Configure a user home directory to be automounted.

2. Reboot or otherwise make sure that all automounted dirs are unmounted.

3. Log in from gdm as said user.
  
== Actual results:

'Home directory does not exist' error.

== Expected results:

Home directory should get automounted (it does on login from a virtual
console) and the X session should start normally.

Comment 1 Ray Strode [halfline] 2007-04-17 14:05:10 UTC
can you set Enable=true in the [debug] section of /etc/gdm/custom.conf and post
/var/log/messages after trying to login and failing?

Comment 2 Mikko Huhtala 2007-04-18 20:23:41 UTC
Here's the bit from /var/log/messages with debugging turned on. Not terribly
enlightening, I'm afraid. The gdm package version was updated to
gdm-2.18.0-11.fc7 (no effect on the problem).

This is off-topic, but I've had other rather strange problems with autofs in F7.
For example, each user has an autofs-configured directory /scratch/user for data
that is not backed up from the NFS server. The autofs configuration is exactly
the same as for /home, except 'home' is replaced with 'scratch'. For some
reason, the scratch directories get mounted *read-only*. If I turn autofs off
and mount a scratch directory manually, I get read-write, so the server side
should be ok (and it works for other machines running FC6 anf FC5). I have
absolutely no idea why I get read-only with autofs.

Anyhow, the log:

--

Apr 18 23:03:59 urquell gdmgreeter[5907]:   Got response: 'GDM 2.18.0'
Apr 18 23:03:59 urquell gdmgreeter[5907]: Sending command: 'ATTACHED_SERVERS'
Apr 18 23:03:59 urquell gdm[5826]: Handling user message: 'ATTACHED_SERVERS'
Apr 18 23:03:59 urquell gdmgreeter[5907]:   Got response: 'OK :0,,7'
Apr 18 23:03:59 urquell gdmgreeter[5907]: Sending command: 'CLOSE'
Apr 18 23:03:59 urquell gdm[5826]: Handling user message: 'CLOSE'
Apr 18 23:03:59 urquell gdm[5884]: gdm_slave_wait_for_login: In loop
Apr 18 23:04:10 urquell gdm[5884]: Sending QUERYLOGIN == <secret> for slave 5884
Apr 18 23:04:10 urquell gdm[5826]: Handling message: 'QUERYLOGIN 5884 mhuhtala'
Apr 18 23:04:10 urquell gdm[5826]: Got QUERYLOGIN mhuhtala
Apr 18 23:04:10 urquell gdm[5884]: gdm_slave_wait_for_login: end verify for
'mhuhtala'
Apr 18 23:04:10 urquell gdm[5884]: gdm_slave_wait_for_login: got_login for
'mhuhtala'
Apr 18 23:04:10 urquell gdm[5884]: Sending LOGGED_IN == 1 for slave 5884
Apr 18 23:04:10 urquell gdm[5826]: Handling message: 'LOGGED_IN 5884 1'
Apr 18 23:04:10 urquell gdm[5826]: Got logged in == TRUE
Apr 18 23:04:10 urquell gdm[5884]: Sending LOGIN == <secret> for slave 5884
Apr 18 23:04:10 urquell gdm[5826]: Handling message: 'LOGIN 5884 mhuhtala'
Apr 18 23:04:10 urquell gdm[5826]: Got LOGIN == mhuhtala
Apr 18 23:04:10 urquell gdm[5884]: gdm_slave_session_start: Attempting session
for user 'mhuhtala'
Apr 18 23:04:10 urquell gdm[5884]: gdm_slave_session_start: Home directory for
mhuhtala: '/home/mhuhtala' does not exist!
Apr 18 23:04:10 urquell gdm[5884]: Sending SHOW_YESNO_DIALOG == <secret> for
slave 5884
Apr 18 23:04:10 urquell gdm[5826]: Handling message:
'opcode=SHOW_YESNO_DIALOG$$pid=5884$$yesno_msg=Your home directory is listed as:
'/home/mhuhtala' but it does not appear to exist.  Do you want to log in with
the / (root) directory as your home directory? It is unlikely anything will work
unless you use a failsafe session.'
Apr 18 23:04:17 urquell gdm[5884]: Running gdm_verify_cleanup and pamh != NULL
Apr 18 23:04:17 urquell gdm[5884]: Running pam_close_session
Apr 18 23:04:17 urquell gdm[5884]: Running pam_setcred with PAM_DELETE_CRED
Apr 18 23:04:17 urquell gdm[5884]: Sending LOGGED_IN == 0 for slave 5884
Apr 18 23:04:17 urquell gdm[5826]: mainloop_sig_callback: Got signal 17
Apr 18 23:04:17 urquell gdm[5826]: Handling message: 'LOGGED_IN 5884 0'
Apr 18 23:04:17 urquell gdm[5826]: Got logged in == FALSE
Apr 18 23:04:17 urquell gdm[5884]: Sending LOGIN == <secret> for slave 5884
Apr 18 23:04:17 urquell gdm[5826]: Handling message: 'LOGIN 5884 '
Apr 18 23:04:17 urquell gdm[5826]: Got LOGIN == 
Apr 18 23:04:17 urquell gdm[5884]: gdm_slave_run: checking notifies
Apr 18 23:04:17 urquell gdm[5884]: gdm_slave_wait_for_login: In loop


Comment 3 Mikko Huhtala 2007-04-19 11:55:35 UTC
I tried switching to the auto.master map that is in the LDAP database
('automount: ldap' in /etc/.nsswitch.conf). This did not work earlier, and I
assumed that it was because autofs 5.0 was incompatible with out database. This
was also the reason I used local autofs configuration in the first place. Now,
everything just works. Auto.master comes from LDAP, everything gets mounted with
the right permissions and logins from gdm work, too.

I have no idea what the problem was and how it got fixed. Autofs was updated
yesterday to autofs-5.0.1-9 and it has some patches that seem relevant, so I'm
assuming that that did the trick.

Comment 4 Ray Strode [halfline] 2007-04-19 15:54:07 UTC
excellent.  Thanks.


Note You need to log in before you can comment on or make changes to this bug.