Changes between Initial Version and Version 1 of campuswifiandeduroam2023Agenda/Lab


Ignore:
Timestamp:
Jun 24, 2024, 3:23:17 PM (3 months ago)
Author:
tuwan
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • campuswifiandeduroam2023Agenda/Lab

    v1 v1  
     1= Lab Setup =
     2
     3In this Hands-on we will install phpLDAPadmin in Linux.
     4
     5
     6=== Installing and Configuring the phpLDAPadmin Web Interface ===
     7
     8The Ubuntu repositories contain a phpLDAPadmin package. You can install it with {{{apt-get}}}
     9
     10{{{sudo apt-get install phpldapadmin}}}
     11
     12This will install the application, enable the necessary Apache configurations, and reload Apache.
     13
     14The web server is now configured to serve the application, but we need to make some additional changes. We need to configure phpLDAPadmin to use our domain, and to not autofill the LDAP login information.
     15
     16Begin by opening the main configuration file with root privileges in your text editor:
     17
     18{{{sudo nano /etc/phpldapadmin/config.php}}}
     19
     20Look for the line that starts with {{{servers->setValue('server','name'}}}. In nano you can search for a string by typing {{{CTRL-W}}}, then the string, then {{{ENTER}}}. Your cursor will be placed on the correct line.
     21
     22This line is a display name for your LDAP server, which the web interface uses for headers and messages about the server. Choose anything appropriate here:
     23
     24/etc/phpldapadmin/config.php
     25
     26{{{$servers->setValue('server','name','Example LDAP');}}}
     27
     28Next, move down to the {{{$servers->setValue('server','base' }}}line. This config tells phpLDAPadmin what the root of the LDAP hierarchy is. This is based on the value we typed in when reconfiguring the slapd package. In our example we selected example.ac.lk and we need to translate this into LDAP syntax by putting each domain component (everything not a dot) into a dc= notation:
     29
     30{{{$servers->setValue('server','base', array('dc=example,dc=ac,dc=lk'));}}}
     31
     32Now find the login {{{bind_id}}} configuration line and comment it out with a # at the beginning of the line:
     33
     34{{{#$servers->setValue('login','bind_id','cn=admin,dc=example,dc=com');}}}
     35
     36This option pre-populates the admin login details in the web interface. This is information we shouldn’t share if our phpLDAPadmin page is publicly accessible.
     37
     38The last thing that we need to adjust is a setting that controls the visibility of some phpLDAPadmin warning messages. By default the application will show quite a few warning messages about template files. These have no impact on our current use of the software. We can hide them by searching for the {{{hide_template_warning}}} parameter, uncommenting the line that contains it, and setting it to '''true''':
     39
     40{{{$config->custom->appearance['hide_template_warning'] = true;}}}
     41
     42Having made the necessary configuration changes to phpLDAPadmin, we can now begin to use it. Navigate to the application in your web browser. Be sure to substitute your domain for the highlighted area below:
     43
     44This is the last thing that we need to adjust. Save and close the file to finish. We don’t need to restart anything for the changes to take effect.
     45
     46Next we’ll log into phpLDAPadmin.
     47
     48=== Logging into the phpLDAPadmin Web Interface ===
     49
     50{{{https://example.ac.lk/phpldapadmin}}}
     51
     52The phpLDAPadmin landing page will load. Click on the login link in the left-hand menu on the page. A login form will be presented:
     53