TOPIC 8

Date: 3/29/2017
Linux and Windows interoperability
Linux System Administration


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.img
    

    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]
    # 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