TOPIC 8

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


Access Windows shared drive on Linux.
Exercise
  • On Win 7 virtual desktop, create a new folder, C:\SHARED
  • Share the folder over the network by right clicking on it and slidng down to Properties. Choose Sharing, then advinced sharing, check-in "share this folder", click onto permissions, select Full Control as demonstrated below:


  • You can access the shared network drive, 'SHARED', to list, download and upload files via command smbclient on the desktop as follows:
    smbclient //win7/SHARED -U hostadm 
    
    then provide the password of hostadm on Win 7 host.
  • To see the list of commands in the smbclient shell, simply type:
    ?
    
  • Create a new folder and upload file /etc/hosts into it by using smbclient
    mkdir DIR
    put /etc/hosts DIR\hosts
    ls
    cd DIR
    ls
    quit
    

  • Another way to access the Windows shared drive on Linux is by using smbfs mount.
    Install smbfs package on the desktop and mount the shared drive:
    apt-get install cifs-utils
    mkdir /mnt/smb
    mount -t cifs -o username="hostadm",passwd="unisys" //win7/SHARED /mnt/smb
    df -h
    
  • You can browse /mnt/smb directory content, copy and delete files in it like on a local file system:
    cp /etc/services /mnt/smb
    rm -rf /mnt/smb/DIR
    
  • Unmount the shared file system:
    umount /mnt/smb
    




  • Take me to the Course Website