Sun Java System Calendar Server 6 2005Q4 Administration Guide

Chapter 14 Administering Users and Resources

This chapter describes how to use the Calendar Server utilities to manage users and resources. This chapter contains the following sections:

User Management Tools

Calendar users and resources can be administered using one of the following user management tools:


Note –

Delegated Administrator does not manage calendars. To create calendars for users and resources, use the Calendar Server utilities.



Note –

In certain cases, even if you are using Schema 2 and Delegated Administrator, you will need to use some of the Calendar Server command-line utilities to perform special functions. When this is necessary, task oriented documentation in this guide will tell you which utility to use.


Creating Users and Resources

This section provides the following information about managing new Calendar Server users and resources:

To Create New Users in Schema 2

You can use either the Delegated Administrator Console or Utility:

To Create New Users For Schema 1

Use the csuser utility. For example, to add user jdoe in the sesta.com domain:

csuser -m jdoe@sesta.com -d sesta.com create jdoe

To Create New Resources for Schema 2

You can use either the Delegated Administrator Console or Utility:

To Create New Resources for Schema 1

Use the csresource utility to create both the LDAP entry and the resource calendar. For example, to add a projector, p101, use the following command:

csresource -m p101@siroe.com -c p101 create Projector_101

For more information on csresource, see the csresource.

To Add the Required mail Attribute

Calendar Server requires users and resources to have the mail attribute, which contains the email address of the user or resource. This enables people to search for calendars and resources using an email address or a calid. When you create new users with Delegated Administrator, it adds the mail attribute automatically. This happens even if the user has not been assigned mail service.


Note –

Calendar Server does not support email notifications for resource calendars.

Adding the mail attribute does not enable email notifications for user calendars.

To enable email notification for user calendars, add the following two attributes to the user’s LDAP entry:

icsExtendedUserPrefs:ceNotifyEnable=1 
icsExtendedUserPrefs:ceNotifyEmail=jdoe@sesta.com

If your users and resources were added in an earlier version of Calendar Server (when the mail attribute was not required), you might have to add the mail attribute to your existing user and resource LDAP entries.

This section covers the following topics:

To Check if the mail Attribute Has Been Set

To check if the attribute has been set, use the csattribute list command with the -v (verbose) option:

csattribute -v list Room100

The output tells if the mail attribute is present:

cn=Room 100,ou=conferenceRooms,dc=sesta,dc=com
 has mail: Room100@sesta.com

To Add the Mail Attribute to Existing Users and Resources

To add the mail attribute to existing users and resources, use one of the following methods:

Administering Users

After your users are created, use the csuser utility to perform the following administrative tasks:

To Display User Information

To list all calendar users or to display the calendar attributes of a specified user, use the csuser utility list command.

For example, to display all users enabled for calendaring:

csuser list

To display all of the calendar attributes of a single user such as jsmith:

csuser -v list jsmith

To Disable a User

The purpose of disabling a user is to prevent the user from logging into Calendar Server. This is handled differently depending on which user management tool you used to create the user. Users created in the Delegated Administrator Console should be administered using it also. Likewise, if you assigned calendar service to the user with Delegated Administrator Utility, use it to remove the service. And finally, users in a non-hosted domain environment should be administered using only the Calendar Server Utilities. Each handles the situation a bit differently.

This section contains the following topics:

Delegated Administrator Console

In the Delegated Administrator Console, select the user from the User List page. In the Properties for this user, delete the service package with calendar service in it. This disables the user for calendar, including setting the user's icsStatus to inactive.


Note –

If the package also contains other services, you will have to reassign those services using another package that does not contain calendar.


Delegated Administrator Utility (commadmin user delete)

To prevent a user from accessing calendar services, remove the service from the user’s LDAP entry, as shown in the example that follows:

commadmin user delete jsmith -S cal

This disables the user for calendar without completely removing the LDAP entry. In addition, this command changes the user's icsStatus to inactive.

Calendar Server Utilities (csuser disable)

The disable command prohibits a user from accessing calendar data, but it does not remove the user’s information from the LDAP entry or the Calendar Server database. This command changes the icsStatus attribute from active to inactive. In non-hosted domain mode, there is no such thing as a calendar service.

For example, to disable jsmith from accessing Calendar Server:

csuser disable jsmith

If jsmith is currently logged into Calendar Server, jsmith retains access to calendar data until he logs off.

To Enable a User

To enable a user, use one of the following tools:

Delegated Administrator Console

You can add enable both a new user and an existing user:

Delegated Administrator (commadmin user create)

When creating a user, enable the user for calendar services, as illustrated in the example that follows:

commadmin user create jsmith -S cal

If you did not enable the user for calendar services when the user was created, you can add calendar services to the user later, using a modify command, as illustrated in the following example:

commadmin user modify jsmith -S cal

Calendar Server Utilities (csuser enable)

If you used csuser create when you created the user entry, the user is automatically enabled.

If a user sends a request to another user who has not been enabled for calendaring (that is, the user does not have a default calendar), Calendar Server returns the “Calendar not found” error to the user sending the request.

