TroubleChute Logo
VIDEOS

Debian: Permanently mount Windows File Share


Published: Dec 10, 2019
Last Edit: Dec 10, 2019
171 Words, 1 Minute.

Watch the video:


Timestamps:
00:00 - Explanation
00:24 - Installing Samba
01:05 - Creating Mount
01:44 - Installing other requirements
02:06 - Editing nsswitch.conf
03:00 - Backing up fstab
03:33 - Creating a credential file
04:46 - Get UID + GID
05:08 - Editing fstab to mount drive permanently
06:46 - Testing
07:35 - Adding another folder

Have shared files on a Windows computer? Want to access shared folders from a Debian/Linux computer or virtual machine? Well, it’s easy once it’s set up. There are a lot of commands and knowledge that goes into setting this up, but if these tutorial steps are followed, it’s rather easy.
Set and forget. Once the folder is mounted, it’s mounted every time the computer/VM is started. No extra effort required.

Commands:
apt-get install samba
apt-get install samba-client
sudo mkdir /media/MOUNTNAME sudo apt-get install libnss-winbind winbind nano /etc/nsswitch.conf sudo service networking restart sudo cp /etc/fstab /etc/fstab.old – RESORE USING: sudo mv /etc/fstab /etc/fstab.old nano /home/USERNAME/.smbcred sudo nano /etc/fstab – //windows_local_ip/windows_shared_folder /media/MOUNTNAME cifs credentials=/home/USERNAME/.smbcred,iocharset=utf8,gid=GID,uid=UID,file_mode=0777,dir_mode=0777 0 0 sudo mount -a

TroubleChute © Wesley Pyburn (TroubleChute)
Support Me Privacy Policy Cookies Policy Terms of Service Change privacy settings Contact