Sunday, May 24, 2020

How to mount network drive in Ubuntu

**

sudo mkdir /media/k

sudo apt-get install cifs-utils

sudo gedit /etc/nsswitch.conf
    hosts: files mdns4_minimal [NOTFOUND=return] dns
change it into:
    hosts: files mdns4_minimal [NOTFOUND=return] wins dns

sudo apt-get install libnss-winbind winbind

sudo gedit ~/.smbcredentials
username=[]
password=[]
domain=WORKGROUP

root@20180705:~# id dlee
uid=1000(dlee) gid=1000(dlee) groups=1000(dlee),4(adm),20(dialout),24(cdrom),27(sudo),30(dip),46(plugdev),116(lpadmin),126(sambashare)

sudo gedit /etc/fstab
//10.147.18.10/c /media/k cifs credentials=/home/dlee/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777 0 0


sudo mount -a



HOW TO MOUNT X DRIVE

GOOD
sudo mount -t cifs -v //10.147.18.10/c/ /media/x_drive/ -o username=[],password=[]
sudo mount -t cifs -v //10.147.18.20/c/ /media/k/ -o username=oem,password=dodgers
sudo mount -t cifs -o credentials=/home/dlee/.smbcredentials //10.147.18.10/c /media/x_drive
sudo mount -t cifs -o credentials=/home/dlee/.smbcredentials -v //10.147.18.20/c /media/k

sudo gedit /home/dlee/.smbcredentials
sudo gedit ~/.smbcredentials
    username=[]
    password=[]
    domain=[]


smbclient //10.147.18.20/c -U oem
//10.147.18.10/c /media/x_drive cifs username=oem,password=dodgers 0 0

smbtree -b -N
nmblookup -A 10.147.18.10

sudo umount /media/k
sudo umount /media/x_drive


Reconnecting with SMB1 for workgroup listing.
Connection to 192.168.2.101 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)
Failed to connect with SMB1 -- no workgroup available

sudo gedit /etc/samba/smb.conf
And then add the following line anywhere in the file:
client max protocol = NT1



PeopleSpace International