Hi, Rowland, Thanks for your advise. I've been updated the version to 4.2.5, the rpm query is as below, but it still didn't work. [root at testcad16 samba]# rpm -qa | grep samba sernet-samba-4.2.5-19.el6.x86_64 sernet-samba-libs-4.2.5-19.el6.x86_64 sernet-samba-libsmbclient0-4.2.5-19.el6.x86_64 sernet-samba-client-4.2.5-19.el6.x86_64 sernet-samba-common-4.2.5-19.el6.x86_64 [root at testcad16 samba]# netstat -tulnp| grep mbd tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 27139/smbd tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 27139/smbd tcp 0 0 :::445 :::* LISTEN 27139/smbd tcp 0 0 :::139 :::* LISTEN 27139/smbd udp 0 0 172.26.87.255:137 0.0.0.0:* 27094/nmbd udp 0 0 172.26.85.211:137 0.0.0.0:* 27094/nmbd udp 0 0 0.0.0.0:137 0.0.0.0:* 27094/nmbd udp 0 0 172.26.87.255:138 0.0.0.0:* 27094/nmbd udp 0 0 172.26.85.211:138 0.0.0.0:* 27094/nmbd udp 0 0 0.0.0.0:138 0.0.0.0:* 27094/nmbd [root at testcad16 samba]# smbclient -d 3 -L //testcad16 lp_load_ex: refreshing parameters Initialising global parameters rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384) Processing section "[global]" added interface eth0 ip=172.26.85.211 bcast=172.26.87.255 netmask=255.255.248.0 Client started (version 4.2.5-SerNet-RedHat-19.el6). Enter root's password: Connecting to 172.26.85.211 at port 445 session setup failed: NT_STATUS_LOGON_FAILURE My smb.conf setting is as followed, # Global parameters [global] workgroup = TESTSMB server string = Samba Server Version %v netbios name = testcad16 security = USER passdb backend = tdbsam encrypt passwords = No client NTLMv2 auth = No client lanman auth = Yes client plaintext auth = Yes dns proxy = No idmap config * : backend = tdb hosts allow = 127. 172.26. cups options = raw [homes] comment = Home Directories read only = No browseable = No [printers] comment = All Printers path = /var/spool/samba printable = Yes print ok = Yes browseable = No 2015-11-03 22:54 GMT+08:00 Rowland Penny <rowlandpenny241155 at gmail.com>:> On 03/11/15 14:08, Roger Wu wrote: > >> Hi, >> >> I installed samba 4.0.0rc4 with CentOS 6.7. >> I'm now trying to setup samba server using NIS authentication and access >> from Windows 7, >> but I hit one question I don't know how to deal with. >> After starting service, I tried the following command, but got an error >> message >> >> [root at testcad16 samba]# smbclient -L //testcad16 >> Enter root's password: >> session setup failed: NT_STATUS_LOGON_FAILURE >> >> I looked into log.nmbd and log.smbd, the following messages were showed up >> as below, >> >> [root at testcad16 samba]# tail -20 log.nmbd >> [2015/11/03 10:04:48, 0] ../source3/nmbd/nmbd.c:883(main) >> nmbd version 4.0.0rc4 started. >> Copyright Andrew Tridgell and the Samba Team 1992-2012 >> [2015/11/03 10:04:48, 0] ../source3/nmbd/nmbd.c:922(main) >> standard input is not a socket, assuming -D option >> >> [root at testcad16 samba]# tail -20 log.smbd >> [2015/11/03 10:04:44, 0] ../source3/smbd/server.c:1200(main) >> smbd version 4.0.0rc4 started. >> Copyright Andrew Tridgell and the Samba Team 1992-2012 >> [2015/11/03 10:04:44.577027, 0] ../source3/smbd/server.c:1280(main) >> standard input is not a socket, assuming -D option >> >> Then I gave the following command, but I had no idea how to debug. >> >> [root at testcad16 samba]# smbclient -d3 -L //testcad16 >> lp_load_ex: refreshing parameters >> Initialising global parameters >> rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384) >> params.c:pm_process() - Processing configuration file >> "/etc/samba/smb.conf" >> Processing section "[global]" >> added interface eth0 ip=fe80::20c:29ff:fe2a:2d99%eth0 >> bcast=fe80::ffff:ffff:ffff:ffff%eth0 netmask=ffff:ffff:ffff:ffff:: >> added interface eth0 ip=172.26.85.211 bcast=172.26.87.255 >> netmask=255.255.248.0 >> Client started (version 4.0.0rc4). >> Enter root's password: >> Connecting to 172.26.85.211 at port 445 >> session setup failed: NT_STATUS_LOGON_FAILURE >> >> My smb.conf setting is as below, >> [global] >> workgroup = TESTSMB >> server string = Samba Server Version %v >> netbios name = testcad16 >> encrypt passwords = No >> client NTLMv2 auth = No >> client lanman auth = Yes >> client plaintext auth = Yes >> security = user >> passdb backend = tdbsam >> dns proxy = No >> idmap config * : backend = tdb >> hosts allow = 127., 172.26. >> cups options = raw >> >> [homes] >> comment = Home Directories >> read only = No >> browseable = No >> >> [printers] >> comment = All Printers >> path = /var/spool/samba >> printable = Yes >> print ok = Yes >> browseable = No >> >> For more information, >> >> [root at testcad16 samba]# rpm -qa | grep samba >> samba4-4.0.0-66.el6_6.rc4.x86_64 >> samba4-libs-4.0.0-66.el6_6.rc4.x86_64 >> samba4-winbind-4.0.0-66.el6_6.rc4.x86_64 >> samba4-client-4.0.0-66.el6_6.rc4.x86_64 >> samba4-common-4.0.0-66.el6_6.rc4.x86_64 >> >> [root at testcad16 samba]# netstat -tulnp | grep mbd >> tcp 0 0 0.0.0.0:445 0.0.0.0:* >> LISTEN 19363/smbd >> tcp 0 0 0.0.0.0:139 0.0.0.0:* >> LISTEN 19363/smbd >> tcp 0 0 :::445 :::* >> LISTEN 19363/smbd >> tcp 0 0 :::139 :::* >> LISTEN 19363/smbd >> udp 0 0 172.26.87.255:137 0.0.0.0:* >> 19382/nmbd >> udp 0 0 172.26.85.211:137 0.0.0.0:* >> 19382/nmbd >> udp 0 0 0.0.0.0:137 0.0.0.0:* >> 19382/nmbd >> udp 0 0 172.26.87.255:138 0.0.0.0:* >> 19382/nmbd >> udp 0 0 172.26.85.211:138 0.0.0.0:* >> 19382/nmbd >> udp 0 0 0.0.0.0:138 0.0.0.0:* >> 19382/nmbd >> >> >> Regards, >> > > Is there any way you can use a later version of samba ? i.e. by using the > Sernet packages: > > https://portal.enterprisesamba.com/ > > Version 4.0.x is EOL and a later version may contain the fix for your > problem. > > Rowland > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba >
mathias dufresne
2015-Nov-04 08:49 UTC
[Samba] session setup failed: NT_STATUS_LOGON_FAILURE
Hi, Samba always comes with its own users database. When you have AD, that's clear enough, AD purpose is often to get a users database. When using Samba in a different way, as there with "security = user" you have to fill Samba database and then to use Samba accounts to connect to your shares. [root at testcad16 samba]# smbpasswd -a toto New SMB password: Retype new SMB password: Then: smbclient -d 3 -L //testcad16 -U toto 2015-11-04 7:24 GMT+01:00 Roger Wu <wu1004 at gmail.com>:> Hi, Rowland, > > Thanks for your advise. I've been updated the version to 4.2.5, the rpm > query is as below, > but it still didn't work. > > [root at testcad16 samba]# rpm -qa | grep samba > sernet-samba-4.2.5-19.el6.x86_64 > sernet-samba-libs-4.2.5-19.el6.x86_64 > sernet-samba-libsmbclient0-4.2.5-19.el6.x86_64 > sernet-samba-client-4.2.5-19.el6.x86_64 > sernet-samba-common-4.2.5-19.el6.x86_64 > > [root at testcad16 samba]# netstat -tulnp| grep mbd > tcp 0 0 0.0.0.0:445 0.0.0.0:* > LISTEN 27139/smbd > tcp 0 0 0.0.0.0:139 0.0.0.0:* > LISTEN 27139/smbd > tcp 0 0 :::445 :::* > LISTEN 27139/smbd > tcp 0 0 :::139 :::* > LISTEN 27139/smbd > udp 0 0 172.26.87.255:137 0.0.0.0:* > 27094/nmbd > udp 0 0 172.26.85.211:137 0.0.0.0:* > 27094/nmbd > udp 0 0 0.0.0.0:137 0.0.0.0:* > 27094/nmbd > udp 0 0 172.26.87.255:138 0.0.0.0:* > 27094/nmbd > udp 0 0 172.26.85.211:138 0.0.0.0:* > 27094/nmbd > udp 0 0 0.0.0.0:138 0.0.0.0:* > 27094/nmbd > > [root at testcad16 samba]# smbclient -d 3 -L //testcad16 > lp_load_ex: refreshing parameters > Initialising global parameters > rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384) > Processing section "[global]" > added interface eth0 ip=172.26.85.211 bcast=172.26.87.255 > netmask=255.255.248.0 > Client started (version 4.2.5-SerNet-RedHat-19.el6). > Enter root's password: > Connecting to 172.26.85.211 at port 445 > session setup failed: NT_STATUS_LOGON_FAILURE > > My smb.conf setting is as followed, > > # Global parameters > [global] > workgroup = TESTSMB > server string = Samba Server Version %v > netbios name = testcad16 > security = USER > passdb backend = tdbsam > encrypt passwords = No > client NTLMv2 auth = No > client lanman auth = Yes > client plaintext auth = Yes > dns proxy = No > idmap config * : backend = tdb > hosts allow = 127. 172.26. > cups options = raw > > > [homes] > comment = Home Directories > read only = No > browseable = No > > > [printers] > comment = All Printers > path = /var/spool/samba > printable = Yes > print ok = Yes > browseable = No > > > > 2015-11-03 22:54 GMT+08:00 Rowland Penny <rowlandpenny241155 at gmail.com>: > > > On 03/11/15 14:08, Roger Wu wrote: > > > >> Hi, > >> > >> I installed samba 4.0.0rc4 with CentOS 6.7. > >> I'm now trying to setup samba server using NIS authentication and access > >> from Windows 7, > >> but I hit one question I don't know how to deal with. > >> After starting service, I tried the following command, but got an error > >> message > >> > >> [root at testcad16 samba]# smbclient -L //testcad16 > >> Enter root's password: > >> session setup failed: NT_STATUS_LOGON_FAILURE > >> > >> I looked into log.nmbd and log.smbd, the following messages were showed > up > >> as below, > >> > >> [root at testcad16 samba]# tail -20 log.nmbd > >> [2015/11/03 10:04:48, 0] ../source3/nmbd/nmbd.c:883(main) > >> nmbd version 4.0.0rc4 started. > >> Copyright Andrew Tridgell and the Samba Team 1992-2012 > >> [2015/11/03 10:04:48, 0] ../source3/nmbd/nmbd.c:922(main) > >> standard input is not a socket, assuming -D option > >> > >> [root at testcad16 samba]# tail -20 log.smbd > >> [2015/11/03 10:04:44, 0] ../source3/smbd/server.c:1200(main) > >> smbd version 4.0.0rc4 started. > >> Copyright Andrew Tridgell and the Samba Team 1992-2012 > >> [2015/11/03 10:04:44.577027, 0] ../source3/smbd/server.c:1280(main) > >> standard input is not a socket, assuming -D option > >> > >> Then I gave the following command, but I had no idea how to debug. > >> > >> [root at testcad16 samba]# smbclient -d3 -L //testcad16 > >> lp_load_ex: refreshing parameters > >> Initialising global parameters > >> rlimit_max: increasing rlimit_max (1024) to minimum Windows limit > (16384) > >> params.c:pm_process() - Processing configuration file > >> "/etc/samba/smb.conf" > >> Processing section "[global]" > >> added interface eth0 ip=fe80::20c:29ff:fe2a:2d99%eth0 > >> bcast=fe80::ffff:ffff:ffff:ffff%eth0 netmask=ffff:ffff:ffff:ffff:: > >> added interface eth0 ip=172.26.85.211 bcast=172.26.87.255 > >> netmask=255.255.248.0 > >> Client started (version 4.0.0rc4). > >> Enter root's password: > >> Connecting to 172.26.85.211 at port 445 > >> session setup failed: NT_STATUS_LOGON_FAILURE > >> > >> My smb.conf setting is as below, > >> [global] > >> workgroup = TESTSMB > >> server string = Samba Server Version %v > >> netbios name = testcad16 > >> encrypt passwords = No > >> client NTLMv2 auth = No > >> client lanman auth = Yes > >> client plaintext auth = Yes > >> security = user > >> passdb backend = tdbsam > >> dns proxy = No > >> idmap config * : backend = tdb > >> hosts allow = 127., 172.26. > >> cups options = raw > >> > >> [homes] > >> comment = Home Directories > >> read only = No > >> browseable = No > >> > >> [printers] > >> comment = All Printers > >> path = /var/spool/samba > >> printable = Yes > >> print ok = Yes > >> browseable = No > >> > >> For more information, > >> > >> [root at testcad16 samba]# rpm -qa | grep samba > >> samba4-4.0.0-66.el6_6.rc4.x86_64 > >> samba4-libs-4.0.0-66.el6_6.rc4.x86_64 > >> samba4-winbind-4.0.0-66.el6_6.rc4.x86_64 > >> samba4-client-4.0.0-66.el6_6.rc4.x86_64 > >> samba4-common-4.0.0-66.el6_6.rc4.x86_64 > >> > >> [root at testcad16 samba]# netstat -tulnp | grep mbd > >> tcp 0 0 0.0.0.0:445 0.0.0.0:* > >> LISTEN 19363/smbd > >> tcp 0 0 0.0.0.0:139 0.0.0.0:* > >> LISTEN 19363/smbd > >> tcp 0 0 :::445 :::* > >> LISTEN 19363/smbd > >> tcp 0 0 :::139 :::* > >> LISTEN 19363/smbd > >> udp 0 0 172.26.87.255:137 0.0.0.0:* > >> 19382/nmbd > >> udp 0 0 172.26.85.211:137 0.0.0.0:* > >> 19382/nmbd > >> udp 0 0 0.0.0.0:137 0.0.0.0:* > >> 19382/nmbd > >> udp 0 0 172.26.87.255:138 0.0.0.0:* > >> 19382/nmbd > >> udp 0 0 172.26.85.211:138 0.0.0.0:* > >> 19382/nmbd > >> udp 0 0 0.0.0.0:138 0.0.0.0:* > >> 19382/nmbd > >> > >> > >> Regards, > >> > > > > Is there any way you can use a later version of samba ? i.e. by using the > > Sernet packages: > > > > https://portal.enterprisesamba.com/ > > > > Version 4.0.x is EOL and a later version may contain the fix for your > > problem. > > > > Rowland > > > > > > -- > > To unsubscribe from this list go to the following URL and read the > > instructions: https://lists.samba.org/mailman/options/samba > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba >
On 04/11/15 06:24, Roger Wu wrote:> Hi, Rowland, > > Thanks for your advise. I've been updated the version to 4.2.5, the > rpm query is as below, > but it still didn't work. > > [root at testcad16 samba]# rpm -qa | grep samba > sernet-samba-4.2.5-19.el6.x86_64 > sernet-samba-libs-4.2.5-19.el6.x86_64 > sernet-samba-libsmbclient0-4.2.5-19.el6.x86_64 > sernet-samba-client-4.2.5-19.el6.x86_64 > sernet-samba-common-4.2.5-19.el6.x86_64 > > [root at testcad16 samba]# netstat -tulnp| grep mbd > tcp 0 0 0.0.0.0:445 <http://0.0.0.0:445> 0.0.0.0:* > LISTEN 27139/smbd > tcp 0 0 0.0.0.0:139 <http://0.0.0.0:139> 0.0.0.0:* > LISTEN 27139/smbd > tcp 0 0 :::445 :::* > LISTEN 27139/smbd > tcp 0 0 :::139 :::* > LISTEN 27139/smbd > udp 0 0 172.26.87.255:137 <http://172.26.87.255:137> > 0.0.0.0:* 27094/nmbd > udp 0 0 172.26.85.211:137 <http://172.26.85.211:137> > 0.0.0.0:* 27094/nmbd > udp 0 0 0.0.0.0:137 <http://0.0.0.0:137> 0.0.0.0:* > 27094/nmbd > udp 0 0 172.26.87.255:138 <http://172.26.87.255:138> > 0.0.0.0:* 27094/nmbd > udp 0 0 172.26.85.211:138 <http://172.26.85.211:138> > 0.0.0.0:* 27094/nmbd > udp 0 0 0.0.0.0:138 <http://0.0.0.0:138> 0.0.0.0:* > 27094/nmbd > > [root at testcad16 samba]# smbclient -d 3 -L //testcad16 > lp_load_ex: refreshing parameters > Initialising global parameters > rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384) > Processing section "[global]" > added interface eth0 ip=172.26.85.211 bcast=172.26.87.255 > netmask=255.255.248.0 > Client started (version 4.2.5-SerNet-RedHat-19.el6). > Enter root's password: > Connecting to 172.26.85.211 at port 445 > session setup failed: NT_STATUS_LOGON_FAILURE > My smb.conf setting is as followed, > > # Global parameters > [global] > workgroup = TESTSMB > server string = Samba Server Version %v > netbios name = testcad16 > security = USER > passdb backend = tdbsam > encrypt passwords = No > client NTLMv2 auth = No > client lanman auth = Yes > client plaintext auth = Yes > dns proxy = No > idmap config * : backend = tdb > hosts allow = 127. 172.26. > cups options = raw > > > [homes] > comment = Home Directories > read only = No > browseable = No > > > [printers] > comment = All Printers > path = /var/spool/samba > printable = Yes > print ok = Yes > browseable = No > > >OK, you seem to be trying to set up a standalone server, you do realise that you will need to create your users on this as well as on the windows machines. You might as well remove these lines, they are the defaults: security = USER passdb backend = tdbsam You might as well remove this line, it isn't needed on a standalone server: idmap config * : backend = tdb and you don't need to run the winbindd deamon. You really should remove these lines, you are trying to make windows do something with passwords it really doesn't want to do: encrypt passwords = No client NTLMv2 auth = No client lanman auth = Yes client plaintext auth = Yes Rowland
2015-11-04 17:11 GMT+08:00 Rowland Penny <rowlandpenny241155 at gmail.com>:> On 04/11/15 06:24, Roger Wu wrote: > >> Hi, Rowland, >> >> Thanks for your advise. I've been updated the version to 4.2.5, the rpm >> query is as below, >> but it still didn't work. >> >> [root at testcad16 samba]# rpm -qa | grep samba >> sernet-samba-4.2.5-19.el6.x86_64 >> sernet-samba-libs-4.2.5-19.el6.x86_64 >> sernet-samba-libsmbclient0-4.2.5-19.el6.x86_64 >> sernet-samba-client-4.2.5-19.el6.x86_64 >> sernet-samba-common-4.2.5-19.el6.x86_64 >> >> [root at testcad16 samba]# netstat -tulnp| grep mbd >> tcp 0 0 0.0.0.0:445 <http://0.0.0.0:445> 0.0.0.0:* >> LISTEN 27139/smbd >> tcp 0 0 0.0.0.0:139 <http://0.0.0.0:139> 0.0.0.0:* >> LISTEN 27139/smbd >> tcp 0 0 :::445 :::* >> LISTEN 27139/smbd >> tcp 0 0 :::139 :::* >> LISTEN 27139/smbd >> udp 0 0 172.26.87.255:137 <http://172.26.87.255:137> >> 0.0.0.0:* 27094/nmbd >> udp 0 0 172.26.85.211:137 <http://172.26.85.211:137> >> 0.0.0.0:* 27094/nmbd >> udp 0 0 0.0.0.0:137 <http://0.0.0.0:137> 0.0.0.0:* >> 27094/nmbd >> udp 0 0 172.26.87.255:138 <http://172.26.87.255:138> >> 0.0.0.0:* 27094/nmbd >> udp 0 0 172.26.85.211:138 <http://172.26.85.211:138> >> 0.0.0.0:* 27094/nmbd >> udp 0 0 0.0.0.0:138 <http://0.0.0.0:138> 0.0.0.0:* >> 27094/nmbd >> >> >> [root at testcad16 samba]# smbclient -d 3 -L //testcad16 >> lp_load_ex: refreshing parameters >> Initialising global parameters >> rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384) >> Processing section "[global]" >> added interface eth0 ip=172.26.85.211 bcast=172.26.87.255 >> netmask=255.255.248.0 >> Client started (version 4.2.5-SerNet-RedHat-19.el6). >> Enter root's password: >> Connecting to 172.26.85.211 at port 445 >> session setup failed: NT_STATUS_LOGON_FAILURE >> My smb.conf setting is as followed, >> >> # Global parameters >> [global] >> workgroup = TESTSMB >> server string = Samba Server Version %v >> netbios name = testcad16 >> security = USER >> passdb backend = tdbsam >> encrypt passwords = No >> client NTLMv2 auth = No >> client lanman auth = Yes >> client plaintext auth = Yes >> dns proxy = No >> idmap config * : backend = tdb >> hosts allow = 127. 172.26. >> cups options = raw >> >> >> [homes] >> comment = Home Directories >> read only = No >> browseable = No >> >> >> [printers] >> comment = All Printers >> path = /var/spool/samba >> printable = Yes >> print ok = Yes >> browseable = No >> >> >> >> > OK, you seem to be trying to set up a standalone server, you do realise > that you will need to create your users on this as well as on the windows > machines. >yes, but I hope samba can use NIS authentication instead of using it's own database. Do I need to use smbpasswd to create user accounts again? It's against what I need...> > You might as well remove these lines, they are the defaults: > > security = USER > passdb backend = tdbsam >Don't I need to set the security level?> > You might as well remove this line, it isn't needed on a standalone server: > > idmap config * : backend = tdb >I didn't set these parameters. They are reported by testparm command. Where can I remove that?> > and you don't need to run the winbindd deamon. > > You really should remove these lines, you are trying to make windows do > something with passwords it really doesn't want to do: > > encrypt passwords = No > client NTLMv2 auth = No > client lanman auth = Yes > client plaintext auth = Yes > > Rowland >I searched some articles on the internet said I need to set above lines for the samba server and plaintextpasswords = 1 for windows due to different encrypted methods between windows and workstation. I added those lines and It seems worked for samba old version (3.6.23) . How come it wind up irrelevant for 4.2.5 version? Don't I need to set anything for this issue? I've been removed most of these lines you suggested, which means I nearly set nothing. but it still didn't work and I got the same message. [root at testcad16 samba]# smbclient -L //testcad16 Enter root's password: session setup failed: NT_STATUS_LOGON_FAILURE Here is my smb.conf setting. [root at testcad16 samba]# testparm Load smb config files from /etc/samba/smb.conf rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384) Processing section "[homes]" Processing section "[printers]" Loaded services file OK. Server role: ROLE_STANDALONE Press enter to see a dump of your service definitions # Global parameters [global] workgroup = SMBTEST server string = Samba Server Version %v idmap config * : backend = tdb hosts allow = 127. 172.26. cups options = raw [homes] comment = Home Directories read only = No browseable = No [printers] comment = All Printers path = /var/spool/samba printable = Yes print ok = Yes browseable = No Regards, Roger>> -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba >