[Freeipa-users] FreeIPA for Linux desktop deployment
nasir nasir
kollathodi at yahoo.com
Mon May 16 17:55:08 UTC 2011
Great that you asked these questions! because I was finding a unique pattern with this!
Yes, the user I am trying to create is test1 and the directory does NOT exist. I had tried with pre created one and it works ONLY on the NFS server itself(hugayat.cohort.org). For example, I created /xtra/home/nasir already in my NFS server and when I try from my konsole ssh -l nasir hugayat.cohort.org it works. But the same thing does not work when I try ssh -l nasir SOME_OTHER_CLIENT_MACHINE it gives the following error,
[root at openipa ~]# ssh -l nasir rhel.cohort.org nasir at rhel.cohort.org's password: Creating home directory for nasir. Last login: Mon May 16 14:13:17 2011 from 192.168.1.232
Could not chdir to home directory /home/nasir: No such file or directory -sh-4.1$
Following is the relevant /var/log/messages of rhel.cohort.org at this time,
May 16 20:47:06 rhel automount[1787]: find_server: trying server uri ldap://192.168.1.240May 16 20:47:06 rhel automount[1787]: do_bind: lookup(ldap): auth_required: 1, sasl_mech (null)May 16 20:47:06 rhel automount[1787]: do_bind: lookup(ldap): ldap simple bind returned 0May 16 20:47:06 rhel automount[1787]: get_query_dn: lookup(ldap): check search base listMay 16 20:47:06 rhel automount[1787]: get_query_dn: lookup(ldap): found search base under cn=automount,dc=cohort,dc=orgMay 16 20:47:06 rhel automount[1787]: get_query_dn: lookup(ldap): found query dn automountmapname=auto.home,cn=default,cn=automount,dc=cohort,dc=orgMay 16 20:47:06 rhel automount[1787]: connected to uri ldap://192.168.1.240May 16 20:47:06 rhel automount[1787]: 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"May 16 20:47:06 rhel
automount[1787]: lookup_one: lookup(ldap): getting first entry for automountKey="nasir"May 16 20:47:06 rhel automount[1787]: lookup_one: lookup(ldap): examining first entryMay 16 20:47:06 rhel automount[1787]: lookup_mount: lookup(ldap): nasir -> -fstype=nfs4,rw,sec=krb5,soft,rsize=8192,wsize=8192 hugayat.cohort.org:/xtra/home/&May 16 20:47:06 rhel automount[1787]: parse_mount: parse(sun): expanded entry: -fstype=nfs4,rw,sec=krb5,soft,rsize=8192,wsize=8192 hugayat.cohort.org:/xtra/home/nasirMay 16 20:47:06 rhel automount[1787]: parse_mount: parse(sun): gathered options: fstype=nfs4,rw,sec=krb5,soft,rsize=8192,wsize=8192May 16 20:47:06 rhel automount[1787]: parse_mount: parse(sun): dequote("hugayat.cohort.org:/xtra/home/nasir") -> hugayat.cohort.org:/xtra/home/nasirMay 16 20:47:06 rhel automount[1787]: parse_mount: parse(sun): core of entry: options=fstype=nfs4,rw,sec=krb5,soft,rsize=8192,wsize=8192, loc=hugayat.cohort.org:/xtra/home/nasirMay 16 20:47:06
rhel automount[1787]: 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=8192May 16 20:47:06 rhel automount[1787]: 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=8192May 16 20:47:06 rhel automount[1787]: mount_mount: mount(nfs): nfs options="rw,sec=krb5,soft,rsize=8192,wsize=8192", nosymlink=0, ro=0May 16 20:47:06 rhel automount[1787]: mount_mount: mount(nfs): calling mkdir_path /home/nasirMay 16 20:47:06 rhel automount[1787]: 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/nasirMay 16 20:47:06 rhel automount[1787]: >> mount.nfs4: mounting hugayat.cohort.org:/xtra/home/nasir failed, reason given by server:May 16 20:47:06 rhel automount[1787]: >> No such file or
directoryMay 16 20:47:06 rhel automount[1787]: mount(nfs): nfs: mount failure hugayat.cohort.org:/xtra/home/nasir on /home/nasirMay 16 20:47:06 rhel automount[1787]: dev_ioctl_send_fail: token = 180May 16 20:47:06 rhel automount[1787]: failed to mount /home/nasir
Following is the /var/log/messages of hugayat.cohort.org when I execute ssh -l nasir hugayat.cohort.org
May 16 20:50:27 hugayat automount[7297]: handle_packet: type = 3May 16 20:50:27 hugayat automount[7297]: handle_packet_missing_indirect: token 311, name nasir, request pid 10754May 16 20:50:27 hugayat automount[7297]: attempting to mount entry /home/nasirMay 16 20:50:27 hugayat automount[7297]: set_tsd_user_vars: failed to set stdenv thread varMay 16 20:50:27 hugayat automount[7297]: lookup_mount: lookup(ldap): looking up nasirMay 16 20:50:27 hugayat automount[7297]: find_server: trying server uri ldap://192.168.1.240May 16 20:50:27 hugayat automount[7297]: do_bind: lookup(ldap): auth_required: 1, sasl_mech (null)May 16 20:50:27 hugayat automount[7297]: do_bind: lookup(ldap): ldap simple bind returned 0May 16 20:50:27 hugayat automount[7297]: get_query_dn: lookup(ldap): check search base list
May 16 20:50:27 hugayat automount[7297]: get_query_dn: lookup(ldap): found search base under cn=automount,dc=cohort,dc=org May 16 20:50:27 hugayat automount[7297]: get_query_dn: lookup(ldap): found query dn automountmapname=auto.home,cn=default,cn=automount,dc=cohort,dc=org May 16 20:50:27 hugayat automount[7297]: connected to uri ldap://192.168.1.240 May 16 20:50:27 hugayat automount[7297]: 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" May 16 20:50:27 hugayat automount[7297]: lookup_one: lookup(ldap): getting first entry for automountKey="nasir" May 16 20:50:27 hugayat automount[7297]: lookup_one: lookup(ldap): examining first entry May 16 20:50:27 hugayat automount[7297]: lookup_mount: lookup(ldap): nasir -> -fstype=nfs4,rw,sec=krb5,soft,rsize=8192,wsize=8192
hugayat.cohort.org:/xtra/home/& May 16 20:50:27 hugayat automount[7297]: parse_mount: parse(sun): expanded entry: -fstype=nfs4,rw,sec=krb5,soft,rsize=8192,wsize=8192 hugayat.cohort.org:/xtra/home/nasir May 16 20:50:27 hugayat automount[7297]: parse_mount: parse(sun): gathered options: fstype=nfs4,rw,sec=krb5,soft,rsize=8192,wsize=8192 May 16 20:50:27 hugayat automount[7297]: parse_mount: parse(sun): dequote("hugayat.cohort.org:/xtra/home/nasir") -> hugayat.cohort.org:/xtra/home/nasirMay 16 20:50:27 hugayat automount[7297]: parse_mount: parse(sun): core of entry: options=fstype=nfs4,rw,sec=krb5,soft,rsize=8192,wsize=8192, loc=hugayat.cohort.org:/xtra/home/nasirMay 16 20:50:27 hugayat automount[7297]: 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=8192May 16 20:50:27 hugayat automount[7297]: 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=8192May 16 20:50:27 hugayat automount[7297]: mount_mount: mount(nfs): nfs options="rw,sec=krb5,soft,rsize=8192,wsize=8192", nosymlink=0, ro=0May 16 20:50:27 hugayat automount[7297]: mount_mount: mount(nfs): calling mkdir_path /home/nasirMay 16 20:50:27 hugayat automount[7297]: mount_mount: mount(nfs): nasir is local, attempt bind mountMay 16 20:50:27 hugayat automount[7297]: mount_mount: mount(bind): calling mkdir_path /home/nasirMay 16 20:50:27 hugayat automount[7297]: mount_mount: mount(bind): calling mount --bind -s -o defaults /xtra/home/nasir /home/nasirMay 16 20:50:27 hugayat automount[7297]: mount_mount: mount(bind): mounted /xtra/home/nasir type
bind on /home/nasirMay 16 20:50:27 hugayat automount[7297]: dev_ioctl_send_ready: token = 311May 16 20:50:27 hugayat automount[7297]: st_readmap: state 1 path /homeMay 16 20:50:27 hugayat automount[7297]: re-reading map for /homeMay 16 20:50:27 hugayat automount[7297]: lookup_nss_read_map: reading map ldap auto.homeMay 16 20:50:27 hugayat automount[7297]: parse_server_string: lookup(ldap): Attempting to parse LDAP information from string "auto.home".May 16 20:50:27 hugayat automount[7297]: parse_server_string: lookup(ldap): mapname auto.homeMay 16 20:50:27 hugayat automount[7297]: parse_ldap_config: lookup(ldap): ldap authentication configured with the following options:May 16 20:50:27 hugayat automount[7297]: parse_ldap_config: lookup(ldap): use_tls: 0, tls_required: 0, auth_required: 1, sasl_mech: (null)May 16 20:50:27 hugayat automount[7297]: parse_ldap_config: lookup(ldap): user: (null), secret: unspecified, client principal: (null) credential
cache: (null)May 16 20:50:27 hugayat automount[7297]: parse_init: parse(sun): init gathered global options: (null)May 16 20:50:27 hugayat automount[7297]: st_ready: st_ready(): state = 4 path /homeMay 16 20:50:27 hugayat automount[7297]: mounted /home/nasir
So to sum up, this is the observation,
-- For Non existent directory, it is NOT working for any machine -- For Pre created directories, it works ONLY for the NFS server (hugayat.cohort.org)
Thanks and regards,Nasir
I'm guessing that the user you are trying to create is test1? And
the directory
/xtra/home/test1 does not yet exist?
Does a precreated directory automount?
On 05/16/2011 08:08 AM, nasir nasir wrote:
Thanks indeed for the reply!
I updated the autofs package with version 5.0.5-30.el6.i686 and
that error is gone now. But still automounting is not
happening. Following is the relevant portion of
/var/log/messages in one of the IPA client machine(RHEL
6.1 beta) configured with --mkhomedir switch .
May 16 14:14:13 rhel automount[1787]: lookup_mount:
lookup(ldap): looking up test1
May 16 14:14:13 rhel automount[1787]: find_server:
trying server uri ldap://192.168.1.240
May 16 14:14:13 rhel automount[1787]: do_bind:
lookup(ldap): auth_required: 1, sasl_mech (null)
May 16 14:14:13 rhel automount[1787]: do_bind:
lookup(ldap): ldap simple bind returned 0
May 16 14:14:13 rhel automount[1787]: get_query_dn:
lookup(ldap): check search base list
May 16 14:14:13 rhel automount[1787]: get_query_dn:
lookup(ldap): found search base under
cn=automount,dc=cohort,dc=org
May 16 14:14:13 rhel automount[1787]: get_query_dn:
lookup(ldap): found query dn
automountmapname=auto.home,cn=default,cn=automount,dc=cohort,dc=org
May 16 14:14:13 rhel automount[1787]: connected to
uri ldap://192.168.1.240
May 16 14:14:13 rhel automount[1787]: lookup_one:
lookup(ldap): searching for
"(&(objectclass=automount)(|(automountKey=test1)(automountKey=/)(automountKey=\2A)))"
under
"automountmapname=auto.home,cn=default,cn=automount,dc=cohort,dc=org"
May 16 14:14:13 rhel automount[1787]: lookup_one:
lookup(ldap): getting first entry for
automountKey="test1"
May 16 14:14:13 rhel automount[1787]: lookup_one:
lookup(ldap): examining first entry
May 16 14:14:13 rhel automount[1787]: lookup_mount:
lookup(ldap): test1 ->
-fstype=nfs4,rw,sec=krb5,soft,rsize=8192,wsize=8192
hugayat.cohort.org:/xtra/home/&
May 16 14:14:13 rhel automount[1787]: parse_mount:
parse(sun): expanded entry:
-fstype=nfs4,rw,sec=krb5,soft,rsize=8192,wsize=8192
hugayat.cohort.org:/xtra/home/test1
May 16 14:14:13 rhel automount[1787]: parse_mount:
parse(sun): gathered options:
fstype=nfs4,rw,sec=krb5,soft,rsize=8192,wsize=8192
May 16 14:14:13 rhel automount[1787]: parse_mount:
parse(sun):
dequote("hugayat.cohort.org:/xtra/home/test1") ->
hugayat.cohort.org:/xtra/home/test1
May 16 14:14:13 rhel automount[1787]: parse_mount:
parse(sun): core of entry:
options=fstype=nfs4,rw,sec=krb5,soft,rsize=8192,wsize=8192,
loc=hugayat.cohort.org:/xtra/home/test1
May 16 14:14:13 rhel automount[1787]: sun_mount:
parse(sun): mounting root /home, mountpoint test1,
what hugayat.cohort.org:/xtra/home/test1, fstype nfs4,
options rw,sec=krb5,soft,rsize=8192,wsize=8192
May 16 14:14:13 rhel automount[1787]: mount_mount:
mount(nfs): root=/home name=test1
what=hugayat.cohort.org:/xtra/home/test1, fstype=nfs4,
options=rw,sec=krb5,soft,rsize=8192,wsize=8192
May 16 14:14:13 rhel automount[1787]: mount_mount:
mount(nfs): nfs
options="rw,sec=krb5,soft,rsize=8192,wsize=8192",
nosymlink=0, ro=0
May 16 14:14:13 rhel automount[1787]: mount_mount:
mount(nfs): calling mkdir_path /home/test1
May 16 14:14:13 rhel automount[1787]: mount_mount:
mount(nfs): calling mount -t nfs4 -s -o
rw,sec=krb5,soft,rsize=8192,wsize=8192
hugayat.cohort.org:/xtra/home/test1 /home/test1
May 16 14:14:13 rhel automount[1787]: >>
mount.nfs4: mounting
hugayat.cohort.org:/xtra/home/test1 failed, reason
given by server:
May 16 14:14:13 rhel automount[1787]: >> No
such file or directory
May 16 14:14:13 rhel automount[1787]: mount(nfs):
nfs: mount failure hugayat.cohort.org:/xtra/home/test1
on /home/test1
May 16 14:14:13 rhel automount[1787]:
dev_ioctl_send_fail: token = 47
May 16 14:14:13 rhel automount[1787]: failed to
mount /home/test1
Please note the following points,
-- All the configuration you had suggested for
autofs & nsswitch had already been done
-- My NFS server is another IPA client machine
with RHEL 6.1(hugayat.cohort.org)
-- This NFS server has /xtra/home/ as the
NFS partition and /etc/exports file as follows
/xtra/home
*(rw,fsid=0,insecure,no_subtree_check)
/xtra/home
gss/krb5(rw,fsid=0,insecure,no_subtree_check)
/xtra/home
gss/krb5i(rw,fsid=0,insecure,no_subtree_check)
/xtra/home
gss/krb5p(rw,fsid=0,insecure,no_subtree_check)
-- Output of the command ipa
automountlocation-tofiles default
/etc/auto.master:
/- /etc/auto.direct
/home /etc/auto.home
/share /etc/auto.share
---------------------------
/etc/auto.direct:
---------------------------
/etc/auto.home:
*
-fstype=nfs4,rw,sec=krb5,soft,rsize=8192,wsize=8192
hugayat.cohort.org:/xtra/home/&
---------------------------
/etc/auto.share:
I have played various entries corresponding to
/etc/auto.home (like /home instead of * ) but with no
success.
Any idea ?
Regards,
Nidal
--- On Mon, 5/16/11, Jakub Hrozek <jhrozek at redhat.com>
wrote:
From: Jakub Hrozek <jhrozek at redhat.com>
Subject: Re: [Freeipa-users] FreeIPA for Linux desktop
deployment
To: freeipa-users at redhat.com
Date: Monday, May 16, 2011, 1:23 AM
On 05/15/2011 06:49 AM, nasir
nasir wrote:
> Thanks again!
>
> NO, it was not set. I added it manually now
(*automount: ldap *) and
> now a different error pops up in
/var/log/messages while restarting
> autofs service,
>
> *May 15 06:32:04 hugayat automount[16256]:
open_lookup:90: cannot open
> lookup module ldap
(/usr/lib/autofs/lookup_ldap.so: undefined symbol:
> ERR_remove_state)*
> *May 15 06:32:04 hugayat automount[16256]:
lookup_nss_read_master:
> auto.master not found, replacing '.' with '_'*
> *May 15 06:32:04 hugayat automount[16256]:
open_lookup:90: cannot open
> lookup module ldap
(/usr/lib/autofs/lookup_ldap.so: undefined symbol:
> ERR_remove_state)*
> *May 15 06:32:04 hugayat automount[16256]: no
mounts in table*
>
> Quick googling shows that it was part of a bug
in earlier version of
> autofs(5.0.3) but later fixed. Mine is autofs
*autofs-5.0.5-29.el6.i686*
> *
> *
> Also, the symbol *ERR_remove_state *is part of
openssl right ? following
> is my output of ldd command of lookup_ldap.so,
I think you ran into https://bugzilla.redhat.com/show_bug.cgi?id=579963
The ERR_remove_state call was removed in
autofs-5.0.5-30.el6. I did a
quick test with that version and seemed to work
fine.
As per the configuration, the necessary steps are:
1) edit /etc/nsswitch.conf and put "automount:
ldap". It is also OK to
configure more sources such as "automount: files
ldap".
2) edit /etc/sysconfig/autofs
You'll want to specify at least LDAP_URI and
SEARCH_BASE according to
your server environment. In order for the correct
attributes to be
searched for, you also need to uncomment the last
set of attribute mappings:
MAP_OBJECT_CLASS="automountMap"
ENTRY_OBJECT_CLASS="automount"
MAP_ATTRIBUTE="automountMapName"
ENTRY_ATTRIBUTE="automountKey"
VALUE_ATTRIBUTE="automountInformation"
3) service autofs restart
If things still don't work, the logs should tell us
more. If you run
autofs with -v -d it would even list the exact mount
invocation, which
could be useful to determine the exact problem.
-----Inline Attachment Follows-----
_______________________________________________
Freeipa-users mailing list
Freeipa-users at redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-users
_______________________________________________
Freeipa-users mailing list
Freeipa-users at redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-users
-----Inline Attachment Follows-----
_______________________________________________
Freeipa-users mailing list
Freeipa-users at redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/freeipa-users/attachments/20110516/be3d5ba5/attachment.htm>
More information about the Freeipa-users
mailing list