To Set Up Email Aliases

If you need to setup email aliases for a calendar user, add the mailalternateaddress attribute to the user's LDAP entry. The mail attribute provides the primary mail address, and the mailalternateaddress attribute is used for email aliases. Both attributes map the mail addresses to the user’s calendar ID (calid).

You can add the attribute using the Calendar Server Utility csattribute, or by directly updating LDAP with ldapmodify. The following example uses csattribute.


Note –

To enable these changes, you might also need to rebuild alias tables or configurations. Refer to the documentation for Messaging Server (or your email product) as well as your site's own documentation and procedures regarding changes to mail services. Messaging Server documentation is available on this at: http://docs.sun.com/coll/1312.1.



Example 14–1 Adding an Email Alias with csattribute

For example, to add the mailalternateaddress attribute for a user named John Smith with these values:

csattribute -a mailalternateaddress=johns@sesta.com add johnsmith
 csattribute -a mailalternateaddress=jsmith@sesta.com add johnsmith

To Check if a User is Enabled for Calendaring

To determine if a specific user exists in your directory server and is enabled to access Calendar Server data, use the csuser utility check command.

For example, to check if jsmith is enabled for calendaring:

csuser check jsmith

If the check command indicates that a user does not exist in your LDAP directory server, you must create a directory server entry for the user.

To Delete a User from LDAP

Use different tools depending on whether you are deleting a user from a hosted domain or a non-hosted domain:


Caution – Caution –

There is no undelete command.

Once users in hosted domains are deleted using Delegated Administrator, they must be purged and re-added from scratch. The user name can not be reused until the purge happens.

For non-hosted domains, see For Non-Hosted Domains Only: Undeleting Users Marked for Deletion but Not Purged.


ProcedureDeleting Users in Schema 2 Using Delegated Administrator

You can mark users for deletion with either Delegated Administrator interface. However you can not purge users from LDAP with Delegated Administrator Console. You must use the Delegated Administrator Utility for that. The following task lists the steps for deleting a user from LDAP. The user is not actually removed from LDAP until the last step is complete.

  1. Mark a user entry for deletion.

    For Delegated Administrator Console: Select the users to delete in the User List page and click Delete.

    For Delegated Administrator Utility: Use the commadmin user delete command. For example:

    commadmin user delete -D chris -n siroe.com 
    -w bolton -l jsmith

    In both cases the icsStatus attribute in the user LDAP entry is changed from active to deleted.

  2. Use the Calendar Server Utility csclean to remove all calendars belonging to all deleted users in one or all domains, as shown in the following example:

    csclean clean “*”

    Or to remove calendars belonging to all deleted users in one domain, specify the actual domain, as shown in the following example: csclean clean sesta.com


    Tip –

    If you inadvertently purge the users from LDAP before deleting the users' calendars, you can remove them later using the cscal utility, as described in Managing User Calendars.


  3. Purge the domain of all users marked for deletion, using Delegated Administrator Utility command commadmin domain purge.

    For example:

    commadmin domain purge -D chris -d sesta.com -n siroe.com -w bolton

    In this example, all users in sesta.com that are marked as deleted will be purged, that is, permanently removed.


    Tip –

    Run this utility manually from time to time to clean up your LDAP directory. For more information about this command, see the Sun Java System Communications Services 6 2005Q4 Delegated Administrator Guide.


Deleting Users in a Schema 1 Environment

To remove the specified user’s LDAP entry and the user’s default calendar, use the Calendar Server utility csuser with the delete command.

For example, to delete the LDAP entry and the default calendar for user jsmith use the following command:

csuser delete jsmith

If you wish to remove the other calendars belonging to this user, you must use cscal as described in Managing User Calendars.

For Non-Hosted Domains Only: Undeleting Users Marked for Deletion but Not Purged

For a non-hosted domain, to undelete users marked for deletion but not yet purged, it is necessary to reset the users' icsStatus attributes to active. You can achieve this by directly changing the LDAP entries (using ldapmodify), or by using the Calendar Server Utility csattribute.

However, in a non-hosted domain, once the user is purged, you can only recover the LDAP server information by restoring it from a backup.

To Reset a User’s Attributes

To restore the default settings of all calendar LDAP attributes for a specific user, use the csuser utility reset command.

For example, to reset all calendar attributes of jsmith to the default configuration settings:

csuser reset jsmith

Note –

After a calendar user has been reset, all of the calendar attributes are removed from the user’s LDAP entry, including icsCalendarUser (object class), icsSubscribed, icsCalendarOwned, icsCalendar, and icsDWPHost (if in the LDAP CLD setup). A Calendar Server administrator will not be able to create calendars on the user’s behalf.

These attributes are restored in the user’s LDAP entry when:


To Rename a User

If one or more user ID's need to be changed, run the csrename utility. This utility performs the following steps:


Note –

Be aware that changing even one user ID causes the whole database to be rewritten. So this is a “costly” utility to run.

For instructions on how to run the csrename utility, see Appendix D, Calendar Server Command-Line Utilities Reference.


ProcedureTo Disable Users from Having Publicly Writable Calendars

  1. Log in as an administrator with permission to change the configuration.

  2. Change to the /etc/opt/SUNWics5/cal/config directory.

  3. Save your old ics.conf file by copying and renaming it.

  4. Edit the following ics.conf parameter as shown in the following table:

    Parameter  

    Description and Default Value  

    service.wcap.

    allowpublicwritablecalendars

    Enables users to have publicly writable calendars. This is enabled by default (set to “yes”).

  5. Save the file as ics.conf.

  6. Restart Calendar Server.

    cal_svr_base/SUNWics5/cal/sbin/start-cal

Managing Resources

After your resources are added, you can administer them using csresource:

ProcedureTo List Resources

  1. Change to the sbin directory.

  2. Use the csresource list command to list one or all resources.

    For example, list all the information about all the resources:

    ./csresource -v list

ProcedureTo Enable Resources

  1. Change to the sbin directory.

  2. Use the csresource enable command to enable one or more resources.

    For example, to enable the ConfRm12 resource:

    ./csresource -v enable ConfRm12

ProcedureTo Disable Resources

  1. Change to the sbin directory.

  2. Use the csresource disable command to disable one or more resources. For example, to disable the ConfRm12 resource:

    ./csresource -v disable ConfRm12

ProcedureTo Delete Resources

  1. Change to the sbin directory.

  2. Use the csresource delete command to delete one or more resources. For example, to delete the ConfRm12 resource:

    ./csresource -v delete ConfRm12

To Set Up a Bitbucket Channel for Resource Email

This section contains directions for setting up a bitbucket channel for both Messaging Server and Sendmail. The bitbucket channel is a way to discard the email generated for resource calendars. These examples use a resource named Room100 on the sesta.com server. If you don’t set up the bitbucket channel (or equivalent), you will need to periodically delete the email messages sent to the resource calendar.

This section contains the following procedures:

ProcedureTo Set up the Messaging Server Bitbucket Channel

  1. Ensure the bitbucket channel is defined in the imta.cnf file.

  2. To direct messages to the bitbucket channel, create the email address for the resource using the csattribute utility:


    csattribute -a mail=Room100@bitbucket.sesta.com add Room100

ProcedureTo Set up a Sendmail Bitbucket Channel

  1. In the /etc/aliases file on the appropriate host, add an entry such as:


    Resource/Conference room aliases
     Room100: /dev/null
  2. Add the email address for the resource to the LDAP directory using the csattribute utility:


    csattribute -a mail=Room100@sesta.com add Room100

Managing User and Resource LDAP Attributes

Manage LDAP attributes used by Calendar Server, with the csattribute utility, or ldapmodify. Attributes can be listed, added, or deleted with csattribute. To modify an attribute, use ldapmodify. This section contains the following topics:

ProcedureTo List LDAP Entry Attributes

  1. Log in as the user or group under which Calendar Server is running (such as icsuser and icsgroup) that was specified during installation, or as root

  2. Change to the sbin directory.

  3. Use the csattribute list command to list the attributes for a user or a resource. For example, to list the attributes for tchang@sesta.com:, issue the following command:

    ./csattribute -t user -d sesta.com list tchang

ProcedureTo Add an LDAP Entry Attribute

  1. Log in as the user or group under which Calendar Server is running (such as icsuser and icsgroup) that was specified during installation, or as root

  2. If you want this attribute change to be recognized immediately, stop Calendar Server. Otherwise, you do not have to stop Calendar Server.

  3. Change to the sbin directory.

  4. Use the csattribute add command to add an attribute to a user or a resource. For example, to add the LDAP attribute icsCalendar with the value Conference_Schedule to the user tchang:

    ./csattribute -a icsCalendar=Conference_Schedule add tchang@sesta.com

ProcedureTo Delete an LDAP Entry Attribute

  1. Log in as the user or group under which Calendar Server is running (such as icsuser and icsgroup) that was specified during installation, or as root

  2. If you want this attribute change to be recognized immediately, stop Calendar Server. Otherwise, you do not have to stop Calendar Server.

  3. Change to the sbin directory.

  4. Use the csattribute delete command to delete an attribute from a user or a resource. For example, to delete the LDAP attribute icsCalendar with the value Conference_Schedule from the user tchang:

    ./csattribute -a icsCalendar=Conference_Schedule -t user 
       -d sesta.com delete tchang

To Modify an LDAP Entry Attribute

To modify an LDAP entry attribute, use ldapmodify. For example, to change the status of user with uid=tchang, use ldapmodify as shown:


dn:uid=tchang,ou=people,o=sesta.com
 changetype: modify
 add: objectclass
 objectClass: icsCalendarUser
 add: icsStatus
 icsStatus: active

Note –

If your site is using the LDAP CLD plug-in, do not attempt to move a user’s calendars from one back-end host to another by changing the value of icsDWPHost, using csattribute. Modifying icsDWPHost does not cause the calendar to be moved to the new back-end host. For instruction on how to move a calendar from one back-end server to another, see Managing User Calendars.