Results 1 to 5 of 5

Thread: LDAP Setup 10.04 LTS

  1. #1
    Join Date
    Feb 2009
    Beans
    15
    Distro
    Ubuntu 8.04 Hardy Heron

    LDAP Setup 10.04 LTS

    Hi Everyone,

    I've been working though thishttp://www.opinsys.fi/setting-up-ope...u-10-04-alpha2 tutorial trying to get openldap working.

    When I get to the point where i'm setting up the client. More specifically when I do ldapaddgroup testgroup I am sent this error

    "You must have OpenLDAP client commands installed before running these scripts"

    I have installed the ldapscripts package along with all the required ones. Has anyone been through this, I imagine it's some little nuance that I am missing.

    Thanks!

    Mant1s

  2. #2
    Join Date
    Oct 2008
    Location
    India/TamilNadu/Auroville
    Beans
    57
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: LDAP Setup 10.04 LTS

    Hi mantis,

    We changed the existing runtime.debian to also include the variable declarations. After this we can use the ldapscripts again.

    good luck

    /usr/share/ldapscripts/runtime.debian
    Code:
    ### This file predefine some ldapscripts variables for Debian boxes.
    #
    #  Copyright (c) 2005 Gana�l LAPLANCHE - Linagora
    #  Copyright (c) 2005-2007 Pierre Habouzit
    #  Copyright (c) 2009 Alexander GQ Gerasiov
    #
    #  This program is free software; you can redistribute it and/or
    #  modify it under the terms of the GNU General Public License
    #  as published by the Free Software Foundation; either version 2
    #  of the License, or (at your option) any later version.
    #
    #  This program is distributed in the hope that it will be useful,
    #  but WITHOUT ANY WARRANTY; without even the implied warranty of
    #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    #  GNU General Public License for more details.
    #
    #  You should have received a copy of the GNU General Public License
    #  along with this program; if not, write to the Free Software
    #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
    #  USA.
    
    ##### Beginning of ldapscripts configuration #####
    
    getfield() {
        local field="$1"
        local nssconffile='/etc/libnss-ldap.conf'
        if [ -f "$nssconffile" ];then
    	local value=$(awk "/^\s*$field/ {print \$2}" /etc/libnss-ldap.conf)
        else
    	local value="$2"
        fi
        echo ${value:-$2}
    }
    
    getsuffix() {
        field="$1"
        value="$(getfield "$1" | sed -e "s/,.*$//")"
        echo ${value:-$2}
    }
    
    # LDAP Configuration
    SERVER=$(getfield uri "$(getfield host '')")
    BINDDN=$(getfield rootbinddn '')
    if [ -f /etc/libnss-ldap.secret ];then
    	BINDPWDFILE=/etc/libnss-ldap.secret
    elif [ -f /etc/ldap.secret ];then
    	BINDPWDFILE=/etc/ldap.secret
    fi
    
    SUFFIX=`getfield base`
    GSUFFIX=`getsuffix nss_base_group   'ou=Group'`
    USUFFIX=`getsuffix nss_base_passwd  'ou=People'`
    MSUFFIX=`getsuffix nss_base_hosts   'ou=Hosts'`
    
    # User properties
    [ -f /etc/adduser.conf ] && . /etc/adduser.conf
    USHELL=${DSHELL:-"/bin/bash"}
    UHOMES=${DHOME:-"/home"}"/%u"
    HOMESKEL=${SKEL:-"/etc/skel"}
    HOMEPERMS=${DIR_MODE:-"0755"}
    
    
    # Where to log
    LOGFILE="/var/log/ldapscripts.log"
    
    # Various binaries used within scripts
    LDAPSEARCHBIN=`which ldapsearch`
    LDAPADDBIN=`which ldapadd`
    LDAPDELETEBIN=`which ldapdelete`
    LDAPMODIFYBIN=`which ldapmodify`
    LDAPMODRDNBIN=`which ldapmodrdn`
    LDAPPASSWDBIN=`which ldappasswd`
    
    # Getent command to use - choose the ones used on your system. Leave blank or comment for auto-guess.
    # GNU/Linux
    GETENTPWCMD="getent passwd"
    GETENTGRCMD="getent group"
    
    
    TMPDIR="/tmp"
    ##### End of configuration #####
    Blue Light Open Source Research and Service Centre India
    http://www.auroville.org/research/bluelight.htm

  3. #3
    Join Date
    Aug 2007
    Beans
    31

    Re: LDAP Setup 10.04 LTS

    Quote Originally Posted by bluelightav View Post
    We changed the existing runtime.debian to also include the variable declarations. After this we can use the ldapscripts again.
    I ran into the same problem following the Ubuntu LDAP guide in server configuration for 10.04 ( https://help.ubuntu.com/10.04/server...ap-server.html ).

    bluelightav, I don't actually understand the answer you just gave. Can you explain that a little more please?
    Last edited by jetole; September 23rd, 2010 at 08:54 PM.

  4. #4
    Join Date
    Aug 2007
    Beans
    31

    Re: LDAP Setup 10.04 LTS

    After looking at this message again, I understand what you meant. You were saying that we should replace /usr/share/ldapscripts/runtime.debian with the one you posted. This fixed the problem for me.

  5. #5
    Join Date
    Jan 2009
    Location
    Russia, Chelyabinsk
    Beans
    1
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: LDAP Setup 10.04 LTS


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •