Cool Solutions

Change Telephone Numbers


November 2, 2006 2:30 pm






Download ct

For mass modification of telephone numbers from the console of server NW6.5 need prepare file sys:a.cvs in this format:

If using Russian (CP1251):


if using English:
“Koltogyan Sergey Rubenovich”;”1300″
“Putin Vladimir Vladimirovich”;”0001″

If you prepare this file in CP1251 – all will work without any changes, if prepared in English, you need correct string 95:

Line 95 was:


Line 95 change to:

# from_to($lnameutf,"cp1251","utf-8");

This Steps for use scripts:

  1. Copy to the sys:\perl\scripts\
  2. Create folder: sys:\results\chngtlph
  3. Create empty file: sys:\results\chngtlh\chngtlh.log
  4. Modify script for Your Environment:

LINE 28:
Insert ipaddress your server where your will be run
(on this server LDAP)

LINE 33:
$ADMIN = “cn=admin,o=org”;
Insert user name. Under this user script will be login to the LDAP(edir) and will search users and put telephone number from the sys:\a.csv
This user must have rights for this.
A simple way – use admin account

LINE 31:
$PASSWD = ‘password’;
password user

LINE 32:
$BASEDN =”o=org”;
From this container and below script will be searched.

5. prepare and copy file a.csv to the sys:a.csv

How to run script:

From the server console run this string:

perl sys:\perl\scripts\

What does it does:

  • Open for read file sys:\a.csv
  • Reads this file string by string
  • For every string, search:
    example, for string:
    “Putin Vladimir Vladimirovich”;”0001″
    search in the edir from the o=org user object which has in the field “Full Name”: “Putin Vladimir”
    If found – write new telephone number: 0001
    If not found –
    +write info about this error in to the log-file:
    +read other string

You can easily change the script as needed.
Do not forget LINE 95.
edir stores information in the UTF-8.
For records in Russian (prepared in Windows) it is important

*  Thanks, Iain McLaren, for example use of PERL-script:


P.S.: I know of JRB-utilities.
It is a variant free-of-charge and it is more convenient for me that I can work directly on the console of a server, without a workstation.

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.

Categories: Uncategorized

Disclaimer: This content is not supported by Micro Focus. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.