Description of problem: The initial port number is hardcoded in the tools. They'd better be dynamically retrieved from the config file. # egrep 389 * bak2db.pl:open(FOO, "| ldapmodify $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -a" ); db2bak.pl:open(FOO, "| ldapmodify $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -a" ); db2index.pl: $indexes_list="ldapsearch $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -s one " . db2index.pl: $vlvindexes_list="ldapsearch $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -s sub -b \"cn=\"$instance\", cn=ldbm database,cn=plugins,cn=config\" \"objectclass=vlvIndex\" cn"; db2index.pl:open(FOO, "| ldapmodify $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -a" ); db2ldif.pl:open(FOO, "| ldapmodify $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -a" ); fixup-linkedattrs.pl:open(FOO, "| ldapmodify $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -a" ); fixup-memberof.pl:open(FOO, "| ldapmodify $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -a" ); ldif2db.pl:open(FOO, "| ldapmodify $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -a" ); ldif2ldap:ldapmodify -a -p 389 -D "$1" -w "$2" -f $3 monitor:ldapsearch -p 389 -b "$MDN" -s base "objectClass=*" ns-accountstatus.pl:$defport= "389"; ns-accountstatus.pl:$port= "389"; ns-activate.pl:$defport= "389"; ns-activate.pl:$port= "389"; ns-inactivate.pl:$defport= "389"; ns-inactivate.pl:$port= "389"; ns-newpwpolicy.pl:$opt_p = "389"; schema-reload.pl:open(FOO, "| ldapmodify $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -a" ); syntax-validate.pl:open(FOO, "| ldapmodify $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -a" ); usn-tombstone-cleanup.pl:open(FOO, "| ldapmodify $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -a" );
I think it would be better if we just got rid of all instance specific stuff from our command line tools. We need to move them to @sbindir@ or @bindir@ and make them so that you just pass in the instance to operate on, and have a default instance if none is specified. Ideally, we should just get rid of /usr/lib[64]/dirsrv/slapd-INSTANCE - it is problematic since many admins want to mount /usr read-only except for package install - this is the reason that ipa uses /var instead.
Upstream ticket: https://fedorahosted.org/389/ticket/47
This was fixed in 389-ds-base-1.3.1.0-1.