Hey Francis,

On 8/22/23 16:36, francis.montag...@inria.fr wrote:
I compared the status output from both versions and noticed that the map
type displayed by the 4.1.4 version is "yp" (NIS). It seems that it does
not recognise that these maps are distributed via LDAP.

I hope you have only in /etc/nsswitch.conf: automount: ldap

Yeah, I had only this in the nsswitch.conf.

I looked at both init.d scripts and noticed that in version 4.1.4 the
maptype cannot be set to LDAP.  There is this if-else statement that
determines the map type and it always defaults to "yp". There does not
even seem to be an option for the LDAP type:

Except if "$maptype" = "$map", but I think it's better to patch this script as
follows, instead of understanding it fully (what is for example the output of
autofs-ldap-auto-master), in order to gain time to upgrade (or far far better
re-install those 2 machines).

I hope we replace those machines soon; they are more of a problem than
anything else, and it won't get any better...


Replace:

---------------------------------------------------------
      elif [ -f "/etc/$map" ]; then
          maptype=file
          map=`echo /etc/$map | sed 's^//^/^g'`
      else
          maptype=yp
          if [ "$UNDERSCORETODOT" = "1" ] ; then
              map=`basename $map | sed -e s/^auto_/auto./`
          else
              map=`basename $map | sed 's^//^/^g'`
          fi
      fi
---------------------------------------------------------

by:

---------------------------------------------------------
      else
          maptype=ldap
          if [ "$UNDERSCORETODOT" = "1" ] ; then
              map=`basename $map | sed -e s/^auto_/auto./`
          else
              map=`basename $map | sed 's^//^/^g'`
          fi
      fi
---------------------------------------------------------

I think it should work since this maptype=yp is the only occurrence of
yp in this script (ignoring the output of autofs-ldap-auto-master).


I tried this, and in general, this worked. However, the LDAP queries
were malformed and failed. But that's something I can solve.

Thank you for your help.

Regards,
Souji

--
Souji Thenria
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to