Samba : Access to Share from Clients (CentOS)2025/02/04 |
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 Password for [SAMBA\cent]: Try "help" to get a list of possible commands. smb: \> ls . D 0 Tue Feb 4 09:38:29 2025 .. D 0 Tue Feb 4 09:38:29 2025 testdir D 0 Tue Feb 4 09:37:54 2025 testfile.txt N 701707 Tue Feb 4 09:37:50 2025 test.txt N 20 Tue Feb 4 09:38:09 2025 27193344 blocks of size 1024. 24654612 blocks available # download a file smb: \> get testfile.txt Get file testfile.txt? y getting file \testfile.txt of size 701707 as testfile.txt (685193.8 KiloBytes/sec) (average 137052.1 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,username=cent '\\smb.srv.world\Share01' /mnt
Password for cent@\\smb.srv.world\Share01: ******** # user's password
[root@node01 ~]# df -hT Filesystem Type Size Used Avail Use% Mounted on /dev/mapper/cs-root xfs 26G 2.5G 24G 10% / devtmpfs devtmpfs 4.0M 0 4.0M 0% /dev tmpfs tmpfs 1.8G 0 1.8G 0% /dev/shm tmpfs tmpfs 731M 8.7M 722M 2% /run tmpfs tmpfs 1.0M 0 1.0M 0% /run/credentials/systemd-journald.service /dev/vda2 xfs 960M 458M 503M 48% /boot tmpfs tmpfs 1.0M 0 1.0M 0% /run/credentials/serial-getty@ttyS0.service tmpfs tmpfs 1.0M 0 1.0M 0% /run/credentials/getty@tty1.service tmpfs tmpfs 366M 4.0K 366M 1% /run/user/0 //smb.srv.world/Share01 cifs 26G 2.5G 24G 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 11. |
|
[2] | Open File Explorer and select [Map Network Drive] on the top menu. |
[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 successing authentication, it's possible to access to shared folder. |
Sponsored Link |
|