Wiki » History » Revision 6
« Previous |
Revision 6/7
(diff)
| Next »
Gareth Eaton, 12/18/2023 01:52 AM
Share a Linux Mint folder¶
also See - Setting up the smb.conf file
also See - How to Fix "Weak Crypto is Allowed" in Samba
- Install Samba.
- Check the Samba server status.
- Allow Samba across the firewall.
- Add user to Sambashare group.
- Set SambaShare password.
- Click sharing option.
- Turn on the share folder toggle.
Step 1: Perform a system update.¶
sudo apt update
Step 2: Samba installation in Linux Mint¶
sudo apt install samba
Once it has been installed, run the command below to ascertain that the service is up and running:
sudo systemctl status smbd
If the service is not active, execute the following line of code:
sudo systemctl --enable now smbd
Step 3: Allow Samba across the Linux Mint Firewall¶
To connect to and access shared files using SMB protocol, we must whitelist and enable access to its service from outside the machine. As a result, we will allow it in the firewall.
sudo ufw allow samba
Step 4: Include your user in the Samba group.¶
Allow the current System user to access all files and folders shared under it by adding it to the SambaShare group. To do so, execute the following line of code:
sudo usermod -aG sambashare $USER
Next, set the share password: This should be distinct from your system password.
sudo smbpasswd -a $USER
Note that $USER refers to your current user; if you wish to set a different user, replace $USER with the user’s name. Furthermore, the file or folder you want to share must be available to that specific user.
sudo usermod -aG sambashare your-user
To set a password, execute the following line of code:
sudo smbpasswd -a your-user
That’s it. SMB (Samba) has been installed and configured correctly on our Linux Mint OS. To test it out, we shall try the following:
Assuming I want to share the “Shared” folder or any other folder on my Linux Mint that my current user owns. Navigate to that folder, right-click it, and pick the “Sharing options” tab.
Note: Occasionally, you might realize that the “Share this folder” option has been toggled off. To enable sharing, toggle on that option and check the “Allow others to create and delete files in this folder”. Once you are done, input the shared folder name and comment if need be and click the “Create share” button.
Show Users
sudo pdbedit -L
remove a user
sudo pdbedit -x -u username or sudo smbpasswd -x username
To remove the root user from your Samba user database,
sudo pdbedit -x -u root
Updated by Gareth Eaton about 1 year ago · 6 revisions