From c5a8b2c72841ad0b58fb36870624737634778056 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Sat, 13 Oct 2018 03:10:03 +0200 Subject: HTMLize instructions and use jinja2 to render them Only fixed tasks for the kpov_2018 class for now. --- kpov_judge/tasks/radius_mysql_pam/task.py | 65 ++++++++++++++----------------- 1 file changed, 30 insertions(+), 35 deletions(-) (limited to 'kpov_judge/tasks/radius_mysql_pam/task.py') diff --git a/kpov_judge/tasks/radius_mysql_pam/task.py b/kpov_judge/tasks/radius_mysql_pam/task.py index 72b5a74..5051bb4 100644 --- a/kpov_judge/tasks/radius_mysql_pam/task.py +++ b/kpov_judge/tasks/radius_mysql_pam/task.py @@ -1,52 +1,47 @@ # kpov_util should be imported by add_assignment.py instructions = { - 'si':""" -Ustvari dva navidezna računalnika - SimpleArbiter z diska simpleArbiterDhcp ter -RadiusServer. Na RadiusServer namesti FreeRadius ter MySQL. + 'si': '''\ +

+Ustvari dva navidezna računalnika: SimpleArbiter in RadiusServer. Na RadiusServer namesti FreeRadius ter MySQL. -Ustvari mysql podatkovno bazo z imenom {MYSQL_DB_NAME}. Ustvari mysql -uporabnika z imenom {MYSQL_ADMIN_USER} in geslom {MYSQL_ADMIN_PASSWORD}, -ki naj ima poln dostop do te baze. Prijava za tega uporabnika mora biti -omogočena tudi s SimpleArbiter. +

+Ustvari podatkovno bazo MySQL z imenom {{MYSQL_DB_NAME}}. Ustvari uporabnika za MySQL z imenom {{MYSQL_ADMIN_USER}} in geslom {{MYSQL_ADMIN_PASSWORD}}, ki naj ima poln dostop do te baze. Prijava za tega uporabnika mora biti omogočena tudi s SimpleArbiter. -Nastavi FreeRadius tako, da bo podatke o uporabnikih in geslih pobiral iz baze -MySQL z imenom {MYSQL_DB_NAME}. Podatkovna shema (imena tabel) naj ostane +

+Nastavi FreeRadius tako, da bo podatke o uporabnikih in geslih pobiral iz baze MySQL z imenom {{MYSQL_DB_NAME}}. Podatkovna shema (imena tabel) naj ostane privzeta. -Dostop do strežnika Radius na RadiusServer s SimpleArbiter naj bo mogoč ob -uporabi skrivnosti {RADIUS_SECRET}. +

+Dostop do strežnika Radius na RadiusServer s SimpleArbiter naj bo mogoč ob uporabi skrivnosti {{RADIUS_SECRET}}. -V bazi ustvari vnos, ki bo omogočil, da se na RadiusServer s pomočjo protokola -Radius avtenticira uporabnik {RADIUS_USERNAME} z geslom {RADIUS_PASSWORD}. +

+V bazi ustvari vnos, ki bo omogočil, da se na RadiusServer s pomočjo protokola Radius avtenticira uporabnik {{RADIUS_USERNAME}} z geslom {{RADIUS_PASSWORD}}. -Nastavi PAM za prijavo (login) tako, da bo dovolj, če se uporabnik na ssh -predstavi z uporabniškim imenom in geslom, ki sta veljavna na FreeRadius, -ne glede na /etc/shadow oziroma /etc/password. -""", - 'en':""" -Create two virtual machines - SimpleArbiter using the disk simpleArbiterDhcp -and RadiusServer. On RadiusServer, install FreeRadius and MySQL. +

+Nastavi PAM za prijavo (login) tako, da bo dovolj, če se uporabnik na SSH predstavi z uporabniškim imenom in geslom, ki sta veljavna na FreeRadius, ne glede na /etc/shadow oziroma /etc/password. +''', + 'en': '''\ +

+Create two virtual machines: SimpleArbiter and RadiusServer. On RadiusServer, install FreeRadius and MySQL. -Create a mysql database named {MYSQL_DB_NAME}. Create a mysql user with the -username {MYSQL_ADMIN_USER} and password {MYSQL_ADMIN_PASSWORD}. Make sure -this user can access the database from SimpleArbiter and has administrative -rights over the {MYSQL_DB_NAME} database. +

+Create a MySQL database named {{MYSQL_DB_NAME}}. Create a mysql user with the username {{MYSQL_ADMIN_USER}} and password {{MYSQL_ADMIN_PASSWORD}}. Make sure this user can access the database from SimpleArbiter and has administrative rights over the {{MYSQL_DB_NAME}} database. -Set up FreeRadius so that the data about users and passwords is stored in the -MySQL database. Keep the default schema (table names). +

+Set up FreeRadius so that the data about users and passwords is stored in the MySQL database. Keep the default schema (table names). -Make the Radius server on RadiusServer accessible from SimpleArbiter using -{RADIUS_SECRET} as the secret. +

+Make the Radius server on RadiusServer accessible from SimpleArbiter using {{RADIUS_SECRET}} as the secret. -Create an entry in the database which will enable a user with the username -{RADIUS_USERNAME} to authenticate themself against the Radius server using -the password {RADIUS_PASSWORD}. +

+Create an entry in the database which will enable a user with the username {{RADIUS_USERNAME}} to authenticate themself against the Radius server using the password {{RADIUS_PASSWORD}}. -Set up PAM to enable login over ssh using a username and password which are -valida on the FreeRadius server, regardless of the entries in /etc/shadow -and/or /etc/password. -""" +

+Set up PAM to enable login over SSH using a username and password which are +valida on the FreeRadius server, regardless of the entries in /etc/shadow +and/or /etc/password. +''', } #KABOOM -- cgit v1.2.1