From a442ff334445078d29bdc27b098c51b4ef1cb87d Mon Sep 17 00:00:00 2001
From: "jm9632@student.uni-lj.si"
@@ -161,7 +161,9 @@
- mkdir /home/student/urania-03
+ mkdir /home/urania-03
+ chown -R root:users /home/urania-03/
+ chmod -R ug+rwx,o+rx+w /home/urania-03
Uredi nastavitve v /etc/samba/smb.conf:
- [zarptica-32]
- path = /home/student/urania-03
- available = yes
- valid users = tester
- read only = no
- browseable = yes
- public = yes
- writable = yes
+ [global]
+ workgroup = users
+ server string = zarptica-32
+ dns proxy = no
+ log file = /var/log/samba/log.%m
+ max log size = 1000
+ syslog = 0
+ panic action = /usr/share/samba/panic-action %d
+ security = user
+ encrypt passwords = yes
+ passdb backend = tdbsam
+ obey pam restrictions = yes
+ unix password sync = yes
+ passwd program = /usr/bin/passwd %u
+ passwd chat = *Enter\snew\s*\spassword:* %n\n
*Retype\snew\s*\spassword:* %n\n
*password\supdated\ssuccessfully* .
+ pam password change = yes
+ map to guest = bad user
+ usershare allow guests = yes
+
+ [homes]
+ comment = Home Directories
+ browseable = no
+ read only = yes
+ create mask = 0700
+ directory mask = 0700
+ valid users = %S
+
+ [printers]
+ comment = ALl Printers
+ browseable = no
+ path = /var/spool/samba
+ printable = yes
+ guest ok = no
+ read only = yes
+ create mask = 0700
+
+ [print$]
+ comment = Printer Drivers
+ path = /var/lib/samba/printers
+ browseable = yes
+ read only = yes
+ guest ok = no
+
+ [urania-03]
+ comment = All Users
+ path = /home/urania-03
+ users = @users
+ force group = users
+ create mask = 0660
+ directory mask = 0771
+ writable = yes
- Potrebno je določiti gesla Samba uporabnikom, predpogoj za to je, da uporabnik obstaja kot sistemski uporabnik. +
+ Potrebno je določiti gesla Samba uporabnikom. Uporabnik mora obstajati tudi kot lokalni uporabnik. +
- Uporabi ukaz + Z ukazom useradd USERNAME --shell /bin/false - , s katerim ustvariš uporabnika z onemogočenim računom in brez domačega direktorija, npr.: + ustvariš uporabnika z onemogočenim računom in brez domačega direktorija, npr.:
useradd tester --shell /bin/false
@@ -238,6 +286,18 @@ smbpasswd -a tester ++ Dodaj uporabnika v skupino. +
+ Odpri /etc/group + ter na konec dokumenta dodaj: + + users:x:1002:tester + +
+ +
- sudo mount 192.168.1.10:/srv/nfs/ERLbbBrT /home/student
+ mkdir mnt
+ mkdir mnt/smb
+ mkdir mnt/nfs
- Na SimpleArbiter bi sedaj moral imeti dostop do datotek. +
+ sudo mount 192.168.1.10:/srv/nfs/ERLbbBrT /mnt/nfs
- apt-get install sambclient
-
- smbclient //192.168.1.10/zarptica-32 - U tester -
-
+ sudo mount -t cifs //192.168.1.10/urania-03 /mnt/smb -o username=tester,password=test,workgroup=users
+
+ Sedaj bi moral imeti dostop do deljenih map. +