Ubuntu 24.04
Sponsored Link

Samba : Access to Share from Clients (Ubuntu)2024/05/27

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

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 27 00:54:52 2024
  ..                                  D        0  Mon May 27 00:54:52 2024
  New folder                          D        0  Mon May 27 00:54:48 2024
  New Text Document.txt               A       46  Mon May 27 00:55:20 2024

                28719140 blocks of size 1024. 20702552 blocks available

# download a file
smb: \> mget "New Text Document.txt" 
Get file New Text Document.txt? y
getting file \New Text Document.txt of size 46 as New Text Document.txt (44.9 KiloBytes/sec) (average 44.9 KiloBytes/sec)
smb: \> !ls
'New Text Document.txt'
smb: \> exit

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

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

df -hT

Filesystem                        Type   Size  Used Avail Use% Mounted on
tmpfs                             tmpfs  392M  1.5M  391M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv ext4    28G  6.2G   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   95M  1.7G   6% /boot
tmpfs                             tmpfs  392M   12K  392M   1% /run/user/0
//smb.srv.world/Share01           cifs    28G  7.7G   20G  28% /mnt

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

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 the File Explorer and right-click the [Network] on the left pane, then select [Map Network Drive].
[3] Specify the shared folder Path onthe [Folder] section and Click the [Finish] button.
[4] Authentication is required if you set 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