summaryrefslogtreecommitdiff
path: root/kpov_judge/tasks/radius_mysql_pam
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2018-10-13 21:58:29 +0200
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2018-10-13 21:59:11 +0200
commite4e109c16ef27012157cb38cf6375c1ae4d2ef69 (patch)
treeff2350f8f769d92544202cb5d2149155aa1d04cb /kpov_judge/tasks/radius_mysql_pam
parentf2060d5143f5c4b14bfff723d238c497a0053f17 (diff)
parent5439f75ca2e1a38803a96853b6cac0ce5c9f58ce (diff)
Merge branch 'improve-web'
Store instructions in HTML and render with jinja2. Add i18n with gettext / pybabel. Improve styling.
Diffstat (limited to 'kpov_judge/tasks/radius_mysql_pam')
-rw-r--r--kpov_judge/tasks/radius_mysql_pam/task.py65
1 files changed, 30 insertions, 35 deletions
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': '''\
+<p>
+Ustvari dva navidezna računalnika: <em>SimpleArbiter</em> in <em>RadiusServer</em>. Na <em>RadiusServer</em> 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.
+<p>
+Ustvari podatkovno bazo MySQL z imenom <code>{{MYSQL_DB_NAME}}</code>. Ustvari uporabnika za MySQL z imenom <code>{{MYSQL_ADMIN_USER}}</code> in geslom <code>{{MYSQL_ADMIN_PASSWORD}}</code>, ki naj ima poln dostop do te baze. Prijava za tega uporabnika mora biti omogočena tudi s <em>SimpleArbiter</em>.
-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
+<p>
+Nastavi FreeRadius tako, da bo podatke o uporabnikih in geslih pobiral iz baze MySQL z imenom <code>{{MYSQL_DB_NAME}}</code>. Podatkovna shema (imena tabel) naj ostane
privzeta.
-Dostop do strežnika Radius na RadiusServer s SimpleArbiter naj bo mogoč ob
-uporabi skrivnosti {RADIUS_SECRET}.
+<p>
+Dostop do strežnika Radius na <em>RadiusServer</em> s <em>SimpleArbiter</em> naj bo mogoč ob uporabi skrivnosti <code>{{RADIUS_SECRET}}</code>.
-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}.
+<p>
+V bazi ustvari vnos, ki bo omogočil, da se na <em>RadiusServer</em> s pomočjo protokola Radius avtenticira uporabnik <code>{{RADIUS_USERNAME}}</code> z geslom <code>{{RADIUS_PASSWORD}}</code>.
-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.
+<p>
+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 <code>/etc/shadow</code> oziroma <code>/etc/password</code>.
+''',
+ 'en': '''\
+<p>
+Create two virtual machines: <em>SimpleArbiter</em> and <em>RadiusServer</em>. On <em>RadiusServer</em>, 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.
+<p>
+Create a MySQL database named <code>{{MYSQL_DB_NAME}}</code>. Create a mysql user with the username <code>{{MYSQL_ADMIN_USER}}</code> and password <code>{{MYSQL_ADMIN_PASSWORD}}</code>. Make sure this user can access the database from <em>SimpleArbiter</em> and has administrative rights over the <code>{{MYSQL_DB_NAME}}</code> database.
-Set up FreeRadius so that the data about users and passwords is stored in the
-MySQL database. Keep the default schema (table names).
+<p>
+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.
+<p>
+Make the Radius server on <em>RadiusServer</em> accessible from <em>SimpleArbiter</em> using <code>{{RADIUS_SECRET}}</code> 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}.
+<p>
+Create an entry in the database which will enable a user with the username <code>{{RADIUS_USERNAME}}</code> to authenticate themself against the Radius server using the password <code>{{RADIUS_PASSWORD}}</code>.
-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.
-"""
+<p>
+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 <code>/etc/shadow</code>
+and/or <code>/etc/password</code>.
+''',
}
#KABOOM