Bug 462078 - su - fails the first time when home directory is mounted with autofs
su - fails the first time when home directory is mounted with autofs
Status: CLOSED DUPLICATE of bug 371341
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: autofs (Show other bugs)
5.1
All Linux
medium Severity high
: rc
: ---
Assigned To: Jeff Moyer
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-12 09:44 EDT by Rafael Garabato
Modified: 2008-09-15 14:09 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-15 14:09:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Rafael Garabato 2008-09-12 09:44:12 EDT
Description of problem:

There seams to be a delay when changing to a user whose /home/ directory is mounted with autofs. As a consecuence, the first time I log in with "su - user" the systems says it couldn't cd to the /home/user directory. When I try again the cd succeeds. See actual results.
I don't know if it has anything to do but I disabled selinux, the firewall and iptables. The problem persisted after this.

Version-Release number of selected component (if applicable):
autofs-5.0.1-0.rc2.55

How reproducible:
I am using Rocks+ which is a cluster provisioning system to configure Red Hat.
Every time I install with Rocks+ it  fails, however I think that the problem is in autofs or su commands

Steps to Reproduce:
See actual results. After the first try the /home/* directory will be mounted. To reproduce again, restart the system; or wait to the /home/user directory to be unmounted automatically by autofs. Manually unmounting the folder does not reproduce the issue.



  
Actual results:
[root@rocksrhml ~]# su - icr
su: warning: cannot change directory to /home/icr: No such file or directory
[icr@rocksrhml root]$ exit
logout
[root@rocksrhml ~]# su - icr
[icr@rocksrhml ~]$ exit
logout
[root@rocksrhml ~]# cat /etc/auto.
auto.home    auto.master  auto.misc    auto.net     auto.share   auto.smb
[root@rocksrhml ~]# cat /etc/auto.
auto.home    auto.master  auto.misc    auto.net     auto.share   auto.smb
[root@rocksrhml ~]# cat /etc/auto.master
/share /etc/auto.share --timeout=1200
/home  /etc/auto.home  --timeout=1200

[root@rocksrhml ~]# cat /etc/auto.home
install         rocksrhml.local:/export/home/&
icr     rocksrhml.local:/export/home/icr

[root@rocksrhml ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.1 (Tikanga)
[root@rocksrhml ~]# mount
/dev/sda3 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda6 on /state/partition1 type ext3 (rw)
/dev/sda2 on /var type ext3 (rw)
/dev/sda1 on /boot type ext2 (rw)
tmpfs on /dev/shm type tmpfs (rw)
tmpfs on /var/lib/ganglia/rrds type tmpfs (rw,size=1012335000,gid=99,uid=99)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
/state/partition1/home/icr on /home/icr type none (rw,bind)
[root@rocksrhml ~]# cat /etc/fstab
LABEL=/1                /                       ext3    defaults        1 1
LABEL=/state/partitio1  /state/partition1       ext3    defaults        1 2
LABEL=/var1             /var                    ext3    defaults        1 2
LABEL=/boot             /boot                   ext2    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda5         swap                    swap    defaults        0 0

# The ram-backed filesystem for ganglia RRD graph databases.
tmpfs /var/lib/ganglia/rrds tmpfs size=1012335000,gid=nobody,uid=nobody,defaults 1 0


Expected results:


Additional info:
Comment 1 Jeff Moyer 2008-09-12 10:12:35 EDT
What kernel version?  This was fixed in the 5.1 z-stream and in 5.2.

Cheers,

Jeff
Comment 2 Rafael Garabato 2008-09-12 10:20:00 EDT
[root@rocksrhml ~]# cat /proc/version
Linux version 2.6.18-53.el5 (brewbuilder@hs20-bc1-7.build.redhat.com) (gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)) #1 SMP Wed Oct 10 16:34:19 EDT 2007
Comment 3 Rafael Garabato 2008-09-12 10:36:25 EDT
[root@rocksrhml ~]# cat /proc/version
Linux version 2.6.18-53.el5 (brewbuilder@hs20-bc1-7.build.redhat.com) (gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)) #1 SMP Wed Oct 10 16:34:19 EDT 2007
Comment 4 Jeff Moyer 2008-09-12 10:46:20 EDT
Right, you need to upgrade your kernel.  The latest z-stream kernel for RHEL 5.1 is:

kernel-2.6.18-53.1.21.el5

Pleast update to this kenrel and report back.  This is most likely a duplicate of bug 371341.
Comment 5 Rafael Garabato 2008-09-12 11:10:27 EDT
Thank you for your help. Great support.
Comment 6 Jeff Moyer 2008-09-15 12:47:00 EDT
(In reply to comment #5)
> Thank you for your help. Great support.

Did you manage to test the new kernel?  Can we close this as a duplicate of bug 371341?

Thanks!
Comment 7 Rafael Garabato 2008-09-15 14:01:03 EDT
You can close it. I didn't test the new kernel as I have a kernel version constraint. However, I found a workaround in the duplicate bug.
Comment 8 Jeff Moyer 2008-09-15 14:09:17 EDT
(In reply to comment #7)
> You can close it. I didn't test the new kernel as I have a kernel version
> constraint. However, I found a workaround in the duplicate bug.

OK, thanks for the update.

Cheers.

*** This bug has been marked as a duplicate of bug 371341 ***

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