Mounting a CIFS Network Share in Debian/Linux/LXC

Опубликовано: 30 Январь 2022
на канале: H2DC - How to do Computers
18,824
255

Commands Used:

Update/Upgrade
apt update
apt upgrade

apt install cifs-utils

Create/open credentials file
nano /root/.smbcred

Enter following info:
username=smbuser
password=Homelab1
domain=test

set /smbcred access to root only
chmod 400 /root/.smbcred

Check .smbcred access
ls -al /root/.smbcred

Make mountpoint directory
mkdir /mnt/testshare

Mount the share manually
mount.cifs -v //192.168.1.200/testshare /mnt/testshare --verbose -o credentials=/root/.smbcred

Open fstab
nano /etc/fstab

Add the line:
//192.168.1.200/testshare /mnt/testshare cifs credentials=/root/.smbcred 0 0

Reboot the machine
reboot

Test to see if share is mounted
ls /mnt/testshare



---------
Facebook -   / h2dc-how-to-do-computers-108075255013728  
Twitter -   / how2docomputers  
Instagram -   / howtodocomputers   NEW H2DC Discord -   / discord  


На этой странице сайта вы можете посмотреть видео онлайн Mounting a CIFS Network Share in Debian/Linux/LXC длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь H2DC - How to do Computers 30 Январь 2022, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 18,824 раз и оно понравилось 255 зрителям. Приятного просмотра!