Skip to content

Deleting user IDs

The delete feature of the Sametime Database utility removes specified individual contact names from contact lists and privacy lists.

Stop the Sametime server prior to running the Sametime Database utility. Refer to Starting and stopping the Sametime server for the steps.

The following is the format for the delete task in the CVS file. Each user ID to be deleted is listed on a separate line.

DELETE
"uid"

CSV files are case-sensitive and sensitive to spaces.

  1. Create a CSV file. The file must be saved in UTF-8 format.

    In the CVS file, specify the DELETE descriptor followed by the UIDs to be deleted. Specify each UID on a separate line. For example:

    DELETE
    uid=John Deere,ou=sametime,dc=hcl,dc=com
    uid=Marta Smith,ou=sametime,dc=hcl,dc=com
    cn=portaladminid,o=example.com 
    
  2. Copy the CSV file into an accessible read or writable location.

  3. Create or edit a file that contains the environment variables.

    1. Add the MongoDB access information to the file.

      MONGO_CONNECTION_URL=mongodb://username:password@ip-address:port​
      
    2. Add the location of the CVS file.

      DELETE_CSV=/temp/test_delete.csv
      
    3. To delete the chat history of the affected IDs, add the following line.

      DEEP_DELETE=1
      

    The following is an example env_file_name file.

    MONGO_CONNECTION_URL=mongodb://sametimeUser:xxxxxxxx@192.168.1.1:27017/admin?authSource=admin&authMechanism=SCRAM-SHA-256&readPreference=primary&directConnection=true&ssl=false
    DELETE_CSV=/temp/test_delete.csv
    DEEP_DELETE=1
    
  4. Mount the CVS file in the container for the application to access and process.

  5. Run the Database utility using the following command. The CSV file is mounted in the container in the/temp directory in the following example for the application to access and process. The tag attribute is the image tag to use.

    docker run -v /temp:/temp:rw --env-file env\_file\_name.env hclcr.io/st/sametime-db-utility:tag
    
  6. To verify your changes, view the report created in the data directory.

Parent Topic: Using the Sametime Database utility