In this tutorial, we will learn how to install the latest version of Samba on Kali Linux step by step.
Before we start, please make sure that you have the following:
The first step is to update the package index on Kali Linux using:
sudo apt update
Next, install Samba using the following command:
sudo apt install -y samba
The -y flag will automatically confirm the installation prompt.
Verify that Samba has been installed correctly by checking the version:
sudo smbd --version
We need to create a Samba user account to allow users to access shared files on our system. To do this, run the following command:
sudo smbpasswd -a <username>
Replace <username>
with the username you want to create.
Now, we need to configure Samba to share a folder on our system.
Open the Samba configuration file using:
sudo nano /etc/samba/smb.conf
Add the following configuration at the end of the file:
[shared_folder]
path = /path/to/shared/folder
browsable = yes
guest ok = no
read only = no
valid users = <username>
Replace /path/to/shared/folder
with the path to the folder you want to share, and <username>
with the username you created in Step 4.
Save and close the file.
Once you have updated the Samba configuration file, restart Samba for the changes to take effect:
sudo systemctl restart smbd
Finally, you can access the shared folder on your Kali Linux system from Windows or any other device connected to your network.
Open the file explorer on your Windows device and type in the following address in the address bar:
\\<kali-linux-ip-address>\shared_folder
Replace <kali-linux-ip-address>
with the IP address of your Kali Linux system.
You will be prompted to enter the Samba user account details created in Step 4.
Congratulations! You have successfully installed Samba and shared a folder on Kali Linux. You can now use Samba to share files with other devices on your network.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!