sssd build on openSUSE and Ubuntu

The latest version is always available here.

Update for sssd 1.12.0: you also need ding-libs also available here.

build requirements openSUSE 13.1
 zypper install openldap-devel gettext libtool pcre-devel c-ares-devel \
 dbus-devel libxslt docbook-style-xsl krb5-devel nspr-devel \
 libxml2 pam-devel nss-devel libtevent python-devel \
 libtevent-devel libtdb libtdb-devel libtalloc libtalloc-devel \
 libldb libldb-devel popt-devel c-ares-devel check-devel \
 doxygen libselinux-devel libsemanage-devel bind-utils libnl3-devel \
 gettext-devel glib2-devel libdhash-devel libcollection-devel\
 libini_config-devel openldap2-devel cyrus-sasl-devel libopenssl-devel\
 libcares-devel krb5-config nss-shared-helper-devel dbus-1-devel\
 docbook-xsl-stylesheets gcc make augeas-devel

Ignore the errors. The stuff you need is there, it's that I copied some of this from the Fedora instructions.
You'll need libldb-1.1.15. the easiest way is to search opensuse.org/download for libldb and install the samba-network repository using 1-click. Then do a zypper dup to get the 1.1.15.

You'll also need samba4-devel. There is an unstable repository which contains v4.0.6 for 12.3. It works fine. The alternative is to build Samba4. If you use the repo, it installs to /opt/samba4. I tried ldconfig to get the links for the libs but nada. So. . .
cd /opt/samba4/lib
rsync -auzv * /usr/lib
cd /opt/samba4/include
rsync -auzv * /usr/include

If you build samba4, the libs and includes are at /usr/local/samba instead.

untar  ding-libs and:
./configure --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr --disable-cifs-idmap-plugin
make install
repeat for sssd 1.12.0

Lubuntu 13.04

sudo apt-get install  debhelper  quilt dh-autoreconf autopoint lsb-release dpkg-dev  dnsutils  libpopt-dev  libdbus-1-dev libkeyutils-dev libkeyutils-dev  libldap2-dev  libpam-dev  libnl-dev  libnss3-dev  libnspr4-dev  libpcre3-dev  libselinux1-dev  libsasl2-dev  libtevent-dev  libldb-dev libtalloc-dev  libtdb-dev  xml-core  docbook-xsl  docbook-xml  libxml2-utils  xsltproc  krb5-config  libkrb5-dev  libc-ares-dev  python-dev  libdhash-dev  libcollection-dev  libini-config-dev  check  dh-apparmor  libglib2.0-dev  libndr-dev libndr-standard-dev libsamba-util-dev samba4-dev libdcerpc-dev build-essential libsemanage1-dev samba4-dev libpam_sss augeas-devel


install as root:
make install

Ubuntu. You'll need to copy the libs from /usr/local to:
 /lib/i386-linux-gnu/ or /lib/x86-64-linux-gnu/
and the pam module to /lib/i386-linux-gnu/security
remove the symlink  /usr/lib/i386-linux-gnu/ldb/modules/ldb/samba
pam-config -a --sss
install libpam_sss and run pan-auth-update to choose sss
add sss to the passwd and group lines in /etc/nsswitch.conf
edit the root .bashrc file: PATH="/usr/local/sbin:/usr/local/lib:/usr/local/etc:$PATH" 
(on Ubuntu use visudo to set the path too, otherwise well, you know. . .)

remove the old cache files if any, at /usr/local/var/lib/sss/db/*
start sssd:
sssd -i -d3

Can't Authenticate?
On Ubuntu, pam-sss.so goes in /lib/i386-linux-gnu/security on i386.

ldb: unable to dlopen /usr/lib/ldb/memberof.la : /usr/lib/ldb/memberof.la: invalid ELF header
just remove  /usr/lib/ldb/memberof.la

Don't forget to put your sssd.conf in /usr/local/etc/sssd

That's it. A shiny new sssd with all the new stuff:)

copy the contents of (only the files, not the folders):
sudo cp /usr/local/lib/* /lib/i386-linux-gnu
then remove all the .la files you just copied in /lib/i386-linux-gnu
The same, except copy to /lib

The Fedora method for generating the configure script if you don't have it:
autoreconf -i -f && \
./configure --enable-nsslibdir=/lib/i386-linux-gnu --enable-pammoddir=/lib/i386-linux-gnu/security && \