CentOS Stream 8
Sponsored Link

Samba : Access to Share from Clients (CentOS)
2021/03/16
 
Access to Share from Client Hosts.
[1] On CentOS clients with CUI, access like follows.
[root@node01 ~]#
dnf -y install samba-client cifs-utils
# with [smbclient] command access

# smbclient (share name) -U (user name)

[root@node01 ~]#
smbclient '\\smb.srv.world\Share01' -U cent

Enter SAMBA\cent's password:
Try "help" to get a list of possible commands.
smb: \> ls 
  .                                   D        0  Mon Mar 15 21:38:38 2021
  ..                                  D        0  Mon Mar 15 21:35:20 2021
  testfile.txt                        N       15  Mon Mar 15 21:38:33 2021
  testdir                             D        0  Mon Mar 15 21:38:38 2021

                27245572 blocks of size 1024. 24883772 blocks available

# download a file
smb: \> mget testfile.txt 
Get file testfile.txt? y
getting file \testfile.txt of size 15 as testfile.txt (4.9 KiloBytes/sec) (average 4.9 KiloBytes/sec)
smb: \> !ls
anaconda-ks.cfg  testfile.txt
smb: \> exit


# with [mount] command access

# [vers=(SMB protocol version)]

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

Password for cent@\smb.srv.world\Share01:  ********     # password

[root@node01 ~]#
df -hT

Filesystem              Type      Size  Used Avail Use% Mounted on
devtmpfs                devtmpfs  1.9G     0  1.9G   0% /dev
tmpfs                   tmpfs     1.9G     0  1.9G   0% /dev/shm
tmpfs                   tmpfs     1.9G  8.6M  1.9G   1% /run
tmpfs                   tmpfs     1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/mapper/cs-root     xfs        26G  2.3G   24G   9% /
/dev/vda1               xfs      1014M  259M  756M  26% /boot
tmpfs                   tmpfs     374M     0  374M   0% /run/user/0
\\smb.srv.world\Share01 cifs       26G  2.3G   24G   9% /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