# Setting up LDAP Authentication for ownCloud

1. Log into the Linux device
2. Run the following commands in terminal to install the PHP LDAP module
   # update software repositories
   sudo apt update
   # install php-ldap module
   sudo apt install php-ldap
   # restart apache httpd service
   sudo systemctl restart apache2
3. Launch a web browser and navigate to http://DNSorIP/owncloud
4. Log into ownCloud
5. Click the hamburger menu > Market in the top left corner
6. Press CTRL+F and search for LDAP
7. Click the LDAP Integration app
8. Click the Install button
9. Select Username > Settings from the menu in the upper right hand corner
10. Click Admin > User Authentication in the left navigation menu
11. Fill out the LDAP server form as follows:
    Host: i12bretro.local
    Port: 389
    User DN: readonly_svc@i12bretro.local
    Password: Read0nly!!
    Base DN: CN=users,DC=i12bretro,DC=local
12. Click the Test Base DN button
13. Click the Continue button
14. Click the Continue button
15. Check the LDAP / AD Email Address box and click the Continue button
16. Select Username > Logout from the menu in the upper right hand corner
17. Log into ownCloud using LDAP user credentials