In this video, I go over how to setup samba for file sharing in Linux. This is a streamlined video that goes over the 2 easiest ways to accomplish this task.
Timestamps:
0:18 – Samba Share setup in Ubuntu GUI (nautilus)
2:25 – Terminal Setup – Smb.conf walkthrough
12:25 – Enabling SMB 1.0 in Windows
14:37 – Verifying Shares and Access
Below is my Samba Cheat-Sheet I created
Install Samba:
sudo apt install samba -y
Stop Samba Service:
sudo systemctl stop smbd
Create new directory to share:
mkdir linuxshare
Create New /etc/samba/smb.conf
In [global] tag add or change the folowing lines:
server role = standalone server
map to guest = bad user
usershare allow guests = yes
hosts allow = 192.168.0.0/16
hosts deny = 0.0.0.0/0
Add new tag at the end:
[linuxsharename]
comment = Open Linux Share
path = /home/titus/linuxshare
read only = no
guest ok = yes
force create mode = 0755
force user = titus
force group = titus
TEST SETTINGS Type: testparm
Restart Samba Service
sudo systemctl enable smbd
sudo systemctl start smbd
OPTIONAL: Allow samba through firewall
RHEL/Centos/Fedora
sudo firewall-cmd –add-service=samba
Debian/Ubuntu/Mint
sudo ufw allow Samba
Now on any Windows Machines enable windows feature “SMB 1.0” .
►► Digital Downloads ➜ https://www.cttstore.com
►► Patreon ➜ https://www.patreon.com/christitustech
►► Twitch ➜ https://www.twitch.tv/christitustech
►► Website and Guides ➜ https://christitus.com

Timestamps:
0:18 – Samba Share setup in Ubuntu GUI (nautilus)
2:25 – Terminal Setup – Smb.conf walkthrough
12:25 – Enabling SMB 1.0 in Windows
14:37 – Verifying Shares and Access
I was really hoping that this tutorial would help me network 2 linuxmint laptops. I followed the instructions – renaming the smb.conf that came with the installation and creating a new simple version. Added this in and restarted samba and adjusted the firewall. However the second laptop cannot see any shares on the first laptop.
testparm does not report any warnings. I'm disappointed and a little frustrated and don't know where to go next. I guess that is sneakernet as they are on the same network in my house.
I'm a newbie, and you're an expert, but I have read that you shouldn't do sudo gedit. sudo is for terminal commands. gedit is graphical. Apparently you are supposed to use gedit admin://
It seems a few things have changed since this video came out. I was trying to use the file share in Linux Mint using Files and installed Nautilus as well. I keep getting permission errors. However doing it through the smb.conf file and all working. Crazy the GUI just doesn't work in LM anymore.
I have struggled so many times trying to configure Samba to j ust work. This video has made all the difference, thanks Chris! belately 🙂
10:10
It's "force create mode", there's an "e" missing at the end.
Great video needed to watch it to help a buddy of mine keep it up â¤
I haven't tested it yet by accessing from Windows but if I try to access it from another Linux PC I get a prompt asking for credentials.
5 years later and still helpful. Thanks man!
I am trying to share a usb drive from Ubuntu to win11. I have setup the samba service and successfully shared a folder but I am stuck on the syntax for sharing the external usb drive.
I have tried a whole lot of things. This is the only one that worked. Thanks a lot for this and for a lot of your other work.
As this video is old, I had some issues. I found that commenting out the "force user" and "force workgroup" lines were necessary, and it worked.
I also had to configure my default firewall in linux mint, as was described in the description of this video.
I have gone through the cut and paste tutorial from Ubuntu and I am being limited to 100GB in my share is there a setting in my .conf I can change to expand into the full near TB of storage I have available? It is nice to see someone take the time to explain the terminal based implementations rather than the standard RTFM.
Good job mate…thanks. Still learning Linux and loving it. Creating a network however, needs some simplifying from my vantage point. Sharing in windows is super easy and had no problems at all, but this Samba sharing has me jumping through that many darn hoops I dont know whether I am Arthur or Martha lol. Of course my interface is different from your older version, but I did manage to get all 3 of my boxes joined together on a semblance of a network (if you could call it that) and after giving preferences to just about every man and his dog, I can now view all boxes from every angle. Problem is… can't transfer folders from one to another (Permission denied) or edit a file that has been moved from one to another. Already balding and cant afford to pull any more hair out lol. Trying to see a funny side, but hard to do. Is there a way to give full permission without the 777 comand?
Fresh install of Linux Mint, installed Nautilus and there is NO option for local network share.
obviously the tutorial works and I apricate that you are putting out things like this but there is a very bad flaw in the instructions. if you change the (guest ok = yes) to no then you will not be able to access the share because you are always logging in as guest because you forgot to set the samba password using sudo smbpasswd -a yourusername ; This will lead to the share being completely open to anyone on the network, and could lead to a horrible mess if a individual uses this and then takes their laptop to a coffee shop or if they set it up on a cooperate network. Be careful with these instructions.
dude you literally saved my ass.
I needed to enable the SMB settings on my windows box – that was my problem. Been looking and looking for days.
Thanks a million.
This is an old video but please don't enable SMB1.0, it's insecure, slow, obsolete and should not be used on newer OS. Add following line under [global] section in smb.conf instead: max protocol = SMB3. Or, if it doesn't work(for example, on Centos 6.x) try: max protocol = SMB2. If You have new enough(>= 4.2) Samba, do not add max protocol, it should work (and use SMB2 or SMB3) by default.
This doesn't work for Ubuntu Server since the server doesn't have a GUI.😢
I keep getting the error "Unable to access location – failed to mount Windows share: Invalid argument", no matter what. My server is a headless raspberry pi and my client is a Fedora, I didn't see any instructions for Linux clients yet, is there any difference?
Yes finally got it working
5-2023 ubuntu none of your smb.conf input works… comands do not work… why post this without warning does not work with ubuntu????
Thank you very much! You literally saved my day! I had done +2 hours trying to fix an issue and it was the SMB 1.0 feature that I didn't have enabled. Thanks!
This gotta be the best samba tutorial i've seen on youtube
Thanks a million
Thanks a million
ðŸ¯
Many, many, many thanks for this simple setup that works. As you said it is RIDICULOUS how much info is out there that just complicates things or includes super advanced setups that only very few people use. I can finally share my external drives over my home network with this setup. Seriously you are a life saver.
great video, helped clear up stuff while troubleshooting my fileserver! definately saving for reference
Doesn't work, windows computer wants credentials and after I enter them it tells me I don't have permission to use the network resource.
Love your content. Re-film this one so you don't look like a psychopath.
Thenks! It works. Easy, quick and straight. 😀
9:01 the force create mode works, it just needs to be written as force create mode not mod.
I have a ubuntu server 18.04 , file sharing is already enabled , but everyone can see others file kept in central server i want to make a centralised share folder where students can save their file in server with id password. Is this possible , pls suggest Thank you
Great video. Thanx. However I did not find part 2 that you had talked about.
Not sure why, but this set up stopped working for me as of recently. I get this error "'net usershare' returned error 255: net usershare add: cannot convert name "Everyone" to a SID. The network responded incorrectly.." when I attempt to reshare my file locally. My smb.conf file is set up exactly as it is here. When I remove this file and use the default one, I am able to set up the share. Then I just run into the issue of trying to configure it so that I get it as another user on another computer in the network
Fantastic!
Many thanks for this excellent video, which has helped me solve a problem I've had for a while. Seems never trust the default smb.conf file. As a relatively new Linux user, I was avoiding editing the default file for fear of 'breaking' the system. Your approach worked perfectly!
the files i create via the non-terminal method are discoverable on my windows machine but when they are created the are owned by "nobody". when i do the terminal method the file is not discoverable on the windows machine. bit confused really.
Hello Chris… Do you have a video on how to join Active Directory from linux and authenticate samba users? Les´s say I only want the domainManagers_Group to be able to access my Samba Shares… Regards!!
Thank you very much, without enabling in windows Linux support, the windows not can access Linux shared folder.
Not gonna lie, even a detailed video like this turns me off from Linux for servers. Im actually surprised its still this ridiculous to setup shared folders in linux… windows is literally 1 click and you've got yourself a server. Ive been using Linux mint as a daily driver for a couple years now. I really have no other use for windows besides servers since Linux is trash in that aspect.
Excellent tutorial Chris. Thank you very much. Is there an advanced tutorial with samba user management?