Setting Up Mounting of a Windows Shared Folder on Ubuntu

Prerequisites:

  • A Windows PC with a everyone shared folder.
  • Enabling Sharing Services on Windows (SMB 1.0/CIFS File Sharing Support, SMB Direct)
  • A local user account on the Windows PC with access to the shared folder.
  • Ubuntu machine with administrative privileges.

Steps:

1. Install Required Packages:

sudo apt update -y
sudo apt install cifs-utils smbclient -y

2. Create Credentials File

sudo vi /etc/samba/credentials

then fill in:

username=your_username
password=your_password

then change the permission:

sudo chmod 600 /etc/samba/credentials

3. mount the shared folder:

sudo mount.cifs //yourIP/sharedFolderName /mnt/yourDirectoryName -o credentials=/etc/samba/credentials,uid=1000,gid=1000,vers=3.0

留下评论

通过 WordPress.com 设计一个这样的站点
从这里开始