SUMMARY: Problems after changing the IP

From: Dirk Boenning <>
Date: Tue Aug 14 2001 - 12:04:46 EDT
This is a multi-part message in MIME format.
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit


while I'm getting the first anwsers I found the solution by myself and 
afterwards I found a perl script from netscape.
The problem is, that the information about the admin IP is stored in the
ldap database itself. You need to change the local.conf and the LDAP
Database. I've done it by doing a backup of the Database, editing the
LDIF File and then restoring (both by command line !, seems to be 
important cause doing it with the startconsole ends up in a mess).
Now anything works great.

The netscape solution is attached.

Thanx to all, Dirk.

Content-Type: text/plain;
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;

Changes to IP address

If, for any reason, your computer system's IP address changes, the Administration Server will not start (332357, 354994).  The IP address must be changed in both the Administration Server configuration and the Configuration Directory. As a workaround, follow these steps:

   1. Copy the Perl script provided below, and save it as a file in the <Server_Root>/shared/bin directory.  In this example, the file is named
   2. In the <Server_Root>/shared/bin directory,
          * On Windows NT,  enter

          * ..\..\install\perl <Directory_Manager_DN> <Directory_Manager_password> <old_IP> <new_IP> [port #] On Unix, enter <Directory_Manager_DN> <Directory_Manager_password> <old_IP> <new_IP> [port #] 

#!../../install/perl -w

# This script automatically changes the Administration Server IP address in both the local.conf file and in the Configuration Directory.  The old IP address is stored in the file local.conf.old.

die "Usage: <DDirectory_Manager_DN> <Directory_Manager_password>
<old_IP> <new_IP> [port #]\n" unless (($#ARGV >= 2) && ($#ARGV <= 4));

$dirmgr = $ARGV[0];
$passwd = $ARGV[1];
$oldIPaddr = $ARGV[2];
$newaddr = $ARGV[3];
$port = 389;
$port = $ARGV[4] if ($ARGV[4]);

$adminconfig = "../../admin-serv/config/";
$ldapsearch = "./ldapsearch";
$ldapmodify = "./ldapmodify";
$baseobject = "o=NetscapeRoot";
$query = "(&(&(cn=configuration)(objectclass=nsConfig))(nsserveraddress=\"$oldIPaddr\"))";
$dn = "";
$oldaddr = "";

$/ = ""; # enable paragraph mode

# Find the old IP address in the directory
open (LDAP, "$ldapsearch -p $port -b $baseobject -D \"$dirmgr\" -w $passwd \"$query\" |");
while (<LDAP>) {
  s/\n //g;
  if (/\nnsserveraddress: (.*)\n/) {
    $oldaddr = $1;
    print "Old IP in directory: $oldaddr\n";
  if (/^dn: (.*)\n/) {
    $dn = $1;
    print "DN: $dn\n";

# Update the IP address stored in the configuration directory
    open (LDAP2, "| $ldapmodify -p $port -D \"$dirmgr\" -w $passwd");
    print LDAP2 "dn: $dn\n";
    print LDAP2 "changetype: modify\n";
    print LDAP2 "replace: nsserveraddress\n";
    print LDAP2 "nsserveraddress: $newaddr\n";
    close (LDAP2);
close (LDAP);

# Update the admin config file
$newconfig=$adminconfig . "local.conf";
$oldconfig = $adminconfig . "local.conf.old";
rename $newconfig, $oldconfig;
open (OLD, "<" . $oldconfig);
open (NEW, ">" . $newconfig);
print "oldaddr: $oldaddr\n";
print "newaddr: $newaddr\n";
while (<OLD>) {
  print NEW;

Received on Tue Aug 14 17:04:46 2001

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:25:01 EDT