17.9.13

autofs hell with sssd on Ubuntu

** Warning, this is a total hack. But it works!
autofs with sssd is broken in all Debian and Debian based releases. It fails pull automount data using sssd.

To get it going

1. get the source:
apt-get source autofs

2. tar -xf autofs_5.0.7-3ubuntu1.debian.tar.xz

3. Patch it once

--- autofs-5.0.6/configure        2013-02-05 15:50:16.000000000 +0100
 +++ autofs-5.0.6.new/configure    2013-02-05 15:51:15.080386204 +0100
 @@ -3835,7 +3835,7 @@
     if test -z "$sssldir"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sssd autofs
 library" >&5
  $as_echo_n "checking for sssd autofs library... " >&6; }
-  for libd in /usr/lib64 /usr/lib; do
+  for libd in /usr/lib64 /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/i386-linux-gnu; do
       if test -z "$sssldir"; then
          if test -e "$libd/sssd/modules/libsss_autofs.so"; then
             sssldir=$libd/sssd/modules
 --- autofs-5.0.6/debian/rules     2012-09-11 08:41:00.000000000 +0200
 +++ autofs-5.0.6.new/debian/rules 2013-02-05 15:37:24.872370990 +0100
 @@ -21,6 +21,7 @@
        MOUNT_NFS=/sbin/mount.nfs \
         E2FSCK=/sbin/fsck.ext2 E3FSCK=/sbin/fsck.ext3 E4FSCK=/sbin/fsck.ext4 \
        initdir=/etc/init.d piddir=/run \
 + sssldir=/usr/lib/x86_64-linux-gnu/sssd/modules \
[for 32 bit
+ ssldir=/usr/lib/i386-linux.gnu/sssd/modules \
]
         dh_auto_configure -- \
                 --enable-forced-shutdown \
                   --enable-ignore-busy \

4. Patch it twice
http://lists.wpkg.org/pipermail/autofs/2013-July/000152.html

5. ./configure && make

6. Edit Makefile.conf
# sssd support
SSSD = 1

7. run make again

8. sudo make install

9. Find libsss_auotofs.so
find / -name libsss_autofs
and copy it to /

10. sudo make install (yes, again)

11. start the services
sudo service sssd start
sudo service autofs start

12. Don't forget your nsswitch.conf