How to install Samba Server in Ubuntu Server v.22.04.4
1. As usual, update Ubuntu's repositories.
sudo apt update && sudo apt upgrade -y
|
2. Install the Samba server.
sudo apt install samba -y |
3. To verify the Samba installation.
sudo whereis samba |
OR
sudo samba -v |
OR
sudo systemctl status smbd |
4. Make a backup of Samba's configuration file.
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak |
5. Edit the Samba's configuration file.
sudo nano /etc/samba/smb.conf |
6. Browse to the end of the file and add in the following configurations.
[global] server string = [Hostname] [samba_share] comment = Samba Shared Folder path = /mnt/samba_share browsable = yes writable = yes read only = no guest ok = no valid users = [Samba Username] |
7. Assign the proper permissions to the shared folder.
sudo chmod -R 755 /mnt/samba_share |
8. Create a new Samba user.
sudo smbpasswd -a [Username] |
*Note : you will be prompted to key-in the user's password.
9. Enable the created User for Samba access.
sudo smbpasswd -e [Username] |
10. Test the Samba configuration.
sudo testparm |
11. Restart Samba service for the new configurations.
sudo systemctl restart smbd |
12. Test the Samba connections using another computer and with the credentials created.
!!! HAPPY COMPUTING !!!
No comments:
Post a Comment