How to: Public samba shares in Manjaro
Since I discovered Manjaro 2 months ago, I found my new preferred desktop Linux distribution.
Being from a non-tech savvy country, and owning a non-tech company, I mainly need a user-friendly, fast and stable Linux that I can install on my company’s computers for the employees to use. Manjaro was pretty much ready to use with the default setup, and the only thing I needed to add was a GUI for creating samba shares.
And, here are the steps to accomplish that.
Assumptions:
- you have a running XFCE Manjaro install, with Thunar File Manager
- you are an admin (sudo rights)
Install thunar-shares-plugin-manjaro
- Open a new terminal window and type
sudo pacman -S thunar-shares-plugin-manjaro
Edit smb.conf to set default guest user and group
In the default install, every file and directory created by guests will have root as owner and group. This will prevent the actual computer user from editing/deleting the files created by a samba user. We set the “guest account” mapping to “nobody” and force every file created via samba to belong to the sambashare group and be editable by it.
- In a terminal prompt (window) type:
sudo mousepad /etc/samba/smb.conf
- Change guest account setting to nobody:
guest account = nobody
- Add the following lines to the end of your file:
group = sambashare force create mode = 0070 force directory mode = 0070
- My smb.conf file looks like this, yours should be similar.
[global] workgroup = MANJARO server string = Samba Server log file = /var/log/samba/%m.log max log size = 50 security = user map to guest = Bad User guest account = nobody usershare path = /var/lib/samba/usershare usershare max shares = 100 usershare allow guests = yes usershare owner only = yes group = sambashare force create mode = 0070 force directory mode = 0070
Grant executable right to your home directory
This is necessary so that other users can access your shares. There doesn't seem to be any security implications, but please feel free to let me know otherwise.
- In a terminal prompt (window) type:
chmod o+x /home/<username>
Restart your computer
Done, now your computer is setup to share folders via samba with guest users. All that is left to do, is create your shares.
Comments