Date: 6/12/2019
Linux and Windows interoperability
Linux System Administration

Samba installation and configuration.
  • 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.qcow2

    Start smbhost and login to its console:
    virsh start smbhost
    virsh console smbhost
    Login as user hostadm and change the host name to smbhost. 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 settings for all the shares
    workgroup = Group16
    netbios name = smbhost
    server string = SMB
    security = user
    passdb backend = tdbsam
    # Disable printer shares
    disable spoolss = yes
    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:
    systemctl restart smbd
    systemctl restart nmbd
    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