How to Install Samba on Kali Linux Latest
In this tutorial, we will learn how to install the latest version of Samba on Kali Linux step by step.
Prerequisites
Before we start, please make sure that you have the following:
- A running Kali Linux latest version
- The administrative privileges of the user account you are using
Step 1: Update Package Index
The first step is to update the package index on Kali Linux using:
sudo apt update
Step 2: Install Samba
Next, install Samba using the following command:
sudo apt install -y samba
The -y flag will automatically confirm the installation prompt.
Step 3: Verify Installation
Verify that Samba has been installed correctly by checking the version:
sudo smbd --version
Step 4: Create a Samba User Account
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.
Step 5: Configure Samba
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.
Step 6: Restart Samba
Once you have updated the Samba configuration file, restart Samba for the changes to take effect:
sudo systemctl restart smbd
Step 7: Access Shared Folder
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.
Conclusion
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.