top of page

Hướng dẫn mount Windows share trên Ubuntu 20.04

Writer's picture: Tuan NguyenTuan Nguyen


IP máy windows share: 192.168.1.100

Thư mục share: windows_share

User được gán quyền trên thư mục share: windows_user

Password của user được gán quyền share: 1234@123


Cài CIFS

$ sudo apt-get update
$ sudo apt-get install cifs-utils

Tạo thư mục để mount

$ sudo mkdir /data/backup

Kiểm tra mount trực tiếp

$ sudo mount -t cifs -o username=windows_user, password=1234@123 //192.168.1.100/windows_share /data/backup

Nếu mount thành công ta thực hiện bước tiếp theo


Tạo cifs-credential file

$ sudo nano /etc/cifs-credentital

Nội dung file cifs-credentital

user=windows_user
pass=1234@123


Cấu hình tự động mount trong file fstab

$ sudo nano /etc/fstab

Nội dung file fstab

//192.168.1.100/windows_share /data/backup cifs credentials=/etc/cifs-credential,file_mode=0755,dir_mode=0755 0 0

Có thể kiểm tra bằng lệnh

$ df -Th
5 views0 comments

Comments


 

© 2018 by Tuấn Nguyễn

 Liên hệ tôi
  • Facebook - Black Circle
  • Google+ - Black Circle
bottom of page