Debian 11 Bullseye
Sponsored Link

Samba : Access to Share from Clients (Debian)2021/09/14

 
Access to Share from Client Hosts.
[1] On Debian clients with CUI, access like follows.
root@node01:~#
apt -y install smbclient cifs-utils
# with [smbclient] command access
# smbclient (share name) -U (user name)

root@node01:~#
smbclient '\\smb.srv.world\Share01' -U debian

Enter WORKGROUP\debian's password:
Try "help" to get a list of possible commands.
smb: \> ls 
  .                                   D        0  Tue Sep 14 08:40:58 2021
  ..                                  D        0  Tue Sep 14 08:37:18 2021
  testfile.txt                        N       10  Tue Sep 14 08:40:58 2021
  TestDir                             D        0  Tue Sep 14 08:40:50 2021

                29303696 blocks of size 1024. 26535396 blocks available

# download a file
smb: \> mget "testfile.txt" 
Get file testfile.txt? y
getting file \testfile.txt of size 10 as testfile.txt (9.8 KiloBytes/sec) (average 9.8 KiloBytes/sec)
smb: \> !ls
snap  testfile.txt
smb: \> exit


# with [mount] command access
# [vers=(SMB protocol version)]

root@node01:~#
mount -t cifs -o vers=3.0,username=debian '\\smb.srv.world\Share01' /mnt

Password for debian@\smb.srv.world\Share01:  ********     # user's SMB password

root@node01:~#
df -hT

Filesystem                  Type      Size  Used Avail Use% Mounted on
udev                        devtmpfs  2.0G     0  2.0G   0% /dev
tmpfs                       tmpfs     394M  2.1M  392M   1% /run
/dev/mapper/debian--vg-root ext4       28G  1.2G   26G   5% /
tmpfs                       tmpfs     2.0G     0  2.0G   0% /dev/shm
tmpfs                       tmpfs     5.0M     0  5.0M   0% /run/lock
/dev/vda1                   ext2      470M   48M  398M  11% /boot
tmpfs                       tmpfs     394M     0  394M   0% /run/user/0
\\smb.srv.world\Share01     cifs       28G  2.7G   26G  10% /mnt

# if share does not require authentication, specify [none] for username

root@node01:~#
mount -t cifs -o vers=3,username=none,password=none '\\smb.srv.world\Share' /mnt

Samba : Access to Share from Clients (Windows)
 
It's the way to access to the shared folder. This example is on Windows 10.
[2] Select [Computer] - [Network] - [Map Network Drive].
[3] Specify the shared folder Path on [Folder] section and Click the [Finish] button.
[4] Authentication is required if you set common shared folder with authentication, Input Samba username and password you added.
[5] After successfully authentication, it's possible to access to shared folder.
Matched Content