Discussion:
Configuring samba
(too old to reply)
root
2022-06-18 02:59:14 UTC
Permalink
I used the same smb.conf for 15.0 as I did for 14.2
I cannot connect to the computer using (old) android
devices: I get a message the android device needs
smb2.0. How can I set back the computer to allow
connection from my android device?

Thanks.
Marco Moock
2022-06-18 04:34:24 UTC
Permalink
Post by root
I used the same smb.conf for 15.0 as I did for 14.2
I cannot connect to the computer using (old) android
devices: I get a message the android device needs
smb2.0. How can I set back the computer to allow
connection from my android device?
Please post your config file.

Also read that, maybe setting min protocol is enough:
https://www.cyberciti.biz/faq/how-to-configure-samba-to-use-smbv2-and-disable-smbv1-on-linux-or-unix/
Henrik Carlqvist
2022-06-18 10:33:54 UTC
Permalink
Post by Marco Moock
I used the same smb.conf for 15.0 as I did for 14.2 I cannot connect to
the computer using (old) android devices: I get a message the android
device needs smb2.0. How can I set back the computer to allow
connection from my android device?
Please post your config file.
https://www.cyberciti.biz/faq/how-to-configure-samba-to-use-smbv2-and-
disable-smbv1-on-linux-or-unix/

As all parameters not mentioned in the smb.conf get a default value it
might also be interesting to see the output from:

echo | testparm -v 2> /dev/null | grep protoco

The first "echo |" is only to make testparm continue. The testparm
program will start by printing some information to stderr and then ask
the user to press enter to continue. The above command sends that to /dev/
null so only the interesting parameters are shown.

regards Henrik
root
2022-06-18 13:50:24 UTC
Permalink
Post by Marco Moock
Post by Marco Moock
I used the same smb.conf for 15.0 as I did for 14.2 I cannot connect to
the computer using (old) android devices: I get a message the android
device needs smb2.0. How can I set back the computer to allow
connection from my android device?
Please post your config file.
https://www.cyberciti.biz/faq/how-to-configure-samba-to-use-smbv2-and-
disable-smbv1-on-linux-or-unix/
As all parameters not mentioned in the smb.conf get a default value it
echo | testparm -v 2> /dev/null | grep protoco
client ipc max protocol = default
client ipc min protocol = default
client max protocol = default
client min protocol = SMB2_02
server max protocol = SMB3
server min protocol = SMB2

Thanks Henrik and Marco for responding. The original smb.conf
was:

[global]
guest account = smbguest
netbios name = aa
security = user
null passwords = yes
map to guest = Bad Password
guest account = smbguest
# socket options = TCP_NODELAY IPTOS_LOWDELAY
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65535 SO_SNDBUF=65535 SO_KEEPALIVE
workgroup = WORKGROUP
domain master = yes

[public]
guest ok = yes
guest only = yes
path = /samba.ok/
browseable = yes
read only = no


Following Marco's reference I changed this to:

[global]
guest account = smbguest
netbios name = aa
security = user
passdb backend = tbdsam



min protocol = SMB2

[public]
guest ok = yes
guest only = yes
path = /samba.ok/
browseable = yes
read only = no

Prior to any of this, I created a user smbguest with this
entry in /etc/passwd:

smbguest:x:1000:100::/home/smbguest:/bin/bash

The :x: means, to me, that I did enter a password
when I created the user. That password was guest.


In my android device I had been using ES File explorer.
It is that file manager which issued the smb2.0 refusal.

Subsequently I loaded the X-Plore file manager from the
Play Store. X-Plore allows SMB2 connection.

ES file explorer had a point where I could click anonymous
but X-Plore does not have that choice. X-Plore says to
leave the username blank for anonymous access, which I do.
X-Plore fails to connect regardless of whether I supply
the smbguest password.

Every time I make a change to smb.conf I restart /etc/rc.d/rc.samba

Currently X-Plore gives me this message:

java.netConnectExceptio failed to connect to/
10.0.0.1 (port 445) from 10.0.0.229 port 4032
Connection Refused


I set the permissions on the access /samba.ok as
chmod 7777 /samba.ok and everything within that
directory.

It has been so long since I set up 14.2 I am guessing
I missed some step in setting up samba, or I have
set something incorrectly.

Thanks for your help.
Henrik Carlqvist
2022-06-19 05:24:15 UTC
Permalink
Post by root
Post by Henrik Carlqvist
echo | testparm -v 2> /dev/null | grep protoco
client ipc max protocol = default
client ipc min protocol = default
client max protocol = default
client min protocol = SMB2_02
server max protocol = SMB3
server min protocol = SMB2
Maybe it would help to set the "client min protocol" to CORE ?
It seems as if it is set to CORE in Slackware 14.2 by default.
Post by root
Prior to any of this, I created a user smbguest with this entry in
smbguest:x:1000:100::/home/smbguest:/bin/bash
The :x: means, to me, that I did enter a password when I created the
user. That password was guest.
The field with an x used to contain an encrypted password in /etc/
passwd. However, as /etc/passwd is readable by anyone and it is possible
to brute force crack those encrypted passwords the "x" means that the
encrypted password is instead stored in /etc/shadow which is readable
only by root.
Post by root
java.netConnectExceptio failed to connect to/
10.0.0.1 (port 445) from 10.0.0.229 port 4032 Connection Refused
I suppose that 10.0.0.1 is your samba server and 10.0.0.229 is your
phone? Older configurations of samba used to listen to port 139 instead
of 445. What does:

echo | testparm -v ~/smb.conf 2> /dev/null | grep ports

say?

regards Henrik
root
2022-06-19 19:51:16 UTC
Permalink
Post by Henrik Carlqvist
echo | testparm -v ~/smb.conf 2> /dev/null | grep ports
say?
regards Henrik
I get nothing from that command.

I change ~/smb/conf to /etc/samba/smb.conf and I get:

enumports command =
smb ports = 445 139
Henrik Carlqvist
2022-06-20 04:19:34 UTC
Permalink
Post by root
Post by Henrik Carlqvist
echo | testparm -v ~/smb.conf 2> /dev/null | grep ports
say?
I get nothing from that command.
Whoops, sorry. As I don't have samba running myself I don't have the
default /etc/smb.conf and when testing my commands I use an old smb.conf
in my home directory. My intention was to remove the path to ~/smb.conf
before posting the command.
Post by root
enumports command =
smb ports = 445 139
That looks good, it seems as if your samba should be listening to port
445 that X-plore is complaining about.

If you are unable to get ES File explorer working by changing min
protocol to CORE it might be easier to configure an ftp server for ES
File explorer to connect to than to get samba working again.

regards Henrik
root
2022-06-20 16:46:25 UTC
Permalink
Post by Henrik Carlqvist
Post by root
Post by Henrik Carlqvist
echo | testparm -v ~/smb.conf 2> /dev/null | grep ports
say?
I get nothing from that command.
Whoops, sorry. As I don't have samba running myself I don't have the
default /etc/smb.conf and when testing my commands I use an old smb.conf
in my home directory. My intention was to remove the path to ~/smb.conf
before posting the command.
Post by root
enumports command =
smb ports = 445 139
That looks good, it seems as if your samba should be listening to port
445 that X-plore is complaining about.
If you are unable to get ES File explorer working by changing min
protocol to CORE it might be easier to configure an ftp server for ES
File explorer to connect to than to get samba working again.
regards Henrik
Thanks Henrik. Using CORE protocol does work, as does NT1.

Dozens of these puzzles have arisen since I converted from
14.2 to 15.0. It shouldn't be that way with Slackware.
The sample smb.conf should have provided an smb.conf that
worked (for at least some devices).
Henrik Carlqvist
2022-06-20 17:48:05 UTC
Permalink
Dozens of these puzzles have arisen since I converted from 14.2 to 15.0.
It shouldn't be that way with Slackware. The sample smb.conf should have
provided an smb.conf that worked (for at least some devices).
The problem is that newer versions of Slackware has newer versions of
applications like samba. Most parameters possible to configure in
smb.conf are not mentioned in that file but get their default values
instead. The problem is that some of these default values change between
different versions of samba.

I don't know what reason, but there is probably some reason that the
developers of samba decided to increase the default min protocol. Maybe
they wanted to avoid some security weaknes in those older protocols.
Maybe they simply thought that noone is using such old unsupported
versions of Windows nowadays anyways.

But, yes, I do agree that every time I upgrade to a newer version of
Slackware there is a lot of work to adapt that version to my network and
once that is done it remains a lot of work to adapt my network and
applications to the new version of Slackware.

regards Henrik

Loading...