Help with Samba

In all my years working with Linux, Samba has always, always been the one thing that I hated setting up. It just never works right for me.

So here I am, trying to set Samba up again. And here I am, a week after starting, and I have accomplished nothing. I have followed many different guides, have tried many different settings, and have completely reinstalled Fedora Server three times (because I broke things so badly I didn't know how to fix it). I may have to reinstall again, because now nmb won't start, and I don't even know if that's needed for Samba to work.

What is most frustrating is the fact that everywhere I look everyone says how simple and easy it is to set up Samba. And then every guide is different. And everything I try doesn't work.

So. My current position is thus:

I have a Fedora 23 Server installation running on an encrypted LVM on a 64GB SSD. I then have an 8TB encrypted LVM for mass storage, mounted at /run/media/admin/homeserver_share. This is what I want to share over the network.

All Samba related packages are installed, and (with information and settings from several different guides) my samba.conf appears OK according to testparm. smb.service is running, but nmb.service will not start.

Apparently I have to change the label of the directory I want to share to 'samba_share_t' if it isn't in the home directory. So I followed the instruction at http://selinuxproject.org/page/SambaRecipes to do this.

Both 'samba' and 'samba-client' are added to the list of services allowed through the firewall.

I will try to get my samba.conf copied in here, but I am using Cockpit to manage the server, and can't copy/paste from the terminal there. I also can't remote desktop or ssh into it at all.

So, any information or suggestions would be greatly appreciated.

I have samba setup but I would suggest posting link to
your configuration. I could see what's maybe the problem and maybe mor specific questions would help also

1 Like

well since you didn't answer I'll leave this to hopefully help someone else. my working config http://paste.fedoraproject.org/300111/49933570. I also had to turn on "home directories" boolean by issuing "setsebool -P samba_enable_home_dirs on" in terminal. This as I realized is anything under the /home directory will be able to be shared. I am using Fedora 23 and also you do have to allow the ports in firewalld by issuing "firewall-cmd --add-service=samba --permanent" and starting samba service and probably nmb which helps shares show up faster in my experience by issuing "systemctl start smb nmb" note these aren't permanent if you do want to start at boot change "start" command to "enable". The "force user" option was needed to allow anonymous logging in of the shares I couldn't figure out a more secure way but maybe someone else will know

use system-config-samba to configure samba more easily
it's a gui tool

Sorry, I got busy with other things and forgot to follow this thread.

I ended up setting up NFS instead of Samba. It felt complicated when setting it up, but in the long run it is simpler to get it working. Only downside is it is essentially Linux to Linux only, which is OK by me as all my systems I use now are Linux. My only windows box isn't really used now.

I am, however, getting slow speeds when transferring lots of data to the server. I am not sure if it's a physical networking problem or something wrong with the server itself. For some reason, in Cockpit, it shows it using 14GB of memory, when the system has 8GB of memory. When I run the free command I get this:

Not sure. I am going to restart the server and transfer a lot of data to it again to see what happens.

EDIT:
Fresh restart:

I would definitely like to use the GUI tool, but this is a command line server. I don't want to install a DE, mainly because I want to get better at using CLI.

1 Like

Well I'm glad you got something that worked for you but hopefully it helps someone else

Maybe do some X11 forwarding to use the GUI tool? I've done that at work a few times, all our unix servers are command line only but there's a couple applications I've used that require X11 forwarding to use them, such as a pretty old version of Websphere.