# 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:

```bash
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

<div data-layout="center" data-node-type="mediaSingle" data-width="250" data-width-type="pixel" id="bkmrk--2"></div>### 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.

```bash
mv /etc/samba/smb.conf /etc/samba/smb.conf.bak
```

Next, we are going to create a new configuration file.

```bash
vim /etc/samba/smb.conf
```

This will define the samba share by adding the lines shown in the configuration file.

```bash
[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:

```bash
testparm
```

This verifies Samba Configuration

<div data-layout="center" data-node-type="mediaSingle" data-width="250" data-width-type="pixel" id="bkmrk--5"></div>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

<div data-layout="center" data-node-type="mediaSingle" data-width="250" data-width-type="pixel" id="bkmrk--7"></div>### 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 <span class="code" spellcheck="false">key + R</span> to launch the **Run** dialog.

In the textfield provided, enter the samba server’s IP address as shown:

```
\\server-ip
```

This accesses Samba Share from Windows

Some data from here

[https://wiki.samba.org/index.php/Setting\_up\_Samba\_as\_a\_Standalone\_Server](https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Standalone_Server)

<div data-layout="center" data-node-type="mediaSingle" data-width="250" data-width-type="pixel" id="bkmrk--9"></div>