Issue
- This article provides you detailed steps to set up and configure Microsoft Server AD to Liferay.
Environment
- Liferay DXP 7.1
Resolution
Changing Computer Name:
- Control Panel → System and Security → System
- Computer name, domain and workgroup settings → Change Settings
- Click Change. You will see your computer's name listed.
- In the space marked Computer Name, delete the text and enter a new name for your computer (Example Name: WINSERVER )
- Restart
Set up Active Directory:
- On server manager click on 'Add roles and features'
- It opens the add roles and features wizard. Click on Next to proceed
- Select Role-based or feature-based installation and click on Next
- Select your computer name and click on Next
- In this window put tick box for Active Directory Domain Services and DNS
Server. It will prompt to show you what are the associated features for the role. Click on
add features to add all (ignore the DNS warning for the moment). Then click Next to
continue - In the next window, mark all the .NET Framework Features and click Next
- It will give a brief description about AD DS service and DNS Server, click next to proceed
and Install - Once installation completes, click on the option Promote this server to a domain
controller - Then it will open the active directory configuration wizard, select the option to Add new
forest and type the root domain name (Example: INTDOMAIN.LOCAL ) - Type a password for DSRM, then click Next
- No need for any DNS modifications yet. Click Next to proceed
- For the NETBIOS name keep the default (Example: INTDOMAIN ) and click Next
- Next page is to define the NTDS, SYSVOL, and LOG file folders. You can keep defaults.
Click Next - Next page will give the option to review the configuration changes. If everything okay you can
Click Next to proceed - Install and wait. After the installation system will restart automatically. Once it comes
back log in to the server domain (Example: INTDOMAIN\Administrator ) - Open a PowerShell console and use Get-ADDomain | fl Name, DomainMode and
Get-ADForest | fl Name, ForestMode to confirm domain and forest functional
levels
Creating the user in AD:
- Server Manager Dashboard → Tools → Active Directory Users and
Computers - Your Domain (Example: INTDOMAIN.LOCAL ) → Users → Right Click → New → User
- Add First name/Full name and User logon name, assign a password, and Finish
- Go to Properties of the user and assign the rest of the data (email, last name, etc.)
Configuration at Liferay Side:
Setting user authentication with screen name: Control Panel → Configuration → Instance Settings → Authentication → General → How do users authenticate? set By Screen Name
- Go to Configuration → Instance Settings → Authentication → LDAP and
add a new LDAP Server, assign a name (e.g.: WINSERVER) - Select the Microsoft Active Directory Server in the default value
- Now provide the asked information as follows:
-
Base Provider URL : ldap://windows server machine IP:389 (example:
ldap://10.0.2.7:389) -
Base DN : indicate your domain data (example:
DC=INTDOMAIN,DC=LOCAL) - Principal / Credentials : created Admin user Login Credentials (example: INTDOMAIN\Administrator / password)
-
Authentication Search Filter :
(&(objectCategory=person)(sAMAccountName=@screen_name@)) -
Import Search Filter :
(&(objectCategory=Person)(sAMAccountName=*)) - UUID and Screen Name : sAMAccountName
- Email Address: mail
- Password: userPassword
- First Name: givenName
- Last Name: sn
- Full name: cn
Test LDAP Connection and Test LDAP Users to check the connection and
recover the available users. Save and Enable the LDAP at the principal screen
Additional Information
- At the time of AD user login, there might be a case you can get an authentication error which can be solved by unchecking "User must change password at next logon" at the time of user creation.