LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to configure in smb.conf file, different port then 901 for connection with swat (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-configure-in-smb-conf-file-different-port-then-901-for-connection-with-swat-4175669268/)

Kael DElf 02-09-2020 03:26 PM

How to configure in smb.conf file, different port then 901 for connection with swat
 
Hello.
I need to change default port 901 for some other port, in smb.conf file.

I need to connect swat to server through another port.

Unsuccessfully I searched the internet for days (www.slackbook.org, www.samba.org ....).

I think i can do it in /etc/services file but i need to do it in smb.conf.

thank`s

allend 02-09-2020 04:54 PM

I am unclear on what you are trying to achieve, but your approach looks wrong to me.
swat is a GUI tool for preparing and checking smb.conf.
If the intention is to block remote access in the privileged port range on the server running Samba, then look at the firewall.
If the intention is to allow remote administration of Samba using swat, then look at techniques for gaining secured access to the server (e.g. SSH) then running swat locally.

The /etc/services file is simply a list of recognised ports and services. Making changes there will achieve nothing.

michaelk 02-09-2020 05:30 PM

The man page implies that you can change the port number in /etc/services but that is because swat runs from xinetd and not as a stand alone service. xinetd uses the services file to monitor network traffic. I have not played with swat in many years.

swat can not be configured from smb.conf. swats main purpose is to modify the smb.conf file and that would not work very well.

Actually swat is deprecated and removed as of version 4.1 due to security issues.

Kael DElf 02-10-2020 08:09 AM

I take some linux learning course.

I'm tasked with configuring, among other things, that swat can be connected to samba from a specific port other than port 901.

I only send them a smb.conf file for evaluation, so I suppose a connection port can be set in it.

thank`s

michaelk 02-10-2020 08:17 AM

Since you are taking a linux learning course have a look at the smb.conf documentation. Its in there...

https://www.samba.org/samba/docs/cur...mb.conf.5.html

Kael DElf 02-11-2020 04:33 PM

all I had to do was add in the [global] section of smb.conf file, line:

web port = 902

also added the line to /etc/services:

swat 902/tcp

thank`s to michaelk

Because the file "smb.conf — The configuration file for the Samba suite" that I was looking did not have all the information,

as the file smb.conf — The configuration file for the Samba suite" he linked to me.

Kael DElf 02-11-2020 04:34 PM

Solved


All times are GMT -5. The time now is 03:25 AM.