Ubuntu 20.04
Sponsored Link

Samba : Access to Share from Clients (Ubuntu)2020/05/19

 
Access to Share from Client Hosts.
[1] On Ubuntu 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 ubuntu

Enter WORKGROUP\ubuntu's password:
Try "help" to get a list of possible commands.
smb: \> ls 
  .                                   D        0  Tue May 18 19:42:25 2020
  ..                                  D        0  Tue May 18 19:35:58 2020
  New_Folder                          D        0  Tue May 18 19:42:07 2020
  Text_Document.txt                   A        0  Tue May 18 19:42:17 2020

                25737444 blocks of size 1024. 22187920 blocks available

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


# with [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
udev                              devtmpfs  1.9G     0  1.9G   0% /dev
tmpfs                             tmpfs     394M  1.5M  393M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv ext4       25G  2.3G   22G  10% /
tmpfs                             tmpfs     2.0G     0  2.0G   0% /dev/shm
tmpfs                             tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs                             tmpfs     2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/vda2                         ext4      976M  103M  806M  12% /boot
/dev/loop1                        squashfs   55M   55M     0 100% /snap/core18/1705
/dev/loop0                        squashfs   55M   55M     0 100% /snap/core18/1754
/dev/loop2                        squashfs   69M   69M     0 100% /snap/lxd/14804
/dev/loop3                        squashfs   28M   28M     0 100% /snap/snapd/7264
tmpfs                             tmpfs     394M     0  394M   0% /run/user/0
/dev/loop4                        squashfs   70M   70M     0 100% /snap/lxd/14890
\\smb.srv.world\Share01           cifs       25G  3.4G   22G  14% /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 authetication, Input Samba username and password you added.
[5] After successing authentication, it's possbile to access to shared folder.
Matched Content