Linux - Samba Setup No Authentication
Step 1: Install Samba on Linux
To get started out with Samba, install the Samba core packages including the client package:
dnf install -y samba samba-common samba-client
The command installs the packages specified along with the dependencies as displayed on the output. After the installation is complete, you will get a summary of all the packages that have been installed.
Samba Installation Completes
Step 2: Create and Configure Samba Shares
Once all the samba packages have been installed, the next step is to configure the samba shares. A samba share is simply a directory that is going to be shared across client systems in the network.
Next, we are going to make some configurations in the smb.conf configuration file which is Samba’s main configuration file. But before we do so, we will back up the file by renaming it with a different file extension.
mv /etc/samba/smb.conf /etc/samba/smb.conf.bak
Next, we are going to create a new configuration file.
vim /etc/samba/smb.conf
This will define the samba share by adding the lines shown in the configuration file.
[global]
unix charset = UTF-8
hosts allow = 192.168.253.
map to guest = Bad User
log file = /var/log/samba/log.%m
log level = 1
server role = standalone server
[httpd]
path = /etc/httpd/
read only = no
guest ok = yes
guest only = yes
force user = apache
force group = apache
[html]
path = /var/www/html/
read only = no
guest ok = yes
guest only = yes
force user = apache
force group = apache
[top]
path = /
read only = no
guest ok = yes
guest only = yes
force user = root
force group = root
Save and exit the configuration file.
To verify the configurations made, run the command:
testparm
This verifies Samba Configuration
Next, start and enable Samba daemons as shown.
systemctl enable --now smb;systemctl enable --now nmb
Be sure to confirm that both the smb and nmb daemons are running.
systemctl status smb;systemctl status nmb
This verified Samba Status
Step 3: Accessing Samba Share from Windows
Thus far, we have installed samba and configured our samba share. We are now ready to access it remotely. To do this on a Windows client, press the Windows logo key + R to launch the Run dialog.
In the textfield provided, enter the samba server’s IP address as shown:
\\server-ip
Some data from here
https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Standalone_Server