From owner-freebsd-questions@FreeBSD.ORG Wed Oct 13 19:36:20 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 069AD1065672 for ; Wed, 13 Oct 2010 19:36:20 +0000 (UTC) (envelope-from bluethundr@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 889DA8FC17 for ; Wed, 13 Oct 2010 19:36:19 +0000 (UTC) Received: by bwz16 with SMTP id 16so2910694bwz.13 for ; Wed, 13 Oct 2010 12:36:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=bgFr1JyGQ46iet30setCU2OaMfQrOIsTXEnJSkYSttc=; b=YPCvxu37D+/lEPAfhZMNd5iN/yxeyfpLAjBTTlNLIYjo/41k2vNEc7ICu2EZexIuYJ ZdoWrbWvS8SQoD0YRCqfxqVHFauYOKfJ3dnRZ1GLHLaSGiFLTYyKThwFCoE1anVdPia4 8ac8HqBC8qJuEJ4eBkPuqKNs0RvO5fpBxnmH4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=B+OcUPeh5Dj4LKVaKkl/EGhmDKPDkvUYlj2j5ZIfhOBMz4XMo8O7H2BPbo3O8hCXEX ioHR2yiHZ/NKQRXNCdnK4q8MHY5+rTtn4vG8q3bj9aE3EhWMWlHuf6TV6GzxVis0Az3K wLd+suOBFbW30jRDLeK2Q1ozVqbB9BhUAzfeQ= MIME-Version: 1.0 Received: by 10.204.69.193 with SMTP id a1mr7280104bkj.108.1286998576776; Wed, 13 Oct 2010 12:36:16 -0700 (PDT) Received: by 10.204.69.144 with HTTP; Wed, 13 Oct 2010 12:36:16 -0700 (PDT) In-Reply-To: <201010131737.09756.milu@dat.pl> References: <201010131737.09756.milu@dat.pl> Date: Wed, 13 Oct 2010 15:36:16 -0400 Message-ID: From: Tim Dunphy To: Maciej Milewski Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-questions@freebsd.org Subject: Re: migrating to openldap X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Oct 2010 19:36:20 -0000 Maciej, thanks for the suggestion! I did give it a try but the result did not change.. Here is a copy-paste of what I tried: LBSD2# echo $LDAP_BASE dc=summitnjhome,dc=com LBSD2# ./migrate_base.pl > /home/bluethundr/txt/ldif/base.ldif LBSD2# less /home/bluethundr/txt/ldif/base.ldif dn: dc=padl,dc=com dc: padl objectClass: top objectClass: domain dn: ou=Hosts,dc=padl,dc=com ou: Hosts objectClass: top objectClass: organizationalUnit dn: ou=Rpc,dc=padl,dc=com ou: Rpc objectClass: top objectClass: organizationalUnit I mean I guess worse comes to worse I can break out some command line perl and replace dc=padl with dc=summitnjhome but it would be cleaner /faster I think to see if I can get the environment variable to be read by the various scripts. I would appreciate any thoughts on the matter... thanks again! On Wed, Oct 13, 2010 at 11:37 AM, Maciej Milewski wrote: > On Wednesday 13 October 2010 16:08:35, Tim Dunphy wrote: > >> Hello, > >> > >> I am attempting to migrate my local user setup to openldap under > >> FreeBSD 8.1. My server is currently running nicely. > >> > >> At the moment, sudoers is imported into openldap-server24. But > >> services that authenticate through PAM (such as su and ssh) are > >> currently not working. > >> > >> I notice that the CentOS version of openldap24 has a really nice set > >> of perl scripts suited to this purpose. > >> > >> So I rsynced them over to my BSD box in the hopes of using them. > >> > >> LBSD2# ls > >> README migrate_group.pl > >> migrate_aliases.pl migrate_hosts.pl > >> migrate_all_netinfo_offline.sh migrate_netgroup.pl > >> migrate_all_netinfo_online.sh migrate_netgroup_byhost.pl > >> migrate_all_nis_offline.sh migrate_netgroup_byuser.pl > >> migrate_all_nis_online.sh migrate_networks.pl > >> migrate_all_nisplus_offline.sh migrate_passwd.pl > >> migrate_all_nisplus_online.sh migrate_profile.pl > >> migrate_all_offline.sh migrate_protocols.pl > >> migrate_all_online.sh migrate_rpc.pl > >> migrate_automount.pl migrate_services.pl > >> migrate_base.pl migrate_slapd_conf.pl > >> migrate_common.ph migration-tools.txt > >> migrate_fstab.pl > >> > >> What one needs to do is set an environment variable for your base DN > >> and then run the scripts. > >> > >> LBSD2# echo $DEFAULT_BASE > >> dc=summitnjhome,dc=com > >> > >> > >> LBSD2# ./migrate_base.pl > /home/bluethundr/txt/base.ldif > >> > >> But for some reason the scripts running under BSD don't see the base > >> dn that i set, whereas when I run them under CentOS they do. > >> > >> Now, I could edit the resulting file by hand, but that isn't a very > >> practical solution. Does anyone know if there are either existing > >> FreeBSD versions of these migration scripts or have a tip for helping > >> me get these to run under FreeBSD? > >> > >> Thanks!!! > > The migrationtools page[1] says this about > > $DEFAULT_BASE > > The naming suffix to use in entries' distinguished names. If undefined, this > will be constructed by mapping the mail domain name into a distinguished > name (eg aceindustry.com becomes dc=aceindustry,dc=com). You may override > this with the LDAP_BASEDN environment variable. > > Have you tried that? > > 1.http://www.padl.com/OSS/MigrationTools.html > > -- > > Maciej Milewski -- Here's my RSA Public key: gpg --keyserver pgp.mit.edu --recv-keys 5A4873A9 Share and enjoy!!