Ubuntu 22.04
Sponsored Link

Samba : Access to Share from Clients (Ubuntu)2022/05/16

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

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

Enter WORKGROUP\ubuntu's password:
Try "help" to get a list of possible commands.
smb: \> ls 
  .                                   D        0  Mon May 16 01:30:45 2022
  ..                                  D        0  Mon May 16 01:20:10 2022
  testdir                             D        0  Mon May 16 01:30:45 2022
  testfile.txt                        N       10  Mon May 16 01:30:37 2022

                27974664 blocks of size 1024. 20327404 blocks available

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


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

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

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


root@node01:~#
df -hT

Filesystem                        Type   Size  Used Avail Use% Mounted on
tmpfs                             tmpfs  393M  1.5M  392M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv ext4    27G  6.0G   20G  24% /
tmpfs                             tmpfs  2.0G     0  2.0G   0% /dev/shm
tmpfs                             tmpfs  5.0M     0  5.0M   0% /run/lock
/dev/vda2                         ext4   2.0G  125M  1.7G   7% /boot
tmpfs                             tmpfs  393M  4.0K  393M   1% /run/user/0
//smb.srv.world/Share01           cifs    27G  7.3G   20G  28% /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 11.
[2] Open File Explorer and right-click the [Network] on the left pane, then select [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