Wednesday, July 11, 2012

LDAP - Error - A referral was returned from the server

Problem:
System throws below error-01 when try to execute command-01.

Error-01:Add error on line 2: Referral

The server side error is "A referral was returned from the server."
0 entries modified successfully.
An error has occurred in the program

Command-01:
ldifde /i /f schema.ldf /v /k /c "DC=development,DC=com" "dc=test,dc=com"


Cause:
1. The export file had different mapping where export was taken from another box but in the import command it specify 'development'


Solution:
1. Need to make sure export environment is correctly mentioned in import which is the first parameter for '-c' switch


Note:
1. DC values are comma separated
2. No space in between DCs

Resources:
1. http://support.microsoft.com/kb/276382
2. http://support.microsoft.com/kb/237677

VirtualBox - Setup - RDP to windows VM

There are two options to setup Remote Desktop in Guest VM using Oracle VirtualBox. Once the RDP is setup, windows RDP client can be used to connect to the VM.

1. Option-01: Use VirtualBox RDP feature
2. Option-02: Use guest VM's RDP directly

Environment Information:
1. Operating System: Windows 2008 R2
2. Oracle VirtualBox: 4.1.16

Option-01Use VirtualBox RDP featureSetup Correct Network Adapter:

  1. Enable 'Remote Display Server' in VM Manager
    1. Go to VirtualBox Manager
    2. Select the VM where RDP is needed
    3. Click 'Settings'
    4. From left navigation panel, click 'Display'
    5. From right pane, select 'Remote Display' tab
    6. Check 'Enable Server'
    7. Provide a port number in 'Server Port:' (remember this port which will be needed to setup Firewall later)
    8. Click 'OK'
  2. Enable RDP in host:
    1. Click 'Start', point to 'Control Panel', click 'System and Security', click 'System' and then click 'Remote Settings' or
      Click 'Start', right-click 'My Computer', click 'Properties' and then click 'Remote Settings'
    2. On 'Remote' tab, under 'Remote Desktop' section, select 'Allow connections from computers', second option. (Based on need, third option can be selected; Allow connections only from computers running Remote Desktop with network level authentication)
  3. Create a Firewall rule in host:
    1. Click 'Start' - 'Administrator Tools' - Windows Firewall with Advanced Security'
    2. Click 'Inbound Rules' from left navigation panel
    3. Click 'New Rule...'
    4. Select 'Port' - hit 'Next'
    5. Select 'TCP', specify port number which is given in Step-01.07 - hit 'Next'
    6. Select 'Allow the connection' - hit 'Next'
    7. Select 'Domain', 'Private', 'Public' based on need - hit 'Next'
    8. Provide a unique name for the rule - hit 'Finish'
  4. Install VirtualBox Guest Additions
Option-02Use guest VM's RDP directly:
  1. Enable Remote Desktop in guest:
    1. Click 'Start', point to 'Control Panel', click 'System and Security', click 'System' and then click 'Remote Settings' or
      Click 'Start', right-click 'My Computer', click 'Properties' and then click 'Remote Settings'
    2. On 'Remote' tab, under 'Remote Desktop' section, select 'Allow connections from computers', second option. (Based on need, third option can be selected; Allow connections only from computers running Remote Desktop with network level authentication)
  2. Setup Correct Network Adapter:
    1. Go to VirtualBox Manager
    2. Select the VM where RDP is needed
    3. Click 'Settings'
    4. From left navigation panel, click 'Network'
    5. Go to appropriate adapter tab. Most of the times, a VM has only one adapter, in that case 'Adapter 1' tab has to be selected
    6. Select 'Bridged Adapter' under 'Attached to:' dropdown
    7. Select the appropriate network from 'Name:'. If host machine has multiple network adapters (Wireless, NIC card etc.), all will be displayed here.
    8. Need to make sure 'Cable Connected' checkbox is checked
    9. Press 'OK'
Note:
1. Collect host OS's IP address and the port number against that RDP/firewall is setup to connect from RDP client when using Option-01.
2. Collect guest OS's IP address to connect from RDP client when using Option-02.