From 51f258128f0aff21ceb641ef44af0766ad87df27 Mon Sep 17 00:00:00 2001 From: "jr2158@student.uni-lj.si" Date: Fri, 17 Feb 2017 11:23:04 +0000 Subject: How to for ldap_search task. git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@379 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414 --- kpov_judge/tasks/ldap_search/howtos/en/index.html | 34 +++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/kpov_judge/tasks/ldap_search/howtos/en/index.html b/kpov_judge/tasks/ldap_search/howtos/en/index.html index 0ee5f2a..31bb1e9 100644 --- a/kpov_judge/tasks/ldap_search/howtos/en/index.html +++ b/kpov_judge/tasks/ldap_search/howtos/en/index.html @@ -14,13 +14,13 @@
  1. Create two virtual machines, SimpleArbiterDhcpGWLDAP(simpleArbiterDhcpGWLDAP.vdi) and LDAPServer(student-LDAPServer.vdi). -
    No img
  2. +
    No img
  3. Change the network settings to both virtual machines. SimpleArbiterDhcpGWLDAP: Adapter 1 is set to "NAT" for internet access and adapter 2 to "internal network" for local network. LDAPServer: Adapter 1 set to "internal network" sot that it is in the same internal network as SimpleArbiterDhcpGWLDAP. -
    No img -
    No img -
    No img
  4. +
    No img +
    No img +
    No img
  5. In SimpleArbiterDhcpGWLDAP log in as user "tester", in LDAPServer log in as user "root", run the command "apt-get update" to update the list of packages and open up another terminal by pressing "ALT+F2" and log in as user "student".
  6. @@ -29,14 +29,14 @@
    During the LDAP server installation you'll have to provide the password for the user "admin", the administrator of the server and confirm the password chosen.
  7. Configure the LDAP server by choosing the appropriate domain name and other configuration parameters. Execute the commmand "dpkg-reconfigure slapd". -
    No img -
    No img -
    No img -
    No img -
    No img -
    No img -
    No img -
    No img +
    No img +
    No img +
    No img +
    No img +
    No img +
    No img +
    No img +
    No img
    a) If you will configure the "slapd" again don't forget to remove the old database "rm -rf /var/backups/unknown-2.4.44+dfsg-2.ldapdb".

  8. Now that the LDAP server is configured for use, try to open a third console and log in as user "student" and execute the command "ldapsearch -D cn=admin,dc=ceres-20,dc=kpov, @@ -46,20 +46,20 @@
    "ldapsearch -D cn=admin,$D -wvaje -b $D"

  9. Create the file(LDIF format) "users.ldif" which will contain the objects(users) that we want to add to the LDAP server database. -
    No img +
    No img
    Execute the following command to add users to the LDAP server:
    "ldapadd -D cn=admin,$D -wvaje -f users.ldif"
    Add password to the users added to the LDAP server:
    "ldappasswd -D cn=admin,$D -wvaje -sj2531e cn=ninavidmar,ou=users,$D"
    "ldappasswd -D cn=admin,$D -wvaje -scTyRM0 cn=natalijaribnikar39,ou=users,$D"
    Execute command "ldapsearch -D cn=natalijaribnikar39,ou=users,$D -wcTyRM0 -b $D" to bind to the LDAP server with the newly added user "natalijaribnikar39" and to see the entries currently in the LDAP server. -
    No img
  10. +
    No img
  11. In order to change the users' rights settings, which allows a user to add entries to the directory and change values of attributes of entries in the directory you need to create an additional file acl.ldif:
    To see which backend database is used and other settings related to the users' rights execute command "ldapsearch -Y EXTERNAL -H ldapi:/// -b cn=config" as root user in the system, which does not need the user authentication to the LDAP server. -
    No img +
    No img
    The settings in the acl.ldif file: -
    No img +
    No img
    Now to change users' rights run the command "ldapmodify -Y EXTERNAL -H ldapi:/// -f acl.ldif" as user "root" in the system.

  12. The user "natalijaribnikar39" has the right to add or change objects in the LDAP server. @@ -67,7 +67,7 @@
    "ldapadd -D cn=natalijaribnikar39,ou=users,$D -wcTyRM0 -f newuser.ldif"

  13. Now to test your result go to the SimpleArbiterDhcpGWLDAP virtual machine and run "./test_task.py" to run the test and see your score. -
    No img
  14. +
    No img
-- cgit v1.2.1