Novell is now a part of Micro Focus

Change Telephone Numbers

Novell Cool Solutions: Cool Tool

Digg This - Slashdot This

In Brief

Mass modification of telephone numbers from the console of server NW6.5


Posted:2 Nov 2006
File Size:6KB
Publisher:Koltogyan Sergey Rubenovich


Please read the note from our friends in legal before using this file.


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: $HOST = 'XXX.XXX.XXX.XXX'; 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.

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates