VirtualBox | Server | Client | NFS | Samba | DHCP
Set up two virtual computers - SimpleArbiterDhcp and FileServer.
Make sure that the directory /srv/nfs/ERLbbBrT on FileServer is accessible over NFS and over SMB under the sharename urania-03. Set the SMB server name to zarptica-32.
SimpleArbiterDhcp should have write access to /srv/nfs/ERLbbBrT over NFS.
auto eth1
iface eth1 inet static
address 192.168.1.10
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
INTERFACES="eth1"
authoritative;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.100 192.168.1.200;
option routers 192.168.1.10;
option domain-name-servers 193.2.1.66, 8.8.4.4;
host SimpleArbiter {
hardware ethernet 08:00:27:A2:FB:B4;
fixed-address 192.168.1.180;
}
}
/srv/nfs/ERLbbBrT 192.168.1.0/24(ro,sync,no_subtree_check)
#privileges for SimpleArbiterDhcp
/srv/nfs/ERLbbBrT 192.168.1.180(rw,sync,no_subtree_check)
mkdir /home/student/urania-03
[zarptica-32]
path = /home/student/urania-03
available = yes
valid users = tester
read only = no
browseable = yes
public = yes
writable = yes
Test the syntax of smb.conf file with command testparam
In order to define passwords for Samba users they have to exist as system users.
Use command useradd USERNAME --shell /bin/false to create user with a disabled account and without home directory, e.g:
useradd tester --shell /bin/false
Define Samba password for your user:
smbpasswd -a tester
mount -t -nfs 192.168.1.10:/srv/nfs/ERLbbBrT shared
apt-get install sambclient
smbclient //192.168.1.10/zarptica-32 - U tester