The default domain is the one that was configured in Administration Tab - Option manager - Ldap options.
Here , it is not defined the variable @NX_LDAP_DOMAIN for the default domain and then you can reference to it, omitting the -n parameter in the pdm_ldap_import command i.e. pdm_ldap_import without the -n parameter does not return any error and import the users from default domain.
Same, when you import the contacts from web interface Service Desk Tab - New Contact from Ldap ... in the Domain Name field , you do not specify any value and you get the contacts from the default domain defined in Option manager - Ldap options.
But if you "name" this default domain by defining it manually in the NX.env file the variable @NX_LDAP_DOMAIN=AD1 (by example) , then you will need to reference this default domain by the name you set , and so, you need the -n flag :
pdm_ldap_import -n "AD1"
The same also applies when you import the contacts from web interface Service Desk Tab - New Contact from Ldap ... in the Domain Name field , you need to specify the "name" set , if not, you will get the "Ldap agent not found" error.
