Mounting and mapping shares between Windows and Linux with Samba

Mounting and mapping shares between Windows and Linux with Samba
yum install samba-client samba-common -y
yum install cifs-utils
# smbclient -U user -L 192.168.1.122
# mkdir /mnt/myshare
# mount -t cifs -o username=user //192.168.1.122/myshare /mnt/share
# sudo mount.cifs //10.0.1.4/share /mnt/share/nmshare/ -o user=share,pass=share

# vim /etc/fstab
//192.168.1.122/myshare /mnt/share cifs username=user,password=password,_netdev 0 0
The _netdev option is important since we are mounting a network device. Clients may hang during the boot process if the system encounters any difficulties with the network.

Now create that .cred file inside the user’s home directory.

# vim /home/user/.cred
Next, add the Samba user’s username and password.

username=user
password=password
Finally, mount all filesystems.

# mount -a

https://www.redhat.com/sysadmin/samba-windows-linux

Mount a network shared drive on GNU/Linux | Tutorial


https://superuser.com/questions/430163/cifs-share-mount-errors

Leave a Reply

Your email address will not be published. Required fields are marked *