How To Install samba on Kali Linux
Introduction
In this tutorial we learn how to install samba
on Kali Linux.
What is samba
samba is:
Samba is an implementation of the SMB/CIFS protocol for Unix systems, providing support for cross-platform file and printer sharing with Microsoft Windows, OS X, and other Unix systems. Samba can also function as an NT4-style domain controller, and can integrate with both NT4 domains and Active Directory realms as a member server.
This package provides the components necessary to use Samba as a stand-alone file and print server or as an NT4 or Active Directory domain controller. For use in an NT4 domain or Active Directory realm, you will also need the winbind package.
This package is not required for connecting to existing SMB/CIFS servers (see smbclient) or for mounting remote filesystems (see cifs-utils).
There are three methods to install samba
on Kali Linux. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install samba Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install samba
using apt-get
by running the following command:
sudo apt-get -y install samba
Install samba Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install samba
using apt
by running the following command:
sudo apt -y install samba
Install samba Using aptitude
If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install samba
using aptitude
by running the following command:
sudo aptitude -y install samba
How To Uninstall samba on Kali Linux
To uninstall only the samba
package we can use the following command:
sudo apt-get remove samba
Uninstall samba And Its Dependencies
To uninstall samba
and its dependencies that are no longer needed by Kali Linux, we can use the command below:
sudo apt-get -y autoremove samba
Remove samba Configurations and Data
To remove samba
configuration and data from Kali Linux we can use the following command:
sudo apt-get -y purge samba
Remove samba configuration, data, and all of its dependencies
We can use the following command to remove samba
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge samba
Dependencies
samba have the following dependencies:
- dpkg
- init-system-helpers
- adduser
- libpam-modules
- libpam-runtime
- lsb-base
- procps
- python3
- python3-dnspython
- python3-samba
- samba-common
References
Summary
In this tutorial we learn how to install samba
package on Kali Linux using different package management tools: apt
, apt-get
and aptitude
.