summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kpov_judge/tasks/copy_rename_20_files_tail_env/task.py86
-rw-r--r--kpov_judge/tasks/custom_rdate/task.py12
-rw-r--r--kpov_judge/tasks/isc_dhcp_live_boot/task.py40
-rw-r--r--kpov_judge/tasks/ldap_search/task.py56
-rw-r--r--kpov_judge/tasks/nat_vlc/task.py60
-rw-r--r--kpov_judge/tasks/openvpn_simple_smb/task.py32
-rw-r--r--kpov_judge/tasks/radius_mysql_pam/task.py49
-rw-r--r--kpov_judge/tasks/set_ip_static_dhcp/task.py8
-rw-r--r--kpov_judge/tasks/set_motd/task.py40
-rw-r--r--kpov_judge/tasks/smb_nfs/task.py28
-rw-r--r--kpov_judge/tasks/snmp_agent_uptime/task.py11
-rw-r--r--kpov_judge/tasks/vlc_stream_rtp/task.py23
12 files changed, 283 insertions, 162 deletions
diff --git a/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py b/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py
index 0b4bcff..504d102 100644
--- a/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py
+++ b/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py
@@ -2,43 +2,67 @@
# -*- coding: utf-8 -*-
# kpov_random_helpers should be imported by add_assignment.py
-# TODO (polz):
+# TODO (polz):
instructions = {
'si':u"""
Prijavi se na sistem kot uporabnik student z geslom vaje.
-V domači mapi najdeš imenik Mapa z 20 datotekami.
+V domači mapi najdeš imenik {file_rename_dirname} z 20 datotekami.
- Preimenuj vse datoteke tako, da zamenjaš minuse s podčrtaji
- - Napiši čim krajši ukaz v bash, ki vse datoteke iz enega (izvornega) podanega imenika premakne v drug (ciljni) podani imenik. Spravi ga v /home/student/mv_ukaz. Pazi, da bodo ob testiranju v izvornem imeniku iste datoteke, kot so bile, ko je bila virtualka nova, ciljni imenik pa bo prazen.
- - Napiši ukaz, ki s pomočjo ukaza grep v datoteko ~/mama.txt izpiše vse navadne (ne skrite) datoteke v trenutnem imeniku, ki vsebujejo niz "mama", v datoteko ~/napake.txt pa izpiše vse morebitne napake (npr. to, da so nekateri objekti v trenutnem imeniku dejansko imeniki ali napačne simbolične povezave). Ukaz spravite v datoteko /home/student/mama_ukaz.
- - Napiši program (lahko v bash), ki bo 5s sledil vsebini /var/log/syslog. V primeru, da se v syslogu pojavi niz "zmeda", naj program izpiše "imam ga". Poleg tega naj program med sledenjem syslog-u odšteva od 5 do 1 (vsako sekundo naj se izpiše naslednja številka. Program naj bo v /home/student/syslog_ukaz.sh
- - Nastavi okoljsko spremenljivko TEST, da bo imela isto vrednost kot okoljska spremenljivka USER + število okoljskih spremenljivk, ki v imenu ali vrednosti ne vsebujejo besede TEST. Primer: polz37
-# tole je zoprno, ker se lahko zelo hitro spremeni. Treba bo izbrati
-# neko drugo stran - recimo http://localhost/mojastran.html
- - S pomočjo programa cURL preštej pojavitev niza "images" v html kodi (shranjena stran 24ur.com) in število zapiši v spremenljivko $images.
- - V imeniku "Mapa" najdeš datoteko count.txt. Preštej število vrstic v njej in rezultat zapiši v novo datoteko lines.txt
+ - Napiši čim krajši ukaz v bash, ki vse datoteke iz imenika {mv_src_dir}
+ podanega imenika premakne v imenik {mv_dst_dir}. Spravi ga v
+ /home/student/mv_ukaz. Pazi, da bodo ob testiranju v izvornem imeniku iste
+ datoteke, kot so bile, ko je bila virtualka nova, ciljni imenik pa bo prazen.
+ - Napiši ukaz, ki s pomočjo ukaza grep v datoteko ~/mama.txt izpiše vse
+ navadne (ne skrite) datoteke v trenutnem imeniku, ki vsebujejo niz "mama",
+ v datoteko ~/napake.txt pa izpiše vse morebitne napake (npr. to, da so nekateri
+ objekti v trenutnem imeniku dejansko imeniki ali napačne simbolične povezave).
+ Ukaz spravite v datoteko /home/student/mama_ukaz.
+ - Napiši program (lahko v bash), ki bo 5s sledil vsebini /var/log/syslog. V
+ primeru, da se v syslogu pojavi niz "zmeda", naj program izpiše "imam ga".
+ Poleg tega naj program med sledenjem syslog-u odšteva od 5 do 1 (vsako sekundo
+ naj se izpiše naslednja številka. Program naj bo v /home/student/syslog_ukaz.sh
- Namesti paket "cowsay" in ga preizkusi :)
- - Napiši najkrajši ukaz, ki s pomočjo Pythona zažene preprost (integriran) HTTP strežnik kateri streže datoteke iz imenika, ki ga dobite podanega.
+ - Nastavi okoljsko spremenljivko TEST, da bo imela isto vrednost kot okoljska
+ spremenljivka USER + število okoljskih spremenljivk, ki v imenu ali
+vrednosti ne vsebujejo besede TEST. Primer: polz37
+ - S pomočjo programa cURL preštej število pojavitev niza "images" v html kodi,
+ ki jo dobiš na naslovu http://localhost/{curl_fname} na malishell in število zapiši
+ v spremenljivko $images na simpleArbiter v lupini, kjer poganjaš
+ task_check.py
+ - V imeniku {wc_dirname} najdeš datoteko count.txt. Preštej število vrstic v njej
+ in rezultat zapiši v novo datoteko lines.txt v istem imeniku.
""",
'en':u"""
-Log into the system.
-In your home folder you will find a directory called Folder containing 20 files.
- - Rename all files replacing minus sign with the underscore
- - Specify the shortest command for copying all the files located in /home/user/Folder into the folder /home/user/new
- - Specify the shortest command, which will, using the grep command,
-write all normal (not hidden) files containing a string "mama" located
-in working directory (pwd) into file "mama.txt" while writing errors such as files in current directory being folders or symbolic links in the file called "Errors.txt"
- - Specify a command, which will track the contents of /var/log/syslog
-for 5s. In case it finds the entry "confusion" in syslog, print "got it".
-In addition, let the program subtrack 1 from the counter every
-second(5 to 1) to show the status of the tracker.
+Log into the system as student using vaje as your password.
+In your home folder you will find a directory called {file_rename_dirname}
+ containing 20 files.
+ - Rename all files in that directory replacing all dashes with
+ underscores
+ - Find the shortest command for copying all the files located in
+ {mv_src_dir} into the folder {mv_dst_dir}.
+ Create a shell script /home/student/mv_ukaz containing this commant
+ - Specify the shortest command which will, using the grep command,
+ write all normal (not hidden) files containing a string "mama" located
+ in working directory (pwd) into the file ~/mama.txt while writing errors such as
+ files in current directory being folders or symbolic links in the file called
+ "napake.txt"
+ - Write a program (which may be a shell script) that will track the contents
+ of /var/log/syslog for 5s. Every time an entry containing the string "zmeda"
+ appears in the syslog, in syslog, the script should output "imam ga".
+ In addition, the script should count down from 5 to 1 with a 1 second
+ interval. Store the script in /home/student/syslog_ukaz.sh .
+ - Install the packet "cowsay" and test it :)
- Set the variable TEST, which will have the same value as the
-variable USER + the number of variables that do not include the name
-TEST, for example polz37.
-- With the help of cURL count the number of "images" string occurences in html code (saved 24ur.com website) and save it to variable $images.
-- In directory "Mapa" exists file count.txt
-- Install packet "cowsay" and test it :)
-- Write shortest command possible which will with the help of Python start a simple (integrated) HTTP server and will serve the files from the current directory on port 8000."""
-}
+ variable USER + the number of variables which do not include the name
+ TEST, for example polz37.
+ - With the help of cURL count the number of "images" string occurences in the
+ page accessible from malishell at http://localhost/{curl_fname}.
+ On simpleArbiter within the shell where you are running test_task.py, set
+ the environment variable $images to this number.
+ - In the directory {wc_dirname} there is a file called count.txt. Write the
+ number of lines in this file into a file in the same directory.
+"""
+}
computers = {
'malishell': {
@@ -157,10 +181,6 @@ def task(IP_malishell, file_rename_dirname, mv_src_dir, mv_dst_dir, cowsay_strin
#results['cowsay'] = subprocess.check_output(["dpkg --get-selections | grep","cowsay"])
#results['phttp'] = subprocess.check_output(["lsof -i ",":8080"])
-
-
-
-
return results
def gen_params(user_id, params_meta):
diff --git a/kpov_judge/tasks/custom_rdate/task.py b/kpov_judge/tasks/custom_rdate/task.py
index c619122..1f73887 100644
--- a/kpov_judge/tasks/custom_rdate/task.py
+++ b/kpov_judge/tasks/custom_rdate/task.py
@@ -3,7 +3,6 @@
# kpov_random_helpers should be imported by add_assignment.py
# TODO: finish this!
-
instructions = {
'si':u"""
Postavite dva navidezna racunalnika:
@@ -13,7 +12,8 @@ Postavite dva navidezna racunalnika:
Na rdateClient ustvarite uporabnika test z geslom test. Nastavite cas na
rdateClient tako, da kot rdate strežnik uporabite SimpleArbiterDhcpRdate.
Nato v domacem imeniku uporabnika test ustvarite program z imenom
-PROGRAM_FILENAME. Vrednost PROGRAM_FILENAME preberete na SimpleArbiterDhcpRdate.Program naj prebere 4 byte podatkov s standardnega vhoda in jih pretvori v
+{PROGRAM_FILENAME}.
+Program naj prebere 4 byte podatkov s standardnega vhoda in jih pretvori v
predznaceno celo število, pri čemer naj uporablja zapis z debelim koncem
(big endian).
Število naj program izpiše na standardni izhod v obliki niza.
@@ -22,6 +22,14 @@ predznaceno celo število, pri čemer naj uporablja zapis z debelim koncem
Setup two virtual machines:
- SimpleArbiterDhcpRdate from disk image simpleArbiterRdate and
- rdateClient.
+
+On rdateClient, create a user with the username test and password test.
+Set the time on rdateClient using rdate with SimpleArbiterDhcpRdate as
+the server. Then, write a program called {PROGRAM_FILENAME} and put it in
+user test's home directory.
+The program should read 4 bytes of data from standard input, convert
+them into a signed integer using big endian byte ordering and output the
+resulting integer (as a string) to standard output.
"""
}
diff --git a/kpov_judge/tasks/isc_dhcp_live_boot/task.py b/kpov_judge/tasks/isc_dhcp_live_boot/task.py
index 7061108..1f1278b 100644
--- a/kpov_judge/tasks/isc_dhcp_live_boot/task.py
+++ b/kpov_judge/tasks/isc_dhcp_live_boot/task.py
@@ -7,29 +7,39 @@
instructions = {
'si':u"""
Postavi štiri navidezne računalnike - simpleArbiter, DHCP_server,
-BootableClientA ter BootableClientB. Na simpleArbiter preberi naslove IP_GW, IP_DHCP,
-IP_B ter ime datoteke BOOT_FNAME.
+BootableClientA ter BootableClientB.
-Na DHCP_server postavi DHCP strežnik s pomočjo ISC dhcp 3 na naslovu IP_DHCP.
-SimpleArbiter naj dobi IP_GW. DHCP_server naj ga uporabi kot gateway.
+Na DHCP_server postavi DHCP strežnik s pomočjo ISC dhcp 3 na naslovu {IP_DHCP}.
+SimpleArbiter naj dobi {IP_GW}. DHCP_server naj ga uporabi kot gateway.
-Če se zaganja BootableClientB, naj se sistem zažene v datoteko z imenom BOOT_FNAME.
-Če se zaganja katerikoli drug, naj se sistem zažene z live USB in dobi svoj IP. USB je priklopljen na DHCP_server. Datoteke z nastavitvami za PXELinux MORAJO biti dostopne na korenskem imeniku strežnika TFTP.
+Če se zaganja BootableClientB, naj se sistem zažene v datoteko z imenom {BOOT_FNAME}.
+Če se zaganja katerikoli drug, naj se sistem zažene z živega USB, ki ga predstavlja
+slika diska bootable_usb.
+
+Živi USB priklopite na na DHCP_server ter z njega poberite datoteke, potrebne za zagon.
+Datoteke z nastavitvami za PXELinux, ki jih najdete na živem USB,
+MORAJO biti dostopne na korenskem imeniku strežnika TFTP.
Tako BootableClientA kot BootableClientB naj bosta brez diskov.
""",
-
- 'en': """Set up 4 virtual computers - simpleArbiter, DHCP_server, BootableClientA and
-BootableClientB. On simpleArbiter read the following IPs: IP_GW, IP_DHCP, IP_B as well as the name of the file BOOT_FNAME.
+ # TODO: write a proper translation. The one that used to be here was just wrong.
+ 'en': """Set up 4 virtual computers - simpleArbiter, DHCP_server,
+BootableClientA and BootableClientB.
-On DHCP server install a DHCP server using ISC DHCP 3 for the address IP_DHCP.
-Simple Arbiter should be given the IP_GW address. DHCP_server should user it a s gateway.
+On DHCP_server, set up a DHCP server using ISC dhcp 3. Set the IP address of
+this server to {IP_DHCP}. If SimpleArbiter requests an IP, have the DHCP server
+serve it {IP_GW}. DHCP_server should use SimpleArbiter as it's gateway.
-If the BootableClientB is starting, let it boot into a file called BOOT_FNAME.
-If any other machine is starting, let it boot suign a live USB and get it's IP. USB should be connected to DHCP_server. Files with PXElinux configuration settings must be accesible from the root directory on the TFTP server.
+If BootableClientB tries to boot over the network, have the DHCP server tell it
+to boot from the file {BOOT_FNAME}. If any other system tries to boot over the
+network, have it boot from a live USB drive represented by the disk image
+bootable_usb.
-Both BootableCLientA and B should be diskless.
+Connect the live USB to DHCP_server and copy the files neccessarry for it to
+boot. The PXELinux configuration files must be the same as the ones found on
+the live USB and MUST be accessible on the TFTP server root.
+Both BootableCLientA and BootableClientB should be diskless.
"""
}
computers = {
@@ -158,7 +168,7 @@ def task_check(results, params):
#POINTS FOR EACH TASK MAY BE ADJUSTED IN THE FUTURE
if results['dhcping_other'].find(params['IP_DHCP']) >= 0:
score += 1
- if results['dhcping_other'].find(params['IP_DHCP']) >= 0:
+ if results['dhcping_SA'].find(params['IP_DHCP']) >= 0:
score += 1
p = re.search(r"FNAME:(.*)\r",
results['dhcpdump_other_reply'])
diff --git a/kpov_judge/tasks/ldap_search/task.py b/kpov_judge/tasks/ldap_search/task.py
index 4953694..5612c01 100644
--- a/kpov_judge/tasks/ldap_search/task.py
+++ b/kpov_judge/tasks/ldap_search/task.py
@@ -8,20 +8,62 @@
# TODO: finish this!
instructions = {
'si':u"""
-Ustvari dva navidezna računalnika - SimpleArbiter z diskom simpleArbiterDhcp ter LDAPServer.
+Ustvari dva navidezna računalnika - SimpleArbiter z diskom simpleArbiterDhcp
+ter LDAPServer.
-Za povezavo na strežnik LDAP lahko uporabiš Jxplorer, kjer tudi ustvariš novega uporabnika z danim imenom in geslom.
+Na LDAPServer namesti strežnik LDAP. Strežnik naj skrbi za domeno
+DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
-Na LDAPServer namesti strežnik LDAP in sicer slapd z apt-get install slapd. Na SimpleArbiter preberi ime domene DOMAIN, uporabniško ime LDAP_USERNAME, geslo LDAP_PASSWORD,
-uporabniško ime BIND_USERNAME ter geslo BIND_PASSWORD. Poskrbi, da se bo lahko klient s simpleArbiterDhcp povezal na LDAP strežnik na LDAPServer.
-V primeru, da se klient poveže kot BIND_USERNAME z geslom BIND_PASSWORD, naj strežnik omogoči spreminjanje podatkov za objekt
-CN=LDAP_USERNAME,ou=Users,DC=DOMAIN,DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si ter ustvarjanje novih objektov v DC=DOMAIN,DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+V imeniku ustvari uporabnika
+CN={LDAP_USERNAME},ou=Users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+
+z geslom {LDAP_PASSWORD} in uporabnika
+CN={BIND_USERNAME},ou=Users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+z geslom {BIND_PASSWORD}
+
+Poskrbi, da se bo lahko klient s simpleArbiterDhcp povezal na LDAP strežnik na LDAPServer.
+V primeru, da se klient poveže kot {BIND_USERNAME} z geslom {BIND_PASSWORD},
+naj strežnik omogoči spreminjanje podatkov za objekt
+CN={LDAP_USERNAME},ou=Users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+ter ustvarjanje novih objektov v DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+
+CN = Common Name
+OU = Organizational Unit
+DC = Domain Component
+
+Na SimpleArbiter ustvari program, ki bo s pomočjo ldapsearch izpisal seznam lastnosti (otrok),
+ki jih ima poljuben objekt v domeni {DOMAIN}.kpov.lusy.fri.uni-lj.si.
+Ime objekta (CN) naj program sprejme kot prvi argument.
+""",
+ 'en': u"""
+Create two virtual machines - SimpleArbiter using the disk simpleArbiterDhcp
+and LDAPServer.
+
+Set up an LDAP server on LDAPServer. Make it responsible for
+DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+
+Create a user
+CN={LDAP_USERNAME},ou=Users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+
+with the password {LDAP_PASSWORD} and a user
+CN={BIND_USERNAME},ou=Users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+
+with the password {LDAP_PASSWORD} .
+
+Make sure that a client from simpleArbiterDhcp can connect to the LDAP server on
+LDAPServer. If the client identifies themself as {BIND_USERNAME} with the password
+{BIND_PASSWORD}, allow it to change data for the object
+
+CN={LDAP_USERNAME},ou=Users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+and to create objects in DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
CN = Common Name
OU = Organizational Unit
DC = Domain Component
-Na SimpleArbiter ustvari program, ki bo s pomočjo ldapsearch izpisal seznam lastnosti (otrok), ki jih ima poljuben objekt v domeni DOMAIN.kpov.lusy.fri.uni-lj.si. Ime objekta (CN) naj program sprejme kot prvi argument.
+Create a program on SimpleArbiter which will use ldapsearch to output the list of properties
+(children) of an arbitrary object under {DOMAIN}.kpov.lusy.fri.uni-lj.si.
+The program will be given the CN of the object as it's first argument.
"""
}
diff --git a/kpov_judge/tasks/nat_vlc/task.py b/kpov_judge/tasks/nat_vlc/task.py
index 1d6728c..c393267 100644
--- a/kpov_judge/tasks/nat_vlc/task.py
+++ b/kpov_judge/tasks/nat_vlc/task.py
@@ -12,35 +12,46 @@ instructions = {
'si':u"""
Postavi dva navidezna računalnika - SimpleArbiter z diskom simpleArbiter
ter NATServer. NATServer naj ima dva omrežna vmesnika - z enim naj bo povezan
-na simpleArbiter, z drugim pa na Internet. Na NATServer z ukazom ifconfig in z datoteko /etc/network/interfaces skonfiguriraj omrežne vmesnike tako da bo en vmesnik povezan v WAN (Internet) in en vmesnik na LAN (simpleArbiter). SimpleArbiter skonfiguriraj tako, da
-bo za privzeti prehod uporabljal NATServer. Nastavi DNS (etc/resolv.conf). če še ni, omogoči posredovanje IP naslovov. Nastavi NAT
-z uporabo paketa iptables. Na simpleArbiter z vlc preberi naslov, na katerem si lahko ogledaš kratek filmček.
+na lokalno omrežje, na katerem naj bo tudi simpleArbiter, z drugim pa na
+Internet. Na NATServer skonfiguriraj omrežne vmesnike tako, da bo imel dostop
+do Interneta in da bo imel na lokalnem omrežju {IP_NAT}. Na NATServer
+ustvarite še uporabnika {IP_NAT_user}.
+
+Poskrbi, da bo SimpleArbiter prek DHCP dobil naslov {IP_simple}.
+Poskrbi, da bo NATServer deloval kot prehod za SimpleArbiter in izvajal NAT.
""",
'en':u"""
-Set up two virtual machines - SimpleArbiter (using the disc simpleArbiter) and NATServer. NATServer should have two network adapters. The first is to connect to SimpleArbiter and the second is for connecting to the internet.
-On NATServer use the instruction ifconfig and the file /etc/network/interfaces to configure the network adapters - the first one should be connected to WAN(Internet) and the second one to LAN(SimpleArbiter).
-Configure SimpleArbiter to use NATServer as the default gateway. Setup DNS: /etc/resolv.conf, enable IP forwarding, using the iptables command. On SimpleArbiter, use vlc (network stream) to watch the video.
+Set up two virtual machines - SimpleArbiter (using the disc simpleArbiter) and
+NATServer. NATServer should have two network adapters. Connect the first
+adapter to SimpleArbiter and the second adapter to the Internet. Configure the
+network in NATServer so that one interface is connected to the Internet while
+the other is connected to SimpleArbiter and has the address {IP_NAT}. Create
+a user called {IP_NAT_user} on NATServer.
+
+Configure a DHCP server on NATServer so that SimpleArbiter gets the IP
+{IP_simple}. Also, set up NAT on NATServer and set it as the gateway for
+SimpleArbiter.
"""
}
computers = {
- 'maliNetworkManager': {
+ 'NATServer': {
'disks': [
- { 'name': 'maliNetworkManager',
+ { 'name': 'NATServer',
+ # attempt automount
},
#{ 'name': 'CDROM',
- # 'options':{'readonly': True},
- # 'parts': [],# no parts, no mounting.
- #}
+ # 'options': {'readonly': True},
+ # 'parts': [{'dev': 'b1', 'path': '/cdrom'}],
+ #},
],
- 'network_interfaces': [{'network': 'net1'}],
+ 'network_interfaces': [{'network': 'net1'}, {'network': 'test-net'}],
'flavor': 'm1.tiny',
'config_drive': False
-
},
- 'maliBrezNetworkManager': {
+ 'SimpleArbiter': {
'disks': [
- { 'name': 'maliBrezNetworkManager',
+ { 'name': 'simpleArbiterDhcp',
},
#{ 'name': 'CDROM',
# 'options':{'readonly': True},
@@ -52,20 +63,7 @@ computers = {
'config_drive': False
},
- 'SimpleArbiter': {
- 'disks': [
- { 'name': 'simpleArbiterDhcp',
- # attempt automount
- },
- #{ 'name': 'CDROM',
- # 'options': {'readonly': True},
- # 'parts': [{'dev': 'b1', 'path': '/cdrom'}],
- #},
- ],
- 'network_interfaces': [{'network': 'net1'}, {'network': 'test-net'}],
- 'flavor': 'm1.tiny',
- 'config_drive': False
- }
+
}
networks = { 'net1': {'public': False}, 'test-net': {'public': True} }
@@ -76,8 +74,8 @@ params_meta = {
# 'DNS_NM': {'descriptions': {'si': 'DNS za maliNetworkManager'}, 'w': False, 'public':True, 'type': 'IP', 'generated': True},
'IP_simple': {'descriptions': {'si': 'Naslov SimpleArbiter'}, 'w': False, 'public': True, 'type': 'IP', 'generated': True},
'IP_NAT': {'descriptions': {'si': 'Naslov NAT'}, 'w': False, 'public': True, 'type': 'IP', 'generated': True },
- 'IP_NAT_user': {'descriptions': {'si': 'Username NAT virtualke'}, 'w': False, 'public' : True, 'type' : 'username', 'generated' : True},
- 'IP_NAT_passwd': {'descriptions': {'si': 'Password NAT virtualke'}, 'w': True,'public' : True, 'type' : 'passwd', 'generated' : False},
+ 'IP_NAT_user': {'descriptions': {'si': 'Username na NATServer'}, 'w': False, 'public' : True, 'type' : 'username', 'generated' : True},
+ 'IP_NAT_passwd': {'descriptions': {'si': 'Password na NATServer'}, 'w': True,'public' : True, 'type' : 'passwd', 'generated' : False},
# 'DNS_static': {'descriptions': {'si': 'DNS za maliBrezNetworkManager'}, 'w': False, 'public': True, 'type': 'IP', 'generated': True},
}
diff --git a/kpov_judge/tasks/openvpn_simple_smb/task.py b/kpov_judge/tasks/openvpn_simple_smb/task.py
index 3304fb3..e530bf0 100644
--- a/kpov_judge/tasks/openvpn_simple_smb/task.py
+++ b/kpov_judge/tasks/openvpn_simple_smb/task.py
@@ -5,22 +5,36 @@
instructions = {
'si':u"""
-Postavi dva navidezna racunalnika - SimpleArbiter z diska SimpleArbiterVPN ter
-VPNClient1. Nastavite jima nastavite pravilne mrežne nastavitve (medsebojna povezava in povezava na splet).
-Na VPNClient1 namestite OpenVPN in program za nadzor nad virtualnimi napravami (s katerim kreirate napravo tap).
+Postavi dva navidezna računalnika - SimpleArbiter z diska SimpleArbiterVPN ter
+VPNClient1. Poskrbite, da bosta povezana med seboj in v Internet.
+Na VPNClient1 namestite OpenVPN in program za nadzor nad virtualnimi napravami
+(s katerim kreirate napravo tap).
-Na strežniku SimpleArbiterVPN že teče VPN strežnik, ki uporablja skrivnost, ki jo najdete tudi na VPNClient1 v domačem imeniku uporabnika student.
-Na VPNClient1 vzpostavite VPN tako, da napišete primerno datoteko z nastavitvami.
+Na strežniku SimpleArbiterVPN že teče VPN strežnik in uporablja skrivnost,
+ki jo najdete tudi na VPNClient1 v domačem imeniku uporabnika student.
+Na VPNClient1 vzpostavite VPN tako, da napišete primerno datoteko z
+nastavitvami.
Nato poskrbite, da bo na VPNClient1 na navideznem omrežju prek NFS omogočen
-dostop do imenika /home/tester/DIRNAME, pri čemer DIRNAME preberite na SimpleArbiter.
+dostop do imenika /home/tester/{DIRNAME}.
V ta imenik skopirajte datoteke, ki so prek SMB dostopne na SimpleArbiter.
""",
'en':u"""
Setup two virtual machines - SimpleArbiterVPN and a VPN client (VPNClient1).
-Set the client's network up so that it has access to the internal network and internet. On VPNClient1, install OpenVPN and a program for supervising virtual devices (which you will use to create device tap).
-An OpenVPN server is already running on SimpleArbiterVPN. Use the secret available on VPNClient1 in the home directory of user student to connect to the VPN server on SimpleArbiterVPN. To do that, you will have to write your own OpenVPN configuration file. After you have set up the VPN, make the directory
-/home/test/DIRNAME on VPNClient1 available over NFS from SimpleArbiter over your VPN. Copy files that are available from SimpleArbiter over SMB to DIRNAME.
+Set the client's network up so that it has access to the internal network and
+the internet.
+On VPNClient1, install OpenVPN and a program for supervising virtual devices
+(which you will use to create a tap device).
+
+An OpenVPN server is already running on SimpleArbiterVPN. Use the secret
+available on VPNClient1 in the home directory of user student to connect to
+the VPN server on SimpleArbiterVPN. To do that, you will have to write your
+own OpenVPN configuration file.
+
+After you have set up the VPN, make the directory
+/home/test/{DIRNAME} on VPNClient1 available over NFS from SimpleArbiter over
+your VPN. Copy files that are available from SimpleArbiter over SMB to
+/home/test/{DIRNAME}.
"""
}
diff --git a/kpov_judge/tasks/radius_mysql_pam/task.py b/kpov_judge/tasks/radius_mysql_pam/task.py
index b53c1b7..839090f 100644
--- a/kpov_judge/tasks/radius_mysql_pam/task.py
+++ b/kpov_judge/tasks/radius_mysql_pam/task.py
@@ -5,22 +5,49 @@
instructions = {
'si':u"""
Ustvari dva navidezna računalnika - SimpleArbiter z diska simpleArbiterDhcp ter
-RadiusServer. SimpleArbeiterDhcp dobis na naslovu polz.si/media/uploads/kpov/virtualke. Na RadiusServer namesti FreeRadius.
-Na SimpleArbiter preberi skrivnost ter poskrbi, da se bo s to skrivnostjo SimpleArbiter lahko povezal na RadiusServer.
+RadiusServer. Na RadiusServer namesti FreeRadius ter MySQL.
-Nato na RadiusServer namesti še podatkovno bazo mysql. Na SimpleArbiter preberi ime podatkovne baze, uporabniško ime na bazi ter geslo, s katerim se bo lahko klient s SimpleArbiter na to bazo lahko povezal.
-
-V bazi ustvari tabele, potrebne za delovanje FreeRadius (več na http://wiki.freeradius.org/guide/SQL-HOWTO). Nastavi FreeRadius tako, da se bodo podatki o uporabnikih črpali iz baze 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.
-Na SimpleArbiter preberi uporabnisko ime in geslo
-uporabnika ter ga dodaj v mysql tako, da bo strežnik Radius uporabnika s tem geslom sprejel. Za uporabnika ustvari tudi uporabniški račun (npr. z ukazom adduser). Upoštevaj, da testni program lahko temu uporabniku spremeni geslo. Poleg tega naj še vedno deluje prijava z uporabniškim imenom student in geslom vaje.
+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.
-Nastavi PAM za prijavo (login) tako, da bo dovolj, če se uporabnik na ssh predstavi z geslom na strežniku Radius, ne glede na vnos v /etc/passwd oziroma /etc/shadow.
+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}.
+
+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':u"""
-TODO: correct this.
-Create two virtual computers - SimpleArbiter (using the SimpleArbiterDhcp.vdi disk) and RadiusServer. You can get the disk image at polz.si/media/uploads/kpov/virtualke. Install OpenRadius on the RadiusServer VM. Installation instructions can be found at evbergen.home.xs4all.nl/openradius/doc-using-openradius.html. OpenRadius uses two configuration files /etc/openradius/configuration and /etc/openradius/behaviour. The first one defines sources and interfaces of the server, the second one defines how the server responds to requests. Add your username and password from the SimpleArbiter VM to the OpenRadius configuration. Make shure that SimpleArbiter is able to connect to RadiusServer using the shared secret.
-Install the MySQL database on the RadiusServer VM. Log into the MySQL server using mysql -u root -p . Create the database using CREATE DATABASE <dbnamehere>. Add the columns username and password. Create the user test on RadiusServer and setup PAM so that the user password is checked against the MySQL database instead of the file /etc/passwd or /etc/shadow.
+Create two virtual machines - SimpleArbiter using the disk simpleArbiterDhcp
+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.
+
+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.
+
+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.
"""
}
diff --git a/kpov_judge/tasks/set_ip_static_dhcp/task.py b/kpov_judge/tasks/set_ip_static_dhcp/task.py
index 48f7e69..1bd6cc9 100644
--- a/kpov_judge/tasks/set_ip_static_dhcp/task.py
+++ b/kpov_judge/tasks/set_ip_static_dhcp/task.py
@@ -2,16 +2,18 @@
# -*- coding: utf-8 -*-
# kpov_random_helpers should be imported by add_assignment.py
-
instructions = {
'si':u"""
Ustvari tri navidezne racunalnike. Za prvega
uporabi sliko diska simpleArbiterDhcpGW, za drugega sliko diska
maliNetworkManager, za tretjega sliko diska maliBrezNetworkManager.
Racunalnike imenujmo enako kot slike diska.
-Na maliBrezNetworkManager izklopi networkmanager in uporabljaj konzolo.
-Na obeh rocno nastavi IP naslova ter naslova
+Na maliBrezNetworkManager izklopi networkmanager in uporabi ifup / ifdown.
+Na maliNetworkManager nastavi IP naslov {IP_NM} ter DNS {DNS_NM}.
+Na maliBrezNetworkManager nastavi IP naslov {IP_static} ter DNS {DNS_static}.
DNS strežnikov. Naslove dobiš na simpleArbiterDhcpGW.
+""",
+ 'en':u"""
"""
}
diff --git a/kpov_judge/tasks/set_motd/task.py b/kpov_judge/tasks/set_motd/task.py
index cfea848..b5d1b3c 100644
--- a/kpov_judge/tasks/set_motd/task.py
+++ b/kpov_judge/tasks/set_motd/task.py
@@ -5,35 +5,41 @@
# kpov_random_helpers should be imported by add_assignment.py
# OrderedDict = SON
-
instructions = {
"si":u"""
-Ustvari dva navidezna računalnika - imenujmo ju SimpleArbiterDhcpGW in Student. Za računalnik SimpleArbiterDhcpGW uporabite
-sliko diska, poimenovano SimpleArbiterDhcpGW. Na računalniku SimpleArbiterDhcpGW dobite kratek niz. Poskrbite, da se bo ta
-kratki niz pojavil v sporočilu, ki se ob prijavi izpiše na računalniku Student. Temu sporočilu v
-angleščini rečemo "message of the day" - MOTD.
+Ustvari dva navidezna računalnika - imenujmo ju SimpleArbiterDhcpGW in
+Student. Za računalnik SimpleArbiterDhcpGW uporabite sliko diska, poimenovano
+SimpleArbiterDhcpGW.
+
+Na računalniku Student ustvarite uporabnika z uporabniškim imenom {peer_user}.
-Poskrbite, da se bo ob prijavi uporabnika (v Message Of The Day, MOTD) prek ssh izpisal nek niz.
-Računalnik nastavite tako, da bo dostopen s testnega računalnika (SimpleArbiterDhcpGW). Najpreprosteje bo,
-da SimpleArbiterDhcpGW priklopite na omrežje, ki ima dostop do Interneta (npr. prek NAT) in na navidezno omrežje med
-navideznimi računalniki (npr. intnet); računalnik Student priklopite le na navidezno omrežje (npr. intnet).
+Poskrbite, da se bo v sporočilu, ki se ob prijavi izpiše na računalniku
+Student, pojavil niz "{niz}". Temu sporočilu v angleščini rečemo
+"message of the day" - MOTD.
-Uporabniško ime in niz dobite kot parametre ob zagonu run_test.py. Pri nizu pazite, saj utegne biti dovolj dolg, da brez premikanja kurzorja ne bo takoj viden.
+IP navideznega računalnika Student ter geslo za {peer_user} nastavite sami.
-IP navideznega računalnika ter geslo nastavite sami.
+Ocenjevalni program pričakuje, da se bo ob koncu prijave pojavila ukazna
+vrstica oblike uporabnisko_ime@ime_racunalnika:~$ .
-Ocenjevalni program pričakuje, da se bo ob koncu prijave pojavila ukazna vrstica oblike uporabnisko_ime@ime_racunalnika:~$ . Pazite, da se bo takšna vrstica pojavila šele po nizu, ki ste ga dobili v navodilih.
+Pazite, da se bo takšna vrstica pojavila šele po nizu, ki ste ga dobili v
+teh navodilih.
""",
'en':u"""
-Create two virtual machines - named SimpleArbiterDhcpGW and Student. For the 'SimpleArbiterDhcpGW' use disc image named SimpleArbiterDhcpGW. You receive short string on machine 'SimpleArbiterDhcpGW'. Make sure that this string appears in the message which is displayed after you login to machine 'Student'. This is so called 'message of the day'MOTD.
+Create two virtual machines - named SimpleArbiterDhcpGW and Student.
+For the 'SimpleArbiterDhcpGW', use disc image named SimpleArbiterDhcpGW.
-Make sure that when the user logins via ssh some string is displayed. Set the machine, so that you can reach it from test computer (SimpleArbiterDhcpGW)
+On Student, create a user with the username {peer_user}.
-You get username and string as parameters when you run run_test.py. Pay attention to the string length, it might not be visible right away without moving the cursor.
+Set the message of the day (MOTD) on Student to "{niz}". This is the message
+which is displayed when you log in.
-Set up IP and password of virtual machine yourself.
+Set the IP of Student and the password for {peer_user} yourself.
-Grading system expects, that at the end of login, a command line similar to uporabnisko_ime@ime_racunalnika:~$ appears. Make sure that this line shows up after the string you got in the instructions.
+The grading system expects that at the end of login,
+a prompt similar to username@name_of_computer:~$ appears.
+Make sure that this line shows up only after the
+string you got in these instructions.
"""
}
diff --git a/kpov_judge/tasks/smb_nfs/task.py b/kpov_judge/tasks/smb_nfs/task.py
index fe264cb..6da7c88 100644
--- a/kpov_judge/tasks/smb_nfs/task.py
+++ b/kpov_judge/tasks/smb_nfs/task.py
@@ -5,30 +5,22 @@
# TODO: dokoncaj!
instructions = {
'si':u"""
-Postavi dva navidezna računalnika (simpleArbiterDhcp in FileServer). Na SimpleArbiterDhcp poišči imenik
-Mapa ter preberi pot NFS_POT ter ime imenika v skupni rabi SAMBA_SHARE. Skopiraj datoteke iz imenika Mapa,
-na FileServer. Poskrbi, da bo imenik z datotekami dostopen prek NFS v imeniku NFS_POT in prek SMB na imeniku v skupni
-rabi SAMBA_SHARE. SimpleArbiterDhcp naj ima prek NFS pravico pisati po imeniku.
+Postavi dva navidezna računalnika (simpleArbiterDhcp in FileServer).
-NFS_POT je pot do nekega imenika in je za vsakega studenta drugacna. Ustvari
-mapo in poskrbi da bo dostopna prek protokolov NFS in SMB. Vanj skopiraj
-datoteke iz imenika MAPA (ta mapa naj vsebuje datoteko z imenom SHARED_FILENAME in vsebino SHARED_FILENAME_CONETENT), ki bosta za vsakega studenta drugacni.
-Naloga za studenta, ki pise gen_params() in params_meta je da nazreba opisane parametre.
-V task() napisi zaporedje ukazov, ki bodo preverili, ali je student res postavil delujoca streznika NFS in SMB in ali je nanju postavil datoteko SHARED_FILENAME. Vecina logike te funkcije gre v task_check.
-Izpis teh rezultatov spravi v results. Naloga student, ki pise task_check(results, params) je da napise funkcijo, ki pregleda ustvarjeni results in pove, ali je student opravil nalogo v skladu z navodili.
+Poskrbi, da bo imenik {NFS_MOUNT} na FileServer dostopen prek NFS in
+prek SMB kot imenik v skupni rabi {SMB_SHARENAME}.
+Ime SMB strežnika nastavite na {FILESERVER_NAME}.
+
+SimpleArbiterDhcp naj ima prek NFS pravico pisati po imeniku.
""",
'en':u"""
-
Set up two virtual computers (simpleArbiterDhcp and FileServer).
-On SimpleArbiterDhcp find directory Mapa, read path NFS_POT and name of directory in shared folder SAMBA_SHARE.
-
-Copy files from directory Mapa to FileServer.
-
-Make sure that the directory with files will be available over NFS (which is in directory NFS_POT) and over SMB, on directory in shared folder SAMBA_SHARE.
-
-SimpleArbiterDhcp should have the right to write in directory, using NFS.
+Make sure that the directory {NFS_MOUNT} on FileServer is accessible
+over NFS and over SMB under the sharename {SMB_SHARENAME}.
+Set the SMB server name to {FILESERVER_NAME}.
+SimpleArbiterDhcp should have write access to {NFS_MOUNT} over NFS.
"""
}
diff --git a/kpov_judge/tasks/snmp_agent_uptime/task.py b/kpov_judge/tasks/snmp_agent_uptime/task.py
index 53a1ac3..70cfa1b 100644
--- a/kpov_judge/tasks/snmp_agent_uptime/task.py
+++ b/kpov_judge/tasks/snmp_agent_uptime/task.py
@@ -3,7 +3,6 @@
# kpov_random_helpers should be imported by add_assignment.py
# TODO: finish this.
-
instructions = {
'si':u"""
Naloga: Postavi tri navidezne racunalnike:
@@ -16,17 +15,15 @@ vklopljen.
Postavi ga na SNMPClient v domaci imenik uporabnika test z geslom test.
Poskrbi, da bo SNMP strežnik prek SNMP pod
-SNMP_UPTIME_OID sporočal, koliko casa je vklopljen
+OID {SNMP_UPTIME_OID} sporočal, koliko casa je vklopljen
v sekundah.
Napiši skripto, poimenovano beri.sh, ki prek SNMP prebere vrednost s strežnika
- SNMPServer na OID SNMP_CLIENT_OID
+ SNMPServer na OID {SNMP_CLIENT_OID}
Postavi jo na SNMP klienta, v domaci imenik uporabnika test z geslom test.
Poskrbi, da bodo podatki na SNMPServer dostopni za skupino (community) studentje.
-
-Parametra SNMP_UPTIME_OID in SNMP_CLIENT_OID lahko dobiš na SimpleArbiter.
""",
'en':u"""
Set up three virtual computers, SimpleArbiter with the disk image simpleArbiterDhcp,
@@ -35,9 +32,9 @@ the uptime of the computer in minutes. Set it up on SNMPClient in the home direc
of the user test with the password test.
Make sure that the SNMP server reports it's uptime in seconds over SNMP under
-SNMP_UPTIME_OID .
+OID {SNMP_UPTIME_OID}.
-Write a script called beri.sh that reads the value from the OID SNMP_CLIENT_OID
+Write a script called beri.sh that reads the value from the OID {SNMP_CLIENT_OID}
on SNMPServer. Set it up on SNMPClient in the home directory of the user test.
Make all the data available over SNMP readable by the "studentje" community.
diff --git a/kpov_judge/tasks/vlc_stream_rtp/task.py b/kpov_judge/tasks/vlc_stream_rtp/task.py
index 76c1589..246a743 100644
--- a/kpov_judge/tasks/vlc_stream_rtp/task.py
+++ b/kpov_judge/tasks/vlc_stream_rtp/task.py
@@ -7,18 +7,23 @@
instructions = {
'si':u"""
-Postavi navidezni računalnik SimpleArbiter z diska simpleArbiter. Posodobi datoteko /etc/apt/sources.list
-preveri za posodobitve in naloži VLC.
-Posnemi ali kako drugače ustvari film ter poskrbi, da bo film dostopen na lokalnem omrežju prek RTP z imenom toka TOK na naslovu NASLOV. Računaj, da bodo film lahko videli tvoji sošolci. Kršenje avtorskih pravic je pri reševanju te naloge
-strogo prepovedano.
+Postavi navidezni računalnik SimpleArbiter z diska simpleArbiter. Posodobi
+datoteko /etc/apt/sources.list, preveri posodobitve in naloži VLC.
+
+Posnemi ali kako drugače ustvari film ter poskrbi, da bo film dostopen na
+lokalnem omrežju prek RTP z imenom toka {TOK} na naslovu {NASLOV}.
+Računaj, da bodo film lahko videli tvoji sošolci. Kršenje avtorskih pravic
+je pri reševanju te naloge strogo prepovedano.
""",
'en':u"""
Set up a virtual computer SimpleArbiter from the simpleArbiter disk.
-Read a movie title and stream name for stream TOK onto simpleArbiter. Film or
-otherwise create a movie and make sure the movie is avaliable on your local network
-via RTP with the name of the stream TOK on the address NASLOV.
-Take into account that the movie may be seen by your classmates. Copyright infrigement while solving this task is
-prohibited.
+Update /etc/apt/sources.list, check the for updates and install VLC.
+
+Record or otherwise create a movie and make sure the movie is avaliable
+on your local network via RTP with the name of the stream {TOK} at the address
+{NASLOV}.
+Take into account that the movie may be seen by your classmates.
+Copyright infrigement while solving this task is strictly prohibited.
"""
}