Best way to add LDAP authentication to 7.04 client?

Luigi lemsx1 at gmail.com
Fri May 25 08:57:09 UTC 2007


On 5/24/07, Henk van Lingen <henkvl at cs.uu.nl> wrote:
>
> On Mon, May 21, 2007 at 03:50:55PM +0200, Henk van Lingen wrote:
>   >
>   > Hi,
>   >
>   > I'm working on a preseed installation of 7.04 ubuntu clients.
>   >
>   > I've the unattended install working, but now I'm wondering what
>   > is the best way to add ldap authentication to the system. It seems
>   > the preseed method and/or the ubuntu installer don't have questions
>   > about ldap (odd?). So it must be done via a "d-i preseed/late_command"
>   > script, i suppose?
>
> After googling around some time, I now have a working ldap/pam
> configuration. I installed libpam-ldap libnss-ldap ldap-utils
> and edited a hand full of configfiles.
>
> Now I want to do this all unattended at install time. I want to install
> the packages, and afterwards copy the configfiles in place.
>
> So I have:
>
> DEBIAN_FRONTEND='noninteractive' apt-get -y install libpam-ldap
> libnss-ldap ldap-utils
>
> in a script which is called by
>
> d-i preseed/late_command string chroot /target ....
>
> This however does not seems to work, it keep hanging in the apt-get/conf
> process.
>
> Looking for an alternative I found debconf, but that does:
>
>
> fana:/root-# debconf -f noninteractive apt-get install libpam-ldap
> libnss-ldap ldap-utils
> debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by
> another process: Resource temporarily unavailable
> dpkg: error processing libnss-ldap (--configure):
> o
> subprocess post-installation script returned error exit status 20
> dpkg: error processing libpam-ldap (--configure):
> subprocess post-installation script returned error exit status 20
> Errors were encountered while processing:
> libnss-ldap
> libpam-ldap
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> fana:/root-#
>
>
> Ideas to get those debconf questions silenced?
>
> Henk van Lingen, Systems Administrator & DBA


Hey Henk,

Try setting the priority to the questions to be asked:

$> cat /etc/apt/apt.conf.d/70debconf
// Pre-configure all packages with debconf before they are installed.
// If you don't like it, comment it out.

$> man dpkg-preconfigure
...
// Pre-configure all packages before
            // they are installed.
            DPkg::Pre-Install-Pkgs {
                   "dpkg-preconfigure --apt --priority=high";
            };


Perhaps you can do this from the command line when you call "apt-get". All
you needed to know was the option name "DPkg::Pre-Install-Pkgs".

$> man apt-get

Though you seem to be very well informed.

Hope that helps

-- 
----)(-----
Luis Mondesi
*NIX Guru

"Feliz el hombre que ha hallado sabiduria y el hombre que consigue
discernimiento, porque el tenerla como ganancia es mejor que tener la plata
como ganancia; y el tenerla como producto, [mejor] que el oro mismo" (Prov
3:13-14)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20070525/b7ef8c40/attachment.html>


More information about the ubuntu-users mailing list