TOPIC 8

Date: 3/12/2014
Linux and Windows interoperability
Linux for Engineering and IT Applications


Samba installation and configuration.
Exercise
  • Clone your kvm1 virtual machine into a new VM, smbhost.
    virsh shutdown kvm1
    virt-clone --connect=qemu:///system -o kvm1 -n smbhost -f /home/hostadm/KVM/smbhost
    

    Start smbhost and login to its console:
    virsh start smbhost 
    virsh console smbhost
    
    Remove 127.0.1.1 kvm1 in file /etc/hosts and change the host name for smbhost in file /etc/hostname.
    cp /dev/null /etc/udev/rules.d/70-persistent-net.rules
    reboot
    

  • Install samba packages on smbhost:
    apt-get install samba samba-common smbclient 
    
    Backup the original samba configuration file, smb.conf:
    cd /etc/samba
    mv smb.conf smb.conf-orig 
    

  • Create a new configuration file, smb.conf, in directory /etc/samba with the following content:
    [global]
    # Global settings for all the shares 
    workgroup = Group16
    netbios name = smbhost 
    server string = SMB
    
    security = user
    passdb backend = tdbsam
    
    # Disable printer shares
    disable spoolss = yes
    
    [homes]
    comment = Home Directories
    path = /home/%S
    available = yes
    valid users = %S
    read only = no
    browsable = no
    writable = yes
    

  • Run command testparm to verify there is no errors in smb.conf
  • Restart the samba services:
    service smbd restart
    service nmbd restart
    
    Note, you need to restart the services any time after file smb.conf is modified.
  • Create a new user samba account:
    smbpasswd -a hostadm
    




  • Take me to the Course Website