How to export VMDir information from vCenter Server Appliance
search cancel

How to export VMDir information from vCenter Server Appliance

book

Article ID: 326305

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

This article explains how to export the vmdir information from vCenter Server as an LDIF file using the ldapsearch command.

Environment

VMware vCenter Server 8.0.x
VMware vCenter Server 7.0.x

Resolution

Notes:

  • If the vSphere domain was changed from the default vsphere.local, ensure to change the values for dc.

Exporting from vCenter Server Appliance using ldapsearch:

  1. Log in to vCenter Server Appliance using SSH and root credentials.

  2. Run this command to enable the Bash shell:

    shell.set --enabled true

  3. Type shell and press Enter.

  4. Run the following command to export the vmdir as an ldif dump file named after the FQDN of the VCSA and the current date. Enter the password for the SSO administrator account when prompted:

    /opt/likewise/bin/ldapsearch -LLL -h localhost -p 389 -x -b "dc=vsphere,dc=local" -s sub -D "cn=Administrator,cn=Users,dc=vsphere,dc=local" -W  + '*'> $(hostname)_"`date +"%d-%m-%Y"`".ldif