LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-09-2020, 03:26 PM   #1
Kael DElf
LQ Newbie
 
Registered: Dec 2019
Posts: 5

Rep: Reputation: Disabled
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
 
Old 02-09-2020, 04:54 PM   #2
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 5,952

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
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.
 
Old 02-09-2020, 05:30 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 22,869

Rep: Reputation: 4829Reputation: 4829Reputation: 4829Reputation: 4829Reputation: 4829Reputation: 4829Reputation: 4829Reputation: 4829Reputation: 4829Reputation: 4829Reputation: 4829
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.

Last edited by michaelk; 02-09-2020 at 10:26 PM.
 
Old 02-10-2020, 08:09 AM   #4
Kael DElf
LQ Newbie
 
Registered: Dec 2019
Posts: 5

Original Poster
Rep: Reputation: Disabled
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
 
Old 02-10-2020, 08:17 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 22,869

Rep: Reputation: 4829Reputation: 4829Reputation: 4829Reputation: 4829Reputation: 4829Reputation: 4829Reputation: 4829Reputation: 4829Reputation: 4829Reputation: 4829Reputation: 4829
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
 
Old 02-11-2020, 04:33 PM   #6
Kael DElf
LQ Newbie
 
Registered: Dec 2019
Posts: 5

Original Poster
Rep: Reputation: Disabled
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.
 
Old 02-11-2020, 04:34 PM   #7
Kael DElf
LQ Newbie
 
Registered: Dec 2019
Posts: 5

Original Poster
Rep: Reputation: Disabled
Solved
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SWAT cannot connect to localhost port 901 KhmerDucky Linux - Networking 2 02-09-2020 03:58 PM
SWAT - Could not connect to port 901 brucerowe Linux - Networking 17 09-11-2008 11:45 AM
help setting swat up and opening port 901 tarax Linux - Security 7 03-18-2004 07:49 PM
SAMBA & SWAT - Connection refused when attempting to connect Localhost:901 ScooterB Linux - Networking 3 12-24-2003 04:15 PM
SWAT does not work when calling localhost:901 themorph Linux - Networking 2 03-06-2002 11:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration