diff options
Diffstat (limited to 'kpov_judge/tasks/smb_nfs/howtos/en')
-rw-r--r-- | kpov_judge/tasks/smb_nfs/howtos/en/index.html | 128 |
1 files changed, 92 insertions, 36 deletions
diff --git a/kpov_judge/tasks/smb_nfs/howtos/en/index.html b/kpov_judge/tasks/smb_nfs/howtos/en/index.html index 2a8a72e..fe056b4 100644 --- a/kpov_judge/tasks/smb_nfs/howtos/en/index.html +++ b/kpov_judge/tasks/smb_nfs/howtos/en/index.html @@ -41,10 +41,10 @@ </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>
+ student-fileserver.vdi
</li>
<li>
- <a href="http://kpov.fri.uni-lj.si/kpov-disks/jm9632@student.uni-lj.si/07-preparation-smb_nfs/simpleArbiterDhcpGW.vdi">simpleArbiterDhcpGW.vdi</a>
+ simpleArbiterDhcpGW.vdi
</li>
<br>
</ul>
@@ -165,15 +165,19 @@ </li>
<li>
Change the owner of the directory and files in it:
- <span id="code">chown student /srv/nfs/ERLbbBrT</span>
- and similary for all the files in shared directory. The owner should not be root.
+ <span id="code">
+ chown student /srv/nfs/ERLbbBrT
+ </span>
+ and similarly for all the files in shared directory. The owner should not be root.
</li>
<li>
Run command
<span id="code">exportfs -rv</span>
to export file systems
<p>After that run
- <span id="code">services nfs-kernel-server restart</span>
+ <span id="code">
+ services nfs-kernel-server restart
+ </span>
</p>
</li>
<br>
@@ -189,22 +193,67 @@ </span>
</li>
<li>
- Create directory urania-03, npr.:
+ Create directory urania-03 and set owner and privileges:
<p id="code">
- mkdir /home/student/urania-03
+ mkdir /home/student/urania-03<br>
+ chown -R root:users /home/urania-03/<br>
+ chmod -R ug+rwx,o+rx+w /home/urania-03<br>
</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>
+ [global]<br>
+ workgroup = users<br>
+ server string = zarptica-32<br>
+ dns proxy = no<br>
+ log file = /var/log/samba/log.%m<br>
+ max log size = 1000<br>
+ syslog = 0<br>
+ panic action = /usr/share/samba/panic-action %d <br>
+ security = user<br>
+ encrypt passwords = yes<br>
+ passdb backend = tdbsam<br>
+ obey pam restrictions = yes<br>
+ unix password sync = yes<br>
+ passwd program = /usr/bin/passwd %u<br>
+ passwd chat = *Enter\snew\s*\spassword:* %n\n <br>*Retype\snew\s*\spassword:* %n\n <br>*password\supdated\ssuccessfully* .<br>
+ pam password change = yes<br>
+ map to guest = bad user<br>
+ usershare allow guests = yes<br>
+ <br>
+ [homes]<br>
+ comment = Home Directories<br>
+ browseable = no<br>
+ read only = yes<br>
+ create mask = 0700<br>
+ directory mask = 0700<br>
+ valid users = %S<br>
+ <br>
+ [printers]<br>
+ comment = ALl Printers<br>
+ browseable = no<br>
+ path = /var/spool/samba<br>
+ printable = yes<br>
+ guest ok = no<br>
+ read only = yes<br>
+ create mask = 0700<br>
+ <br>
+ [print$]<br>
+ comment = Printer Drivers<br>
+ path = /var/lib/samba/printers<br>
+ browseable = yes<br>
+ read only = yes<br>
+ guest ok = no<br>
+ <br>
+ [urania-03]<br>
+ comment = All Users<br>
+ path = /home/urania-03<br>
+ users = @users<br>
+ force group = users
+ create mask = 0660<br>
+ directory mask = 0771<br>
+ writable = yes<br>
</p>
</li>
<li>
@@ -224,7 +273,7 @@ <li>
Add users:
<p>
- In order to define passwords for Samba users they have to exist as system users.
+ In order to define passwords for Samba users they have to exist on a local system, too.
<p>
Use command
<span id="code">
@@ -240,6 +289,17 @@ <p id="code">
smbpasswd -a tester
</p>
+ <p>
+ Add the user to your group.
+ <p>
+ Open /etc/group file and add group and users:
+ <span id="code">
+ users:x:1002:tester
+ </span>
+ </p>
+ </p>
+ <li> Restart Samba.
+ </li>
</li>
</ol>
</li>
@@ -252,32 +312,28 @@ Client SimpleArbiterDhcp
</h3>
<ul type="disc">
+ <li>Create directories for your mounts, e.g.:
+ <p id="code">
+ mkdir mnt<br>
+ mkdir mnt/smb<br>
+ mkdir mnt/nfs<br>
+ </p>
+ </li>
<li>
- NFS: run the command as root
- <span id="code">
- mount -t nfs nfs_server_ip:shared_dir dest
- </span>, e.g.:
+ NFS: Run command
<p id="code">
- mount -t -nfs 192.168.1.10:/srv/nfs/ERLbbBrT shared
+ sudo mount 192.168.1.10:/srv/nfs/ERLbbBrT /mnt/nfs
</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>
+ SMB: Run command
+ <p id="code">
+ sudo mount -t cifs //192.168.1.10/urania-03 /mnt/smb -o username=tester,password=test,workgroup=users<br>
+ </p>
</li>
+ <p>
+ You should be able to access shared folders now.
+ </p>
</ul>
</li>
</ul>
|