The csrename utility allows you to rename one or more calendar users. This utility renames calendar users as follows:
Calendar database files–Renames users (user ID's) in the calendar database files and then writes the new database files to a destination directory. The existing calendar database files are not modified.
LDAP directory server–Converts the user ID's in the Calendar Server LDAP attributes (that is, attributes with the “ics” prefix). The LDAP directory server is modified in place.
The csrename utility is located in the following directory:
cal_svr_base/SUNWics5/cal/sbin
Before you run csrename, you must first:
Create an input mapping file (-m option) for the users you want to convert.
Create any new users in the LDAP directory server, if necessary.
Stop Calendar Server.
To run csrename, you must log in as icsuser (or as the Calendar Server runtime user ID specified during configuration). If you run csrename as superuser (root), you might need to reset the permissions for the new database files. To modify the LDAP directory server attributes, you must also have administrative rights for that directory.
If your Calendar Server installation has a front-end/back-end server configuration, you must run csrename on each back-end server.
Use the following syntax to run csrename:
csrename [-t DestinationDB] [-c ConfigFile] [-e ErrorFile] -m MappingFile rename [DB|LDAP] |
table lists the options for this utility and gives a description of each:
Table D–27 Options for csrename
Option |
Description |
---|---|
-t DestinationDB |
Specifies the destination directory where csrename generates the new database with the converted user names. The default is MigratedDB. After csrename is finished, the caldb.berkeleydb.homedir.path parameter in the ics.conf file must point to the destination database. Either reset caldb.berkeleydb.homedir.path to point to the destination database directory, or move the destination database files to the directory indicated by the parameter. |
-c ConfigFile |
An input parameter that specifies a Calendar Server configuration file. The default is the ics.conf file. csrename uses the caldb.berkeleydb.homedir.path parameter in the configuration file to determine the location of the input calendar database. The default location of the calendar database is /var/opt/SUNWics5/csdb. |
-e ErrorFile |
The file where csrename writes any errors or database entries that cannot be resolved. The default is MigrateError. |
-m MappingFile |
Specifies an input mapping file. The default is MigrateMapping. The input mapping file is a text file that maps existing user ID's to new user ID's. You must create the mapping file before you run csrename. Specify one entry per line with a space between the old and new values. For example: tchang tc897675 jsmith js963123 bkamdar bk548769 If upon auditing your results, you find that one or more of your intended name changes was omitted, you can fix the error by creating a new mapping file with only the missed names in it and rerunning csrename. |
DB|LDAP |
Specifies the database that gets updated: DB converts user ID's in the new calendar database only (default). LDAP converts user ID's in both the new calendar database and the LDAP directory server attributes. |
Rename users based on the mapping file named DBMapFile and create the new calendar database in the destination directory named newcalDB:
csrename -t newcalDB -m DBMapFile rename DB
Rename users based on values in the mapping file named NewNames, create the new calendar database in the destination directory named NewDB, and modify the Calendar Server attributes in the LDAP directory server:
csrename -t NewDB -m NewNames rename LDAP