Setting up a Samba server to share files with Windows PC

Hi all,

I’m new to linux, and I’m trying to set up a Samba server with YaST2 on my Tumbleweed PC to share files with my Windows laptop. The tutorials I’ve found use older versions of YaST, which make it difficult to follow along.

I have two questions which I couldn’t find an answer for:

  1. How do I find out the network address of the Samba server to add the network connection on my Windows PC?
  2. The option to open a port in the YaST2 Samba configuration is greyed out and the section says “No network interfaces are configured”. How do I have to change the settings for firewalld to be able to use the Samba server in my home network?

Thank you for your help!

YaST2 firewalld module only shows interfaces configured for wicked. wicked is deprecated and default on new installation today should be NetworkManger. By default firewalld is using public zone, so you can just open ports in it. Or you can configure firewall zone in NetworkManager connection profile.

That one should be easy. While logged in to your server open a terminal / console and type: ip address.
If you are using a DHCP-server (normally this service is provided by the internet router) you may wish to make sure that the server always gets the same IP address. I’m using a Fritz box where this can be easily checked. Other types should have similar options.
The router should also be a way to find out the IP address of your server, BTW.

Thank you for your answers. :+1:

If all I want to do is share files between a Windows and a Linux PC, what option do I choose for Domain Controller “Not a DC”/“Primary”/“Backup”?

For simple file sharing, there are other options besides samba eg sftp. However, if using samba choose the standalone mode (no domain controller needed).

The samba wiki explains all that you need to know…

This guide may also be of value…

1 Like

I went with sftp. Thank you for that tip.
I opened an ssh port with firewalld (I didn’t use the --permanent flag, because I just need the port to be open temporarily) and started an sshd server.

$ sudo firewalld-cmd --zone=public --add-service=ssh
$ sudo systemctl start sshd

I managed to set up an ssh connection to this server from my Windows machine and set up a public key authentication. I can now transfer files through sftp :+1:.

To make my ssh server more secure, I tried to disable password login, but I’m not sure if I succeeded. I set PasswordAuthentication no following the public key tutorial (which uses the wrong config path at the time of writing). But I couldn’t find the setting ChallengeResponseAuthentication no from the tutorial in the default options.

sudo vim /usr/etc/ssh/sshd_config

Do I have to add this option or is the tutorial only for older versions of openSUSE?

It is called KbdInteractiveAuthentication today. Old name should still be accepted though.

1 Like