summaryrefslogtreecommitdiff
path: root/kpov_judge/tasks/smb_nfs/howtos
diff options
context:
space:
mode:
Diffstat (limited to 'kpov_judge/tasks/smb_nfs/howtos')
-rw-r--r--kpov_judge/tasks/smb_nfs/howtos/en/index.html234
-rw-r--r--kpov_judge/tasks/smb_nfs/howtos/si/index.html230
2 files changed, 363 insertions, 101 deletions
diff --git a/kpov_judge/tasks/smb_nfs/howtos/en/index.html b/kpov_judge/tasks/smb_nfs/howtos/en/index.html
index 004b4f4..c4174f4 100644
--- a/kpov_judge/tasks/smb_nfs/howtos/en/index.html
+++ b/kpov_judge/tasks/smb_nfs/howtos/en/index.html
@@ -1,16 +1,26 @@
<html>
-
<head>
<meta http-equiv="content-type" content="text/html" charset="utf-8">
<title>smb_nfs</title>
+<style type="text/css">
+ #code {
+ font-family: Courier New;
+ font-size: 12;
+ }
+</style>
</head>
-
<body>
- <h1>smb_nfs</h1>
-
- <h2>Quick guide</h2>
+ <h1>
+ smb_nfs
+ </h1>
+ <p>
+ <a href="#vb">VirtualBox</a> | <a href="#server">Server</a> | <a href="#client">Client</a> | <a href="#nfs">NFS</a> | <a href="#smb">Samba</a> | <a href="#dhcp">DHCP</a>
+ </p>
+ <h2>
+ Quick guide
+ </h2>
<p>
- Set-up two virtual computers - SimpleArbiterDhcp and FileServer.
+ Set up two virtual computers - SimpleArbiterDhcp and FileServer.
</p>
<p>
Make sure that the directory /srv/nfs/ERLbbBrT on FileServer is accessible
@@ -21,10 +31,14 @@
SimpleArbiterDhcp should have write access to /srv/nfs/ERLbbBrT over NFS.
</p>
- <h2>Instructions</h2>
-
+ <h2>
+ Instructions
+ </h2>
<ul style="list-style: none;">
- <li><b>Download these VM images:</b>
+ <li>
+ <h3>
+ Download these VM images:
+ </h3>
<ul type="disc">
<li>
<a href="http://kpov.fri.uni-lj.si/kpov-disks/jm9632@student.uni-lj.si/07-preparation-smb_nfs/student-fileserver.vdi">student-fileserver.vdi</a>
@@ -35,37 +49,67 @@
<br>
</ul>
</li>
-
- <li><b>VirtualBox Settings:</b>
+ <a name="vb"></a>
+ <li>
+ <h3>
+ VirtualBox Settings:
+ </h3>
<ul type="disc">
- <li>enable PAE/NX for both VMs: Settings&rArr;System&rArr;Processor</li>
- <li>for FileServer
+ <li>
+ Enable PAE/NX for both VMs: Settings&rArr;System&rArr;Processor
+ </li>
+ <li>
+ For FileServer
<ul>
- <li>Adapter 1 - NAT</li>
- <li>Adapter 2 - Internal network</li>
+ <li>
+ Adapter 1 - NAT
+ </li>
+ <li>
+ Adapter 2 - Internal Network
+ </li>
</ul>
</li>
- <li>for SimpleArbiterDhcp
+ <li>
+ For SimpleArbiterDhcp
<ul>
- <li>Adapter 1 - Internal Network</li>
+ <li>
+ Adapter 1 - Internal Network
+ </li>
</ul>
</li>
</ul>
</li>
-
<br>
-
- <li><b>Server FileServer</b>
+ <a name="server"></a>
+ <li>
+ <h3>
+ Server FileServer
+ </h3>
<ol>
- <li>Set-up a DHCP server
+ <a name="dhcp"></a>
+ <li>
+ Set up a DHCP server
<ol>
- <li>apt-get update</li>
- <li>apt-get install isc-dhcp-server</li>
- <li>The server will not start (error <i>Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed!</i>), configure 3 files:
+ <li>
+ <span id="code">
+ apt-get update
+ </span>
+ </li>
+ <li>
+ <span id="code">
+ apt-get install isc-dhcp-server
+ </span>
+ </li>
+ <li>
+ The server will not start (error
+ <span id="code">
+ Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed!</span>)
+ , configure 3 files:
<ul>
- <li>in /etc/network/interfaces set static IP for eth1 on which the DHCP server will be running,
+ <li>
+ In /etc/network/interfaces set static IP for eth1 on which the DHCP server will be running,
e.g.:
- <p style="font-family:Courier New; font-size:12">
+ <p id="code">
auto eth1<br>
iface eth1 inet static<br>
address 192.168.1.10<br>
@@ -74,16 +118,16 @@
broadcast 192.168.1.255<br>
</p>
</li>
-
- <li>in /etc/default/isc-dhcp-server:
- <p style="font-family:Courier New; font-size:12">
+ <li>
+ In /etc/default/isc-dhcp-server:
+ <p id="code">
INTERFACES="eth1"
</p>
</li>
-
- <li>in /etc/dhcp/dhcpd.conf configure the subnet properties,
+ <li>
+ In /etc/dhcp/dhcpd.conf configure the subnet properties,
e.g.:
- <p style="font-family:Courier New; font-size:12">
+ <p id="code">
authoritative;<br>
default-lease-time 600;<br>
max-lease-time 7200;<br>
@@ -94,46 +138,134 @@
option domain-name-servers 193.2.1.66, 8.8.4.4;<br>
<br>
host SimpleArbiter {<br>
- hardware ethernet 08:00:27:A2:FB:B4;<br>
- fixed-address 192.168.1.180;<br>
- }<br>
+ hardware ethernet 08:00:27:A2:FB:B4;<br>
+ fixed-address 192.168.1.180;<br>
+ }<br>
}<br>
</p>
</li>
-
</ul>
</li>
-
</ol>
</li>
-
- <li>Set-up a NFS server
+ <a name="nfs"></a>
+ <li>
+ Set up a NFS server
<ol>
- <li>apt-get install nfs-kernel-server</li>
- <li>Determine the rules in /etc/exports,npt.:
- <p style="font-family:Courier New; font-size:12">
+ <li>
+ apt-get install nfs-kernel-server
+ </li>
+ <li>
+ Determine the rules in /etc/exports, e.g.:
+ <p id="code">
/srv/nfs/ERLbbBrT 192.168.1.0/24(ro,sync,no_subtree_check)<br>
#privileges for SimpleArbiterDhcp<br>
- /srv/nfs/ERLbbBrT 192.168.1.180/24(rw,sync,no_subtree_check)<br>
+ /srv/nfs/ERLbbBrT 192.168.1.180(rw,sync,no_subtree_check)<br>
</p>
</li>
</ol>
</li>
-
+ <a name="smb"></a>
+ <li>
+ Set up SMB server
+ <ol>
+ <li>
+ <span id="code">
+ apt-get install samba
+ </span>
+ </li>
+ <li>
+ Create directory urania-03, npr.:
+ <p id="code">
+ mkdir /home/student/urania-03
+ </p>
+ </li>
+ <li>
+ Edit configurations in /etc/samba/smb.conf, add at the bottom of document, e.g.:
+ <p id="code">
+ [zarptica-32]<br>
+ path = /home/student/urania-03<br>
+ available = yes<br>
+ valid users = tester<br>
+ read only = no<br>
+ browseable = yes<br>
+ public = yes<br>
+ writable = yes<br>
+ </p>
+ </li>
+ <li>
+ Restart Samba:
+ <span id="code">
+ service samba restart
+ </span>
+ </li>
+ <li style="list-style-type:none;">
+ <p>
+ Test the syntax of smb.conf file with command
+ <span id="code">
+ testparam
+ </span>
+ </p>
+ </li>
+ <li>
+ Add users:
+ <p>
+ In order to define passwords for Samba users they have to exist as system users.
+ <p>
+ Use command
+ <span id="code">
+ useradd USERNAME --shell /bin/false
+ </span>
+ to create user with a disabled account and without home directory, e.g:
+ <p id="code">
+ useradd tester --shell /bin/false
+ </p>
+ </p>
+ <p>
+ Define Samba password for your user:
+ <p id="code">
+ smbpasswd -a tester
+ </p>
+ </li>
+ </ol>
+ </li>
</ol>
</li>
-
- <li><b>Client SimpleArbiterDhcp</b>
+ <br>
+ <a name="client"></a>
+ <li>
+ <h3>
+ Client SimpleArbiterDhcp
+ </h3>
<ul type="disc">
- <li>as root: run the command mount -t nfs nfs_server_ip:shared_dir dest, e.g.:
- <p style="font-family:Courier New; font-size:12">
+ <li>
+ NFS: run the command as root
+ <span id="code">
+ mount -t nfs nfs_server_ip:shared_dir dest
+ </span>, e.g.:
+ <p id="code">
mount -t -nfs 192.168.1.10:/srv/nfs/ERLbbBrT shared
</p>
</li>
+ <li>
+ SMB:
+ <ol>
+ <li>
+ Install Samba client as root:
+ <p id="code">
+ apt-get install sambclient<br>
+ </p>
+ </li>
+ <li>
+ Connect to SMB server::
+ <p id="code">
+ smbclient //192.168.1.10/zarptica-32 - U tester
+ </p>
+ </li>
+ </ol>
+ </li>
</ul>
</li>
-
</ul>
-
</body>
-</html>
+</html> \ No newline at end of file
diff --git a/kpov_judge/tasks/smb_nfs/howtos/si/index.html b/kpov_judge/tasks/smb_nfs/howtos/si/index.html
index fa3bf64..2c1117d 100644
--- a/kpov_judge/tasks/smb_nfs/howtos/si/index.html
+++ b/kpov_judge/tasks/smb_nfs/howtos/si/index.html
@@ -1,14 +1,24 @@
<html>
-
<head>
<meta http-equiv="content-type" content="text/html" charset="utf-8">
<title>smb_nfs</title>
+<style type="text/css">
+ #code {
+ font-family: Courier New;
+ font-size: 12;
+ }
+</style>
</head>
-
<body>
- <h1>smb_nfs</h1>
-
- <h2>Hitra navodila</h2>
+ <h1>
+ smb_nfs
+ </h1>
+ <p>
+ <a href="#vb">VirtualBox</a> | <a href="#server">Strežnik</a> | <a href="#client">Odjemalec</a> | <a href="#nfs">NFS</a> | <a href="#smb">Samba</a> | <a href="#dhcp">DHCP</a>
+ </p>
+ <h2>
+ Hitra navodila
+ </h2>
<p>
Postavi dva navidezna računalnika - simpleArbiterDhcp in FileServer.
</p>
@@ -20,11 +30,14 @@
<p>
SimpleArbiterDhcp naj ima prek NFS pravico pisati po imeniku.
</p>
-
- <h2>Navodila</h2>
-
+ <h2>
+ Navodila
+ </h2>
<ul style="list-style: none;">
- <li><b>Prenesi sledeče slike virtualk:</b>
+ <li>
+ <h3>
+ Prenesi sledeče slike virtualk:
+ </h3>
<ul type="disc">
<li>
<a href="http://kpov.fri.uni-lj.si/kpov-disks/jm9632@student.uni-lj.si/07-preparation-smb_nfs/student-fileserver.vdi">student-fileserver.vdi</a>
@@ -35,37 +48,63 @@
<br>
</ul>
</li>
-
- <li><b>Nastavitve v VirtualBox:</b>
+ <a name="vb"></a>
+ <li>
+ <h3>
+ Nastavitve v VirtualBox:
+ </h3>
<ul type="disc">
- <li>za obe VM potrebno omogočiti PAE/NX: Settings&rArr;System&rArr;Processor</li>
- <li>za FileServer
+ <li>
+ Za obe napravi je potrebno omogočiti PAE/NX: Settings&rArr;System&rArr;Processor
+ </li>
+ <li>
+ Za FileServer
<ul>
- <li>vmesnik 1 - NAT</li>
- <li>vmesnik 2 - Internal Network</li>
+ <li>
+ vmesnik 1 - NAT
+ </li>
+ <li>
+ vmesnik 2 - Internal Network
+ </li>
</ul>
</li>
- <li>za SimpleArbiterDhcp
+ <li>
+ Za SimpleArbiterDhcp
<ul>
- <li>vmesnik 1 - Internal network</li>
+ <li>
+ vmesnik 1 - Internal network
+ </li>
</ul>
</li>
</ul>
</li>
-
<br>
-
- <li><b>Strežnik FileServer</b>
+ <a name="server"></a>
+ <li>
+ <h3>
+ Strežnik FileServer
+ </h3>
<ol>
- <li>Postavi DHCP strežnik
+ <a name="dhcp"></a>
+ <li>
+ Postavi DHCP strežnik
<ol>
- <li>apt-get update</li>
- <li>apt-get install isc-dhcp-server</li>
- <li>Strežnik se ne bo zagnal (javi <i>Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed!</i>), potrebno je popraviti 3 datoteke:
+ <li>
+ <span id="code">
+ apt-get update
+ </span>
+ </li>
+ <li>
+ <span id="code">
+ apt-get install isc-dhcp-server</span>
+ </li>
+ <li>
+ Strežnik se ne bo zagnal (javi <span id="code">Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed!</span>), potrebno je popraviti 3 datoteke:
<ul>
- <li>v /etc/network/interfaces določi statičen IP vmesnika eth1, na tem bo tekel DHCP strežnik,
+ <li>
+ V /etc/network/interfaces določi statičen IP vmesnika eth1, na njem bo tekel DHCP strežnik,
npr.:
- <p style="font-family:Courier New; font-size:12">
+ <p id="code">
auto eth1<br>
iface eth1 inet static<br>
address 192.168.1.10<br>
@@ -74,16 +113,17 @@
broadcast 192.168.1.255<br>
</p>
</li>
-
- <li>v /etc/default/isc-dhcp-server:
- <p style="font-family:Courier New; font-size:12">
+ <li>
+ V /etc/default/isc-dhcp-server:
+ <p id="code">
INTERFACES="eth1"
</p>
</li>
- <li>v /etc/dhcp/dhcpd.conf določi lastnosti podomrežja,
+ <li>
+ V /etc/dhcp/dhcpd.conf določi lastnosti podomrežja,
npr.:
- <p style="font-family:Courier New; font-size:12">
+ <p id="code">
authoritative;<br>
default-lease-time 600;<br>
max-lease-time 7200;<br>
@@ -94,46 +134,136 @@
option domain-name-servers 193.2.1.66, 8.8.4.4;<br>
<br>
host SimpleArbiter {<br>
- hardware ethernet 08:00:27:A2:FB:B4;<br>
- fixed-address 192.168.1.180;<br>
- }<br>
+ hardware ethernet 08:00:27:A2:FB:B4;<br>
+ fixed-address 192.168.1.180;<br>
+ }<br>
}<br>
</p>
</li>
-
</ul>
</li>
-
</ol>
</li>
-
- <li>Postavi NFS strežnik
+ <a name="nfs"></a>
+ <li>
+ Postavi NFS strežnik
<ol>
- <li>apt-get install nfs-kernel-server</li>
- <li>Določi pravila v /etc/exports,npt.:
- <p style="font-family:Courier New; font-size:12">
+ <li>
+ <span id="code">
+ apt-get install nfs-kernel-server
+ </span></li>
+ <li>
+ Določi pravila v /etc/exports, npr.:
+ <p id="code">
/srv/nfs/ERLbbBrT 192.168.1.0/24(ro,sync,no_subtree_check)<br>
#pravice za SimpleArbiterDhcp<br>
- /srv/nfs/ERLbbBrT 192.168.1.180/24(rw,sync,no_subtree_check)<br>
+ /srv/nfs/ERLbbBrT 192.168.1.180(rw,sync,no_subtree_check)<br>
+ </p>
+ </li>
+ </ol>
+ </li>
+ <a name="smb"></a>
+ <li>
+ Postavi SMB strežnik
+ <ol>
+ <li>
+ <span id="code">
+ apt-get install samba
+ </span></li>
+ <li>
+ Ustvari mapo urania-03, npr.:
+ <p id="code">
+ mkdir /home/student/urania-03
+ </p>
+ </li>
+ <li>
+ Uredi nastavitve v /etc/samba/smb.conf, dodaj na koncu dokumenta, npr.:
+ <p id="code">
+ [zarptica-32]<br>
+ path = /home/student/urania-03<br>
+ available = yes<br>
+ valid users = tester<br>
+ read only = no<br>
+ browseable = yes<br>
+ public = yes<br>
+ writable = yes<br>
+ </p>
+ </li>
+ <li>
+ Ponovno zaženi Sambo:
+ <span id="code">
+ service samba restart
+ </span>
+ </li>
+ <li style="list-style-type:none;">
+ <p>
+ Preveri sintakso smb.conf datoteke z ukazom
+ <span id="code">
+ testparam
+ </span>
+ </p>
+ </li>
+ <li>Dodaj uporabnike
+ <p>
+ Potrebno je določiti gesla Samba uporabnikom, predpogoj za to je, da uporabnik obstaja kot sistemski uporabnik.
+ <p>
+ <p>
+ Uporabi ukaz
+ <span id="code">
+ useradd USERNAME --shell /bin/false
+ </span>
+ , s katerim ustvariš uporabnika z onemogočenim računom in brez domačega direktorija, npr.:
+ <p id="code">
+ useradd tester --shell /bin/false
+ </p>
+ </p>
+ <p>
+ Za uporabnika določi Samba geslo:
+ <p id="code">
+ smbpasswd -a tester
+ </p>
</p>
</li>
</ol>
</li>
-
</ol>
</li>
-
- <li><b>Odjemalec SimpleArbiterDhcp</b>
+ <br>
+ <a name="client"></a>
+ <li>
+ <h3>
+ Odjemalec SimpleArbiterDhcp
+ </h3>
<ul type="disc">
- <li>kot root: poženi ukaz mount -t nfs ip_nfs_strežnika:deljena_mapa destinacija, npr.:
- <p style="font-family:Courier New; font-size:12">
+ <li>
+ NFS: Kot root poženi ukaz
+ <span id="code">
+ mount -t nfs ip_nfs_strežnika:deljena_mapa destinacija
+ </span>
+ , npr.:
+ <p id="code">
mount -t -nfs 192.168.1.10:/srv/nfs/ERLbbBrT shared
</p>
</li>
+ <li>
+ SMB:
+ <ol>
+ <li>
+ Kot root namesti Samba odjemalca:
+ <p id="code">
+ apt-get install sambclient<br>
+ </p>
+ </li>
+ <li>
+ Poveži se na SMB strežnik:
+ <p id="code">
+ smbclient //192.168.1.10/zarptica-32 - U tester
+ </p>
+ </li>
+ </ol>
+ </li>
</ul>
</li>
-
</ul>
-
</body>
-</html>
+</html> \ No newline at end of file