This section contains instructions on how to manage user calendars using the Calendar Server utility D.5 cscal.
This section covers the following administrative tasks:
To display all calendars, all calendars owned by a user, or the properties of a specific calendar, use the cscal utility list command.
The following examples demonstrate three different tasks using cscal.
To list all calendars in the calendar database:
To list all calendars owned by jsmith:
cscal -o jsmith list
To list all the properties of a calendar with the calendar ID jsmith:meetings:
cscal -v list jsmith:meetings
To delete one or more calendars from Calendar Server, use the cscal utility delete command. This utility deletes the calendar, but it does not delete the user from the directory server.
The following two examples demonstrate different tasks you can accomplish with cscal delete:
To delete a specific calendar with the calendar ID email@example.com:meetings:
cscal delete firstname.lastname@example.org:meetings
To delete all calendars whose primary owner is email@example.com:
cscal -o firstname.lastname@example.org delete
The delete command removes all of the calendar information from the calendar database and cannot be undone. After you delete a calendar, you can recover the calendar data only if it was backed up. For more information, see Chapter 17, Backing Up and Restoring Calendar Server Data.
If you have deleted one or more users with the Calendar Server Utility command csuser delete, or with Delegated Administrator Console or Utility, calendars owned by that user might still be present in the database.
There are two ways to remove users’ calendars. The method to use depends on the tool you used to delete the user:
The csuser utility removes the user from the LDAP directory and removes the user’s default calendar, but not any other calendars the user might own. For instructions on how to use cscal to remove these calendars, see To Remove All Calendars of a User Deleted with csuser in Calendar Server Version 6.3.
Delegated Administrator does not remove any calendars. Use Delegated Administrator to mark users for deletion and then use Calendar Server Utility csclean to remove calendars for user's marked for deletion.
For instructions on how to remove deleted users’ calendars using csclean, see To Remove All Calendars for Users Deleted by Delegated Administrator.
For instructions on using Delegated Administrator Utility, see the Sun Java System Communications Services 6 2005Q4 Delegated Administrator Guide.
For instructions on using Delegated Administrator Console, see the online help.
Run the cscal list command to find all of the calendars for the deleted owner’s uid.
cscal -o owner list
Use the cscal command to remove all the calendars for this owner.
cscal -o owner delete
Verify that all the calendars have been removed by running csuser list again.
Use this procedure if you used commadmin to mark the user as deleted, and the user’s LDAP entry has already been purged.
Delegated Administrator does not remove calendars. Use the csclean utility to remove all calendars for any users marked as deleted with Delegated Administrator.
Use csclean to remove all calendars for users marked as deleted but not yet purged.
For example, to remove all the calendars for users marked as deleted in the sesta.com domain in the last 10 days, the command would be as follows:
csclean -g 10 clean sesta.com
If the user has already been purged from the LDAP, then you must use cscal.
For instructions, see To Remove All Calendars of a User Deleted with csuser in Calendar Server Version 6.3.
To allow users to access their calendars, you must first enable the calendars using the cscal enable command.
The following examples, demonstrate how to enable calendars:
To enable calendar email@example.com:meetings using the default configuration settings:
cscal enable firstname.lastname@example.org:meetings
To enable the calendar email@example.com:meetings but not allow doublebooking:
cscal -k no enable firstname.lastname@example.org:meetings
To prevent users from accessing a calendar, use the cscal utility disable command. The disable command prohibits users from accessing the calendar, but it does not remove the information from the calendar database.
For example, to prevent users from accessing email@example.com:meetings, use the following command:
cscal disable firstname.lastname@example.org:meetings
To modify the properties of a calendar, use the cscal utility modify command.
For example, to change the group scheduling access control settings of AllAdmins and specify RJones@sesta.com as another owner:
cscal -a "@@o^c^wd^g" -y RJones@sesta.com modify AllAdmins
The following explains the two command variables used in the preceding example:
-a "@@o^c^wd^g" grants owners write and delete access to the components (events and tasks) of AllAdmins.
-y RJones@sesta.com specifies the user ID of the other owner.
To remove a property value from a calendar, use the cscal modify command and specify the value of the option with two double quotes ("").
The three examples that follow show how to remove different properties:
To remove a description from email@example.com:meetings:
cscal -d "" modify firstname.lastname@example.org:meetings
To remove all categories from the email@example.com:meetings calendar:
cscal -g "" modify firstname.lastname@example.org:meetings
To remove “other owners” from email@example.com:meetings:
cscal -y "" modify firstname.lastname@example.org:meetings
If a user’s default calendar is not visible to the Communications Express user interface client, but still exists in the database, you can recover the calendar and make it visible again by updating two attributes in the user’s LDAP entry.
To recover a calendar, make sure the value of the following attributes in the user's LDAP entry is the user's fully qualified calid:
For Schema version 2, use one of the following methods to update the attributes:
Use the ldapmodify Directory Server utility.
Use the Calendar Server Utility command csuser reset.
Use the Delegated Administrator Utility command commadmin user modify.
Use the Delegated Administrator Console to add the default calendar name by editing the User Properties page.
For Schema version 1, use the csattribute add command to update the attributes.
To move a user calendar from one back-end server to another back-end server, follow these steps:
On the original server, disable the calendar user using the D.19 csuser utility. For example to disable the user with the user ID and calid bkamdar:
csuser disable bkamdar
On the original server, export each of the user’s calendars from the calendar database to a file using the D.10 csexport utility. For example:
csexport -c bkamdar calendar bkamdar.ics
Copy the exported calendar (*.ics) files from the original server to the new server.
On the new server, for each of the calendars exported, import the calendar from the file to the calendar database using the D.11 csimport utility. For example:
csimport -c bkamdar calendar bkamdar.ics
On the LDAP directory server, update the calendar owner’s icsDWPHost LDAP attribute to point to the new back-end server using the D.3 csattribute utility. To update an attribute, you must first delete the attribute and then add it with the new value. For example, to set the new server name to sesta.com:
csattribute -a icsDWPHost delete bkamdar csattribute -a icsDWPHost=sesta.com add bkamdar
On the new server, enable the calendar user using the D.19 csuser utility for a user calendar. For example:
csuser enable bkamdar
On the new server, use the following commands to verify that the attributes are correct and that each calendar has been moved correctly. For example:
cscal -v -o bkamdar list bkamdar ... csattribute -v list bkamdar
On the original server, delete each calendar you just moved. For example:
cscal -o bkamdar delete bkamdar
The -o option deletes all calendars whose primary owner is bkamdar.
If you are using the CLD cache option, after moving a calendar to a different back-end server, you should clear the CLD cache to remove the server names. An out-of-date entry in the CLD cache can prevent a front-end server from finding a calendar after it has been moved.
To clear the CLD cache, follow these steps:
Stop Calendar Server.
Remove all files in the /var/opt/SUNWics5/csdb/cld_cache directory, but do not remove the cld_cache directory itself.
Restart Calendar Server.