===================================================
/*
*
* Share files from Windows Operating System TO Ubuntu
*
*/
===================================================
sudo apt update
sudo apt-get install cifs-utils
sudo mkdir /mnt/winshare
sudo chown -R nobody:nogroup /mnt/winshare
sudo chmod -R 0755 /mnt/winshare
user: windowsusername
pass: userpassword
sudo mount -t cifs -o username=windows_user_account_here //WIN_MACHINE_IP/PublicShares /mnt/winshare
sudo mount -t cifs -o username=am-dev //192.168.00.001/directoryname1 /mnt/winshare/directoryname1
sudo mount -t cifs -o username=am-dev //192.168.00.001/directoryname2 /mnt/winshare/directoryname2
alias winsharedev="sudo mount -t cifs -o username=am-dev //192.168.0.222/ampdevelopment /mnt/winshare/ampdevelopment"
alias winsharevue="sudo mount -t cifs -o username=am-dev //192.168.0.222/vueapp /mnt/winshare/vueapp"
unalias winsharedev
unalias winsharevue
AUTO CONNECT
set Credentials on a file
sudo nano /etc/win_cred
Windows Network user Credentials
username=windowsusername
password=userpassword
domain=192.168.00.001
Assign user and permissions to file
sudo chown root: /etc/win_cred
sudo chmod 600 /etc/win_cred
mount Network directory to ubuntu directory /mnt/winshare
sudo mount -t cifs -o credentials=/etc/win_cred WIN_MACHINE_IP/PublicShares /mnt/winshare//
sudo mount -t cifs -o credentials=/etc/win_cred 192.168.00.001/directoryname /mnt/winshare/directoryname/