Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Outline of the current configuration items

    'auth_method_[1-3]' => 'ldap',  # Up to three types of Authentication.  Use 'ldap', or ldaps' for ldaps

    'auth_ldap_acc' => 'CN=omklatam, ou = Services, dc = OPMANTEK, dc = corp',   # The Admin read-only access distinctive name used to query the database.

    'auth_ldap_attr' => 'sAMAccountName cn',  #

    Spare

    Space or comma separated list (often 'sAMAccountName', for Active Directory and 'cn' for standard LDAP).

    'auth_ldap_base' => 'dc=corp, dc=example,dc=com',   # Base to search in LDAP

    'auth_ldap_debug' => 'true'/'false',  # How to enable debug mode to capture the LDAP Server output (default 'false').

    'auth_ldap_psw' => 'password,',   # The Admin read-only access password used to query the database.

    'auth_ldap_server' => 'host_LDAP: 389',  # The LDAP Server name and and port.

    'auth_ldaps_server' => 'host_LDAP: 636',  # The LDAP Server name and and port for secure access.

    'auth_ldaps_capath' => '<pathname>',  # The full path to an SSL certificate directory.

    'auth_ldaps_verify' => 'optional',  # One of  'none' ,  'optional' , or 'require' (default 'optional').


    Aspects to consider:


    Info
    titleNOTE on MS-LDAPS SSL

    To use SSL/TLS secured LDAP (LDAPS) see the differences in the table in User Management in NMIS8 .

    In summary it requires Optional Perl Modules: IO::Socket::SSL and Net::LDAPS and uses config items:
    'auth_method_1' => 'ldaps'
    'auth_ldaps_server' => 'host[:port]'    (note the s at the end of ldaps vs ldap)

    If you use an internal CA for your AD LDAP SSL certificates you will need to import your internal root CA public certificates so that SSL can trust the connection.  Search processes for your NMIS servers OS.


    LDAP Base: The base is the root of the LDAP/Active Directory database, since it is the place where the search of the users who need to authenticate will be carried out. Taking as reference the structure of the Directory will be as follows: 

    'auth_ldap_base' => 'dc = OPMANTEK, dc = corp', #base to search in LDAP

    The account is the service account which user is going to authenticate with the LDAP server, to enable the search of the LDAP Database for users. 

    Therefore, the first part is added is the service account username CN=omklatam

    The second part is the OU = Servicescontainer

    The third part is the domain DC = OPMANTEK and DC = corp.

    The result would be the following: 

    'auth_ldap_acc' => 'CN = omklatam, ou = Services, dc = OPMANTEK, dc = corp',


    To find the user and group base DN, run a query from any member server on your Windows domain:

    Finding the User Base DN

                    For Windows:

    • Open a Windows command prompt.
    • Type the command:
    Code Block
    dsquery user -name <known username>"(|(samaccountname=dreed)(cn=dreed)(uid=dreed))" 


    Example: If you are searching for all users named "John", you can enter the username as John* to get a list of all users who's name is John.
    The result will look like:

    Code Block
    "CN=John.Smith,CN=Users,DC=MyDomain,DC=com"

                    For standard LDAP, Linux, or Windows using standard 'ldapsearch' command:

    • Open a Terminal shell.
    • Type the command:
    Code Block
    ldapsearch -H ldap://<server>:389 -x -b "dc=MyDomain,dc=com"   <- all users without authorization
        ... or ...
    ldapsearch -H ldap://<server>:389 -x -b "dc=MyDomain,dc=com" -D "cn=admin,MyDomain,dc=com" -w 'MyAdminPassword'  <- all users with authorization
         ... or ...
    ldapsearch -H ldap://<server>:389 -x -b "dc=MyDomain,dc=com" "(|(samaccountname=john)(cn=john)(uid=john))"   <- users named "John" without authorization
        ... or ...
    ldapsearch -H ldap://<server>:389 -x -b "dc=MyDomain,dc=com" -D "cn=admin,MyDomain,dc=com" -w 'MyAdminPassword' "(|(samaccountname=john)(cn=john)(uid=john))"  <- users named "John" with authorization


    Example: If you are searching for all users named "John", you can enter the username as John* to get a list of all users who's name is John.
    The result will look like:

    Code Block
         ... All Users ...
    dn: cn=john,dc=MyDomain,dc=com
    dn: cn=steve,dc=MyDomain,dc=com
         ... John ...
    dn: cn=john,dc=MyDomain,dc=com


...