Fedora 39
Sponsored Link

Samba : Access to Share from Clients (Fedora)2023/11/21

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

Password for [SAMBA\fedora]:
Try "help" to get a list of possible commands.
smb: \> ls 
  .                                   D        0  Tue Nov 21 09:01:45 2023
  ..                                  D        0  Tue Nov 21 09:01:45 2023
  testdir                             D        0  Tue Nov 21 09:01:32 2023
  testfile.txt                        N      865  Tue Nov 21 09:01:45 2023

                15663104 blocks of size 1024. 13792500 blocks available

# download a file
smb: \> mget "testfile.txt" 
Get file testfile.txt? y
getting file \testfile.txt of size 865 as testfile.txt (140.8 KiloBytes/sec) (average 140.8 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=fedora '\\smb.srv.world\Share01' /mnt

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

[root@node01 ~]#
df -hT

Filesystem              Type      Size  Used Avail Use% Mounted on
/dev/mapper/fedora-root xfs        15G  1.8G   14G  12% /
devtmpfs                devtmpfs  4.0M     0  4.0M   0% /dev
tmpfs                   tmpfs     2.0G     0  2.0G   0% /dev/shm
tmpfs                   tmpfs     780M  1.1M  779M   1% /run
tmpfs                   tmpfs     2.0G     0  2.0G   0% /tmp
/dev/vda2               xfs       960M  286M  675M  30% /boot
tmpfs                   tmpfs     390M  4.0K  390M   1% /run/user/0
//smb.srv.world/Share01 cifs       15G  1.8G   14G  12% /mnt

# if SMB 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 [Show more options] - [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 passed authentication, it's possible to access to shared folder.
Matched Content