<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
On 05/17/2011 02:03 AM, nasir nasir wrote:
<blockquote cite="mid:659951.27052.qm@web161316.mail.bf1.yahoo.com"
type="cite">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="font: inherit;" valign="top">
<div style="font-family: arial; font-size: 10pt;">Further
to my previous mail, let us try to isolate it even more
by comparing the login attempts to the NFS
server(hugayat.cohort.org) and another IPA
client(rhel.cohort.org)</div>
<div style="font-family: arial; font-size: 10pt;"><br>
</div>
<div style="font-family: arial; font-size: 10pt;">This is
the relevant /var/log/message in the two cases</div>
<div style="font-family: arial; font-size: 10pt;"><br>
</div>
<div style="font-family: arial; font-size: 10pt;"><b>1.
ssh -l nasir hugayat.cohort.org</b></div>
<div>
<div style="font-family: arial; font-size: 10pt;
font-weight: bold;"><br>
</div>
<div style="font-family: arial; font-size: 10pt;">May 17
07:45:14 hugayat automount[15767]: get_query_dn:
lookup(ldap): found search base under
cn=automount,dc=cohort,dc=org</div>
<div style="font-family: arial; font-size: 10pt;"> 12
May 17 07:45:14 hugayat automount[15767]:
get_query_dn: lookup(ldap): found query dn
automountmapname=auto.home,cn=default,cn=automount,dc=cohort,dc=org</div>
<div style="font-family: arial; font-size: 10pt;"> 13
May 17 07:45:14 hugayat automount[15767]: connected to
uri <a class="moz-txt-link-freetext" href="ldap://192.168.1.240">ldap://192.168.1.240</a></div>
<div style="font-family: arial; font-size: 10pt;"> 14
May 17 07:45:14 hugayat automount[15767]: lookup_one:
lookup(ldap): searching for
"(&(objectclass=automount)(|(automountKey=nasir)(automountKey=/)(automountKey=\2A)))"
under "automountmapname=auto.ho
me,cn=default,cn=automount,dc=cohort,dc=org"</div>
<div style="font-family: arial; font-size: 10pt;"> 15
May 17 07:45:14 hugayat automount[15767]: lookup_one:
lookup(ldap): getting first entry for
automountKey="nasir"</div>
<div style="font-family: arial; font-size: 10pt;"> 16
May 17 07:45:14 hugayat automount[15767]: lookup_one:
lookup(ldap): examining first entry</div>
<div style="font-family: arial; font-size: 10pt;"> 17
May 17 07:45:14 hugayat automount[15767]:
lookup_mount: lookup(ldap): nasir ->
-fstype=nfs4,rw,sec=krb5,soft,rsize=8192,wsize=8192
hugayat.cohort.org:/xtra/home/&</div>
<div style="font-family: arial; font-size: 10pt;"> 18
May 17 07:45:14 hugayat automount[15767]: parse_mount:
parse(sun): expanded entry:
-fstype=nfs4,rw,sec=krb5,soft,rsize=8192,wsize=8192
hugayat.cohort.org:/xtra/home/nasir</div>
<div style="font-family: arial; font-size: 10pt;"> 19
May 17 07:45:14 hugayat automount[15767]: parse_mount:
parse(sun): gathered options:
fstype=nfs4,rw,sec=krb5,soft,rsize=8192,wsize=8192</div>
<div style="font-family: arial; font-size: 10pt;"> 20
May 17 07:45:14 hugayat automount[15767]: parse_mount:
parse(sun):
dequote("hugayat.cohort.org:/xtra/home/nasir") ->
hugayat.cohort.org:/xtra/home/nasir</div>
<div style="font-family: arial; font-size: 10pt;"> 21
May 17 07:45:14 hugayat automount[15767]: parse_mount:
parse(sun): core of entry:
options=fstype=nfs4,rw,sec=krb5,soft,rsize=8192,wsize=8192,
loc=hugayat.cohort.org:/xtra/home/nasir</div>
<div style="font-family: arial; font-size: 10pt;"> 22
May 17 07:45:14 hugayat automount[15767]: sun_mount:
parse(sun): mounting root /home, mountpoint nasir,
what hugayat.cohort.org:/xtra/home/nasir, fstype nfs4,
options rw,sec=krb5,soft,rsize=8192,wsiz e=8192</div>
<div style="font-family: arial; font-size: 10pt;"> 23
May 17 07:45:14 hugayat automount[15767]: mount_mount:
mount(nfs): root=/home name=nasir
what=hugayat.cohort.org:/xtra/home/nasir, fstype=nfs4,
options=rw,sec=krb5,soft,rsize=8192,wsize=8192</div>
<div style="font-family: arial; font-size: 10pt;"> 24
May 17 07:45:14 hugayat automount[15767]: mount_mount:
mount(nfs): nfs
options="rw,sec=krb5,soft,rsize=8192,wsize=8192",
nosymlink=0, ro=0</div>
<div style="font-family: arial; font-size: 10pt;"> 25
May 17 07:45:14 hugayat automount[15767]: mount_mount:
mount(nfs): calling mkdir_path /home/nasir</div>
<div style="font-family: arial; font-size: 10pt;"> 26
May 17 07:45:14 hugayat automount[15767]: mount_mount:
mount(nfs): <b>nasir is local, attempt bind mount</b></div>
</div>
</td>
</tr>
</tbody>
</table>
</blockquote>
<br>
I'm guessing that there is some policy enforced by the NFS server
here that lets you do something like this. <br>
...and here's the source code....<br>
<br>
<a class="moz-txt-link-freetext" href="http://autofs5.sourcearchive.com/documentation/5.0.4-2/mount__nfs_8c-source.html">http://autofs5.sourcearchive.com/documentation/5.0.4-2/mount__nfs_8c-source.html</a><br>
Here's the comment right above the line that generates that message.<br>
<pre class="fragment"><span class="comment"> * If the "port" option is specified, then we don't want</span>
<span class="comment"> * a bind mount. Use the "port" option if you want to</span>
<span class="comment"> * avoid attempting a local bind mount, such as when</span>
<span class="comment"> * tunneling NFS via localhost.</span></pre>
<br>
So no surprise that the behavior is different on the NFS server than
the rest of the cluster.<br>
<br>
<blockquote cite="mid:659951.27052.qm@web161316.mail.bf1.yahoo.com"
type="cite">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="font: inherit;" valign="top">
<div>
<div style="font-family: arial; font-size: 10pt;"> 27
May 17 07:45:14 hugayat automount[15767]: mount_mount:
mount(bind): calling mkdir_path /home/nasir</div>
<div style="font-family: arial; font-size: 10pt;"> 28
May 17 07:45:14 hugayat automount[15767]: mount_mount:
mount(bind): calling mount --bind -s -o defaults
/xtra/home/nasir /home/nasir</div>
<div style="font-family: arial; font-size: 10pt;"> 29
May 17 07:45:14 hugayat automount[15767]: mount_mount:
mount(bind): mounted /xtra/home/nasir type bind on
/home/nasir</div>
<div style="font-family: arial; font-size: 10pt;
font-weight: bold;"><br>
</div>
<div style="font-family: arial; font-size: 10pt;"><b>2.
ssh -l rhel.cohort.org</b></div>
<div style="font-family: arial; font-size: 10pt;
font-weight: bold;"><br>
</div>
<div style="font-family: arial; font-size: 10pt;">
<div> 7 May 17 07:46:06 rhel automount[15387]:
find_server: trying server uri <a class="moz-txt-link-freetext" href="ldap://192.168.1.240">ldap://192.168.1.240</a></div>
<div> 8 May 17 07:46:06 rhel automount[15387]:
do_bind: lookup(ldap): auth_required: 1, sasl_mech
(null)</div>
<div> 9 May 17 07:46:06 rhel automount[15387]:
do_bind: lookup(ldap): ldap simple bind returned 0</div>
<div> 10 May 17 07:46:06 rhel automount[15387]:
get_query_dn: lookup(ldap): check search base list</div>
<div> 11 May 17 07:46:06 rhel automount[15387]:
get_query_dn: lookup(ldap): found search base under
cn=automount,dc=cohort,dc=org</div>
<div> 12 May 17 07:46:06 rhel automount[15387]:
get_query_dn: lookup(ldap): found query dn
automountmapname=auto.home,cn=default,cn=automount,dc=cohort,dc=org</div>
<div> 13 May 17 07:46:06 rhel automount[15387]:
connected to uri <a class="moz-txt-link-freetext" href="ldap://192.168.1.240">ldap://192.168.1.240</a></div>
<div> 14 May 17 07:46:06 rhel automount[15387]:
lookup_one: lookup(ldap): searching for
"(&(objectclass=automount)(|(automountKey=nasir)(automountKey=/)(automountKey=\2A)))"
under "automountmapname=auto.home,
cn=default,cn=automount,dc=cohort,dc=org"</div>
<div> 15 May 17 07:46:06 rhel automount[15387]:
lookup_one: lookup(ldap): getting first entry for
automountKey="nasir"</div>
<div> 16 May 17 07:46:06 rhel automount[15387]:
lookup_one: lookup(ldap): examining first entry</div>
<div> 17 May 17 07:46:06 rhel automount[15387]:
lookup_mount: lookup(ldap): nasir ->
-fstype=nfs4,rw,sec=krb5,soft,rsize=8192,wsize=8192
hugayat.cohort.org:/xtra/home/&</div>
<div> 18 May 17 07:46:06 rhel automount[15387]:
parse_mount: parse(sun): expanded entry:
-fstype=nfs4,rw,sec=krb5,soft,rsize=8192,wsize=8192
hugayat.cohort.org:/xtra/home/nasir</div>
<div> 19 May 17 07:46:06 rhel automount[15387]:
parse_mount: parse(sun): gathered options:
fstype=nfs4,rw,sec=krb5,soft,rsize=8192,wsize=8192</div>
<div> 20 May 17 07:46:06 rhel automount[15387]:
parse_mount: parse(sun):
dequote("hugayat.cohort.org:/xtra/home/nasir") ->
hugayat.cohort.org:/xtra/home/nasir</div>
<div> 21 May 17 07:46:06 rhel automount[15387]:
parse_mount: parse(sun): core of entry:
options=fstype=nfs4,rw,sec=krb5,soft,rsize=8192,wsize=8192,
loc=hugayat.cohort.org:/xtra/home/nasir</div>
<div> 22 May 17 07:46:06 rhel automount[15387]:
sun_mount: parse(sun): mounting root /home,
mountpoint nasir, what
hugayat.cohort.org:/xtra/home/nasir, fstype nfs4,
options rw,sec=krb5,soft,rsize=8192,wsize=8 192</div>
<div> 23 May 17 07:46:06 rhel automount[15387]:
mount_mount: mount(nfs): root=/home name=nasir
what=hugayat.cohort.org:/xtra/home/nasir,
fstype=nfs4,
options=rw,sec=krb5,soft,rsize=8192,wsize=8192</div>
<div> 24 May 17 07:46:06 rhel automount[15387]:
mount_mount: mount(nfs): nfs
options="rw,sec=krb5,soft,rsize=8192,wsize=8192",
nosymlink=0, ro=0</div>
<div> 25 May 17 07:46:06 rhel automount[15387]:
mount_mount: mount(nfs): calling mkdir_path
/home/nasir</div>
<div> 26 May 17 07:46:06 rhel automount[15387]:
mount_mount: mount(nfs): calling mount -t nfs4 -s -o
rw,sec=krb5,soft,rsize=8192,wsize=8192
hugayat.cohort.org:/xtra/home/nasir /home/nasir</div>
<div> 27 May 17 07:46:06 rhel automount[15387]:
>><b> mount.nfs4: mounting
hugayat.cohort.org:/xtra/home/nasir failed, reason
given by server:</b></div>
<div><b> 28 May 17 07:46:06 rhel automount[15387]:
>> No such file or directory</b></div>
</div>
<div style="font-family: arial; font-size: 10pt;
font-weight: bold;"><br>
</div>
<div style="font-family: arial; font-size: 10pt;
font-weight: bold;"><br>
</div>
<div><font class="Apple-style-span" face="arial"
size="2">Please compare the lines between 20-30 in
both the cases. All the </font><font
class="Apple-style-span" face="arial" size="2">parameters
are same but in the first case it says the user
"nasir is local". What does it mean ? </font></div>
</div>
<div style="font-family: arial; font-size: 10pt;"><b><br>
</b></div>
<div style="font-family: arial; font-size: 10pt;">Thanks
and regards,</div>
<div style="font-family: arial; font-size: 10pt;">Nidal</div>
<div style="font-family: arial; font-size: 10pt;"><br>
</div>
<blockquote style="font-family: arial; font-size: 10pt;
border-left: 2px solid rgb(16, 16, 255); margin-left:
5px; padding-left: 5px;"><br>
<div id="yiv667683755">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="font: inherit;" valign="top">
<div>Thanks again! To answer your queries,</div>
<div><br>
</div>
<div> -- I get the same error for <b>su -
nasir</b></div>
-- I don't think ssh is not creating
oddjobd ; see the error in the trailing mail
which I am getting in the konsole while trying
to login. It does try to create home folder
<div> -- The client IPA machine was created
with --mkhomedir switch. Also, I can see <b>pam_oddjob_mkhomedir.so
</b>entry in the system-auth and
password-auth files of pam(But not in ssh
file, though I manually tried once to insert
in ssh file and then it was trying to create
the home folder twice while SSHing !!).</div>
<div> -- As I said in previous mail,
Pre-created directories get autmounted and
setup correctly when I try to login to NFS
server(cohort.org.hugyat) but NOT to other
machines.</div>
<div> -- When autofs is disabled,
directories get created successfully in the
local hard disk on all the machines
configured with --mkhomedir switch</div>
<div><br>
</div>
<div>Any clue ?</div>
<div><br>
</div>
<div>Thanks and regards,<br>
Nidal</div>
<div><br>
<br>
<blockquote style="border-left: 2px solid
rgb(16, 16, 255); margin-left: 5px;
padding-left: 5px;">
<div id="yiv667683755">
<title></title>
Lets try to isolate it a little
further. If you log in to that machine
as root, and then do su - nasir, does it
let you create the directory or give you
the same error? I'm guessing it is ssh
that is complaining here. If the mount
point is set up correctly, you should be
able to crete and chown the /home/nasir
directory, either via odd job, or just
test it as root.<br>
<br>
What I am guessing is happening here is
that ssh is not triggereing the odd job
creation of the home directory. Either
that, or this particular IPA client was
run without the switch to create the
home-dir. If Automount is commented
out, does the /home/nasir directory get
created on the local disk?<br>
<br>
<br>
On 05/16/2011 09:19 PM, nasir nasir
wrote:
<blockquote type="cite">
<table border="0" cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<td style="font: inherit;"
valign="top">
<div>Thanks again!</div>
<div><br>
</div>
<div>No! it allows auto mount
that pre created home folder
<b>ONLY to the NFS server</b>.
For e.g if I have <b>/xtra/home/nasir</b>
alread created, then it
automatically mounts while
login to NFS server ( ssh -l
nasir NFS_SERVER ). But when
I try to login as the same
user to some other machine (
ssh -l nasir
ANY_IPA_MACHINE) it gives
the following error,</div>
<div><br>
</div>
<div>
<div><b>[root@openipa ~]#
ssh -l nasir
192.168.1.222 -X</b></div>
<div><b><a
moz-do-not-send="true"
rel="nofollow"
class="yiv667683755moz-txt-link-abbreviated">nasir@192.168.1.222</a>'s
password: </b></div>
<div><b>Creating home
directory for nasir.</b></div>
<div><b>Last login: Tue May
17 04:06:43 2011 from
openipa.cohort.org</b></div>
<div><b>Could not chdir to
home directory
/home/nasir: No such
file or directory</b></div>
<div><b>-sh-4.1$ ls</b></div>
</div>
<div><br>
</div>
<div>So it is not working
right ? Hope it is clear to
you now.</div>
<div><br>
</div>
<div>Thanks and regards,</div>
<div>Nidal</div>
<div><br>
</div>
<div><br>
</div>
<br>
<blockquote
style="border-left: 2px
solid rgb(16, 16, 255);
margin-left: 5px;
padding-left: 5px;">
<div id="yiv667683755">
<blockquote type="cite">
<table border="0"
cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<td style="font:
inherit;"
valign="top">
<div>If I
manually
create one
home folder(
e.g <b>/xtra/home/abc</b>
) under than,
then I can
mount it, but
nothing can be
written to it
by the user as
it gives
permission
denied error.</div>
</td>
</tr>
</tbody>
</table>
</blockquote>
<br>
Yes, but it should allow
the root user to create
and chown the directory,
so the autocreation of
home dirs should work.<br>
<br>
</div>
<div
class="yiv667683755plainMail"><br>
</div>
</blockquote>
</td>
</tr>
</tbody>
</table>
</blockquote>
<br>
</div>
</blockquote>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
-----Inline Attachment Follows-----<br>
<br>
<div class="plainMail">_______________________________________________<br>
Freeipa-users mailing list<br>
<a moz-do-not-send="true"
ymailto="mailto:Freeipa-users@redhat.com"
href="/mc/compose?to=Freeipa-users@redhat.com">Freeipa-users@redhat.com</a><br>
<a moz-do-not-send="true"
href="https://www.redhat.com/mailman/listinfo/freeipa-users"
target="_blank">https://www.redhat.com/mailman/listinfo/freeipa-users</a></div>
</blockquote>
</td>
</tr>
</tbody>
</table>
</blockquote>
<br>
</body>
</html>