Accessing Samba Shares From an Oracle Linux Client
To access a Samba share from an Oracle Linux host, install the following packages:
-
samba-client
Installing the
samba-client
package gives you thesmbclient
utility that provides SFTP-like commands to access Samba shares. For example,smbclient
provides aget
command for downloading a file from a remote Samba share, and aput
command for uploading a file. -
cifs-utils
Installing the
cifs-utils
package lets you mount a Samba share.
Using smbclient
Commands
The following steps give a brief overview of how you might use the
smbclient
commands:
-
Log onto a share example_samba_share hosted on server example_samba_server using account EXAMPLE.COM/user1:
sudo smbclient -U "EXAMPLE.COM\user1" //example_samba_server/example_samba_share
-
Change to directory location /directory1/ :
smb: \> cd /directory1/
-
Download file ExampleFile.txt:
smb: \directory1\> get ExampleFile.txt
-
End the session:
smb: \directory1\> exit
For more information, see the smbclient(1)
manual page.