The Samba client on RHEL 7
Currently, my firewall service is disabled, so I do not need to be concerned with the firewall; however, I will only need to add in the TCP port 445
and 139
or the samba
service.
If we install the Samba client package, we can list all the shares available to a given user. This is shown in the following command extract:
$ sudo yum install -y samba-client $ smbclient -U andrew -L //localhost
Once the Samba client is installed, we can use it to log in as andrew
; we will be prompted for the password and to list shares on the localhost. We should see the listed home directory coming from the [homes]
special share section. This is always there by default. We will see the output as expected, not the share name andrew
, as shown in the following screenshot:
Of course, we can leave it here and hide the fact that there are some SELinux traps with the current setup. We can connect to a share, but SELinux will prevent access to the users' home directories. While Chapter 10, Securing...