LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Can't connect from Windows to samba-4.6.7 on current. Same config works fine on SW14.1/samba-4.2.1-x86_64-1 (https://www.linuxquestions.org/questions/slackware-14/cant-connect-from-windows-to-samba-4-6-7-on-current-same-config-works-fine-on-sw14-1-samba-4-2-1-x86_64-1-a-4175612921/)

rlx 08-30-2017 10:37 AM

Can't connect from Windows to samba-4.6.7 on current. Same config works fine on SW14.1/samba-4.2.1-x86_64-1
 
Hi,

I have installed current on my working partition and I find that I can no longer connect from my Windows PC's to the Linux server. Connection from Android still works fine though. The package is samba-4.6.7-x86_64-1. Of course I have the users added to samba, and I can connect from Android.

If I boot from an older partition running Slackware-14.1 with
samba-4.2.1-x86_64-1, then I can connect from Windows.

I tried to go back to older samba packages but that soon breaks other things (mplayer). I didn't succeed at rebuilding the samba-4.2.1 package on current.

Anyone knows if something special needs to be done when migrating.

Thanks

mostlyharmless 09-05-2017 04:10 PM

Two quick questions: what version of Windows and how does the failure occur? That is, what message does Windows give, and what does the samba log file say? Most of these are authentication problems and are resolved with a trivial tweak to smb.conf. I vaguely recall having to deal with this issue last samba upgrade, but that was some time ago.

rlx 09-06-2017 10:33 AM

Quote:

Originally Posted by mostlyharmless (Post 5755935)
Two quick questions: what version of Windows and how does the failure occur? That is, what message does Windows give, and what does the samba log file say? Most of these are authentication problems and are resolved with a trivial tweak to smb.conf. I vaguely recall having to deal with this issue last samba upgrade, but that was some time ago.

Hi,

I am running Windows-7 on two older TabletPC's. The message I get from Windows after I have entered my credentials is "The specified network password is not correct." Obviously there is an issue in the communication of the credentials between Windows7 and Samba.

To answer your question, I first clear older log files from /var/log/samba then do "Map network drive" from the PC. Afterwards there is a single empty log file /var/log/samba/log.192.168.1.104 sitting in the log directory. I can confirm that the same procedure works fine when I boot the older Linux partition.

I tested with the initial smb.conf file copied from the older Linux partition. Then I edited that file to reflect information I found when googling on that problem and none of the suggested changes had any impact on the functionality. Here is the content of my current smb.conf.

Code:

[global]
        workgroup = RLXNET
        server string = pc3_ss
        log file = /var/log/samba/log.%m
        max log size = 50
        security = user
        passdb backend = tdbsam
        hosts allow = 192.168.1.
        hosts deny = ALL
        dns proxy = No
#        wins server = 192.168.1.100
#        wins support = no
#        smb ports = 139
        printing = cups
        printcap name = cups
        printcap cache time = 750
        cups options = raw
        usershare allow guests = no
#        domain logons = yes
#        domain master = yes
        server signing = auto
[richard]
        comment = Home
        path = /
        valid users = richard
        force user = richard
        force group = richard
        read only = No
        create mask = 0600
        directory mask = 0700

[dan]
        comment = Home
        path = /home/dan
        valid users = dan
        force user = dan
        force group = dan
        create mask = 0600
        directory mask = 0700

[printers]
        comment = All Printers
        path = /var/spool/samba
        guest ok = Yes
        printable = Yes
        browseable = No

[ML-1710]
        comment = Samsung ML-1710
        path = /var/spool/samba
        read only = No
        guest ok = Yes
        printable = Yes
        printer name = ML-1710

[sa301]
        path = /sa301
        read only = No
        create mask = 0600
        directory mask = 0700

[root]
        path = /
        valid users = root
        force user = root
        force group = root
        read only = No
        directory mask = 0700


Olek 09-06-2017 02:33 PM

You should try to find something interestind about Samba in /var/log/syslog file.

mostlyharmless 09-06-2017 02:48 PM

Agree with above, there should be *some* indication that permission was refused by samba, maybe in the syslog.

You mentioned fixes you found by googling, however I don't see any in smb.conf.
Did you try lanman auth = yes, for example? Yeah I know, probably not the issue.

I'd also check on smbpasswd; I seem to recall that you had to redo the password for the new samba install.

I'll check on my install when I get a chance to see if there's something else that comes to mind.

rlx 09-06-2017 03:35 PM

Strangely there is no message recorded in either syslog, messages or /var/log/samba except that the files log.192.168.1.104 and log.pc4 are created empty.

Yes I have redone the password data base at one point; I thought maybe the new version of samba uses a different database so I re-made the database to make sure everything is upgraded. I first needed to correct smb.conf as follows to be able to change my password. I changed the password and still the password is not recognized from Windows.

Code:

hosts allow = 192.168.1. 127.0.0.1
I will try to make samba more verbose and report anything new. I did that a week ago but didn't find any clue.

Uncle Lumpy 09-06-2017 05:32 PM

Quote:

Originally Posted by rlx (Post 5756312)
Strangely there is no message recorded in either syslog, messages or /var/log/samba except that the files log.192.168.1.104 and log.pc4 are created empty.

Yes I have redone the password data base at one point; I thought maybe the new version of samba uses a different database so I re-made the database to make sure everything is upgraded. I first needed to correct smb.conf as follows to be able to change my password. I changed the password and still the password is not recognized from Windows.

Code:

hosts allow = 192.168.1. 127.0.0.1
I will try to make samba more verbose and report anything new. I did that a week ago but didn't find any clue.

Not sure if this matters, but my "hosts allow" line looks like:

hosts allow = 127.0.0.1, 192.168.1

Maybe the comma matters?

Best,
Lumpy

rlx 09-06-2017 07:30 PM

I will try that Uncle Lumpy.

I set 'log level =2' in smb.conf and here is the result after running 'net use x: \\pc3\richard /u:richard' on the PC.
Quote:

[2017/09/06 20:21:52.811651, 2] ../source3/param/loadparm.c:2763(lp_do_section)
Processing section "[richard]"
[2017/09/06 20:21:52.811748, 2] ../source3/param/loadparm.c:2763(lp_do_section)
Processing section "[dan]"
[2017/09/06 20:21:52.811812, 2] ../source3/param/loadparm.c:2763(lp_do_section)
Processing section "[printers]"
[2017/09/06 20:21:52.811842, 2] ../source3/param/loadparm.c:2763(lp_do_section)
Processing section "[ML-1710]"
[2017/09/06 20:21:52.811891, 2] ../source3/param/loadparm.c:2763(lp_do_section)
Processing section "[sa301]"
[2017/09/06 20:21:52.811930, 2] ../source3/param/loadparm.c:2763(lp_do_section)
Processing section "[root]"
[2017/09/06 20:21:52.812213, 2] ../libcli/auth/ntlm_check.c:423(ntlm_password_check)
ntlm_password_check: NTLMv1 passwords NOT PERMITTED for user richard
[2017/09/06 20:21:52.812321, 2] ../source3/auth/auth.c:315(auth_check_ntlm_password)
check_ntlm_password: Authentication for user [richard] -> [richard] FAILED with error NT_STATUS_WRONG_PASSWORD
[2017/09/06 20:21:52.812345, 2] ../auth/gensec/spnego.c:768(gensec_spnego_server_negTokenTarg)
SPNEGO login failed: NT_STATUS_WRONG_PASSWORD
[2017/09/06 20:22:00.218149, 2] ../source3/param/loadparm.c:2763(lp_do_section)
Processing section "[richard]"
[2017/09/06 20:22:00.218243, 2] ../source3/param/loadparm.c:2763(lp_do_section)
Processing section "[dan]"
[2017/09/06 20:22:00.218308, 2] ../source3/param/loadparm.c:2763(lp_do_section)
Processing section "[printers]"
[2017/09/06 20:22:00.218338, 2] ../source3/param/loadparm.c:2763(lp_do_section)
Processing section "[ML-1710]"
[2017/09/06 20:22:00.218386, 2] ../source3/param/loadparm.c:2763(lp_do_section)
Processing section "[sa301]"
[2017/09/06 20:22:00.218425, 2] ../source3/param/loadparm.c:2763(lp_do_section)
Processing section "[root]"
[2017/09/06 20:22:00.218679, 2] ../libcli/auth/ntlm_check.c:423(ntlm_password_check)
ntlm_password_check: NTLMv1 passwords NOT PERMITTED for user richard
[2017/09/06 20:22:00.218781, 2] ../source3/auth/auth.c:315(auth_check_ntlm_password)
check_ntlm_password: Authentication for user [richard] -> [richard] FAILED with error NT_STATUS_WRONG_PASSWORD
[2017/09/06 20:22:00.218804, 2] ../auth/gensec/spnego.c:768(gensec_spnego_server_negTokenTarg)
SPNEGO login failed: NT_STATUS_WRONG_PASSWORD
[2017/09/06 20:22:00.985310, 2] ../source3/param/loadparm.c:2763(lp_do_section)
Processing section "[richard]"
[2017/09/06 20:22:00.985403, 2] ../source3/param/loadparm.c:2763(lp_do_section)
Processing section "[dan]"
[2017/09/06 20:22:00.985467, 2] ../source3/param/loadparm.c:2763(lp_do_section)
Processing section "[printers]"
[2017/09/06 20:22:00.985497, 2] ../source3/param/loadparm.c:2763(lp_do_section)
Processing section "[ML-1710]"
[2017/09/06 20:22:00.985545, 2] ../source3/param/loadparm.c:2763(lp_do_section)
Processing section "[sa301]"
[2017/09/06 20:22:00.985584, 2] ../source3/param/loadparm.c:2763(lp_do_section)
Processing section "[root]"
[2017/09/06 20:22:00.985837, 2] ../libcli/auth/ntlm_check.c:423(ntlm_password_check)
ntlm_password_check: NTLMv1 passwords NOT PERMITTED for user richard
[2017/09/06 20:22:00.985940, 2] ../source3/auth/auth.c:315(auth_check_ntlm_password)
check_ntlm_password: Authentication for user [richard] -> [richard] FAILED with error NT_STATUS_WRONG_PASSWORD
[2017/09/06 20:22:00.985963, 2] ../auth/gensec/spnego.c:768(gensec_spnego_server_negTokenTarg)
SPNEGO login failed: NT_STATUS_WRONG_PASSWORD
I have to find out what that NTLMv1 means.

(Edit) I checked in my PC using secpol.msc and the current setting of LAN manager authentification level is 'use NTLMv2 session security if negotiated'. If someone can make something out of that.

rlx 09-06-2017 07:53 PM

I think I have the solution to this problem. The following line needs to be added to smb.conf. I got that tip from this site.

Code:

ntlm auth = yes
I believe that line is needed with the current Slackware build of Samba. The line was not needed with the earlier version of Samba I used on my old partition.

Thank's to every one on this thread for contributing.

rlx 09-07-2017 08:42 AM

Additionally, the current build of Samba (or is it the newer version of Samba itself) breaks my symbolic links. Windows says "You do not have access to ..." where ... denotes the name of a symlinked directory. The symlink is within the tree of the path declared in smb.conf but is outside the user /home/user path.

Again that problem occurs only when I connect to my Samba running Linux PC from my windows7 tablet PC's. I don't have the problem when connecting from an Android phone.

So this is a Windows-Samba specific issue.

Quote:

[global]
workgroup = RLXNET
server string = pc3_ss
log file = /var/log/samba/log.%m
max log size = 50
security = user
follow symlinks = yes
wide links = yes
ntlm auth = yes
passdb backend = tdbsam
hosts allow = 192.168.1. 127.0.0.1
hosts deny = ALL
dns proxy = No
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
usershare allow guests = no
server signing = auto

[richard]
comment = Home
path = /
valid users = richard
force user = richard
force group = richard
read only = No
create mask = 0600
directory mask = 0700
(Edit) That problem is solved by adding the following line to the global section of smb.conf (above). At last I recovered the communication between Windows and Samba :-).
Quote:

unix extensions = no
Reference: Ubuntu + latest samba version, symlinks no longer work on share mounted in windows

toshko3 02-28-2019 03:34 PM

Thank you, adding "ntlm auth = yes" solved my problem with WinPE (based on Windows10) not connecting to samba server 4.7.6 with default settings in smb.conf.


All times are GMT -5. The time now is 05:07 AM.