Prev: [Samba] NTLMv2 in Sun's 'official' Samba 3.0.37?
Next: FW: tree connect failed: NT_STATUS_BAD_NETWORK_NAME
From: Michael Adam on 28 Dec 2009 05:10 Hi Dominic, Dominic Gamble wrote: > Hi, > > I can't get access to any shares when running "smbclient //DUCK/test -U > Dominic". I'm getting the message: > tree connect failed: NT_STATUS_BAD_NETWORK_NAME > > I'm pretty sure it's authenticating properly as it says "session setup ok" > in the debug output. If I enter the wrong password I get: > "session setup failed: NT_STATUS_LOGON_FAILURE" This is correct. > I'm running CentOS 5.4 with the following samba packages > > samba-common-3.0.33-3.15.el5_4.1 > samba-3.0.33-3.15.el5_4.1 > samba-swat-3.0.33-3.15.el5_4.1 > samba-client-3.0.33-3.15.el5_4.1 > > My samba setup uses LDAP for authentication. All logging seems to indicate > that authentication and LDAP is working well. > > My /etc/samba/smb.conf was generated with SWAT and has the following shares: > > [tmp] > comment = temporary files > path = /tmp > hosts allow = > hosts deny = > > [test] > comment = test files > path = /test > hosts allow = > hosts deny = > > > Both shares contain a file called myfile.txt. > > When I connect to the "tmp" share, I don't get the "tree connect failed: > NT_STATUS_BAD_NETWORK_NAME", but I can't list any files: > > [root(a)duck cache]# smbclient //DUCK/tmp -U dominic > Password: > Domain=[ORANDA] OS=[Unix] Server=[Samba 3.0.33-3.15.el5_4.1] > smb: \> ls > . D 0 Mon Dec 28 04:02:13 2009 > .. D 0 Sun Dec 27 21:16:53 2009 > > 36224 blocks of size 8388608. 34082 blocks available > smb: \> > > When I connect to the "test" share I get the "tree connect failed: > NT_STATUS_BAD_NETWORK_NAME": > [root(a)duck cache]# smbclient //DUCK/test -U dominic > Password: > Domain=[ORANDA] OS=[Unix] Server=[Samba 3.0.33-3.15.el5_4.1] > tree connect failed: NT_STATUS_BAD_NETWORK_NAME > > The permissions on the /tmp and /test folders are the same: > > drwxrwxrwt 2 root root 4096 Dec 27 21:35 test > drwxrwxrwt 4 root root 4096 Dec 28 04:02 tmp > > There are no complex acls on them either: > > [root(a)duck /]# getfacl tmp > # file: tmp > # owner: root > # group: root > user::rwx > group::rwx > other::rwx > > [root(a)duck /]# getfacl test > # file: test > # owner: root > # group: root > user::rwx > group::rwx > other::rwx > > I've tried getting more debug info by setting log levels to 10 in both > smb.conf and using the -d10 parameter on the command line, but it gives me > nothing useful in the logs or in the output. > > I've been through 'The Samba Checklist' > (http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/diagnosis.html) > and had no other problems. > > Here is the rest of my smb.conf: > > [global] > workgroup = ORANDA > server string = Duck > passdb backend = ldapsam:ldap://localhost/ > pam password change = Yes > passwd program = /usr/sbin/smbldap-passwd %u > passwd chat = *New*password* %n\n *Retype*new*password* %n\n > *all*authentication*tokens*updated* > unix password sync = Yes > log level = 10 > log file = /var/log/samba/log.%m > load printers = No > printcap name = /dev/null > disable spoolss = Yes > add user script = /usr/sbin/smbldap-useradd -m "%u" > delete user script = /usr/sbin/smbldap-userdel "%u" > add group script = /usr/sbin/smbldap-groupadd -p "%g" > delete group script = /usr/sbin/smbldap-groupdel "%g" > add user to group script = /usr/sbin/smbldap-groupmod -m "%u" "%g" > delete user from group script = /usr/sbin/smbldap-groupmod -x "%u" > "%g" > set primary group script = /usr/sbin/smbldap-usermod -g "%g" "%u" > add machine script = /usr/sbin/smbldap-useradd -w "%u" > logon script = login.cmd > logon path = \\%N\profiles\%U > logon drive = H: > domain logons = Yes > os level = 127 > wins support = Yes > ldap admin dn = cn=admin,dc=oranda,dc=internal > ldap delete dn = Yes > ldap group suffix = ou=Group > ldap idmap suffix = ou=Idmap > ldap machine suffix = ou=Computers > ldap passwd sync = Yes > ldap suffix = dc=oranda,dc=internal > ldap user suffix = ou=People > panic action = /usr/share/samba/panic-action %d > admin users = dominic > hosts allow = 192.168.10., 127. > hosts deny = ALL > printing = bsd > print command = lpr -r -P'%p' %s > lpq command = lpq -P'%p' > lprm command = lprm -P'%p' %j > use client driver = Yes > > This has had me stumped for 3 days straight now and I don't know what else I > can try. Samba just isn't giving me any more clues. > > I've found lots of other posts like mine through google with no replies to > them. Does anyone have any ideas of what to do next? > > I would greatly appreciate if someone could point me in the right direction. This is strange. There should be some logging around such a BAD_NETWORK_NAME. So could you please do the following? * stop samba services (smbd, nmbd, winbindd) * remove (or comment out) the line "log file = /var/log/samba/log.%m" from your smb.conf * leave the log level at 10 globally * remove the log files under /var/log/samba * start samba services * do the failing connect to the share "test" * post /var/log/samba/log.smbd here Cheers - Michael
From: Rob Townley on 28 Dec 2009 12:50 On Mon, Dec 28, 2009 at 4:03 AM, Michael Adam <obnox(a)samba.org> wrote: > Hi Dominic, > > Dominic Gamble wrote: >> Hi, >> >> I can't get access to any shares when running "smbclient //DUCK/test -U >> Dominic". I'm getting the message: >> tree connect failed: NT_STATUS_BAD_NETWORK_NAME >> >> I'm pretty sure it's authenticating properly as it says "session setup ok" >> in the debug output. If I enter the wrong password I get: >> "session setup failed: NT_STATUS_LOGON_FAILURE" > > This is correct. Starting from a fresh boot up, try to use the /test share first, does it work? Does /tmp then fail? If so, look under /var/cache/samba/ i don't remember exactly what i came across the NT_STATUS_BAD_NETWORK_NAME error on CentOS 5.4 and what i did to fix it, but do remember it wasn't what i expected. > >> I'm running CentOS 5.4 with the following samba packages >> >> samba-common-3.0.33-3.15.el5_4.1 >> samba-3.0.33-3.15.el5_4.1 >> samba-swat-3.0.33-3.15.el5_4.1 >> samba-client-3.0.33-3.15.el5_4.1 >> >> My samba setup uses LDAP for authentication. All logging seems to indicate >> that authentication and LDAP is working well. >> >> My /etc/samba/smb.conf was generated with SWAT and has the following shares: >> >> [tmp] >> comment = temporary files >> path = /tmp >> hosts allow = >> hosts deny = >> >> [test] >> comment = test files >> path = /test >> hosts allow = >> hosts deny = >> >> >> Both shares contain a file called myfile.txt. >> >> When I connect to the "tmp" share, I don't get the "tree connect failed: >> NT_STATUS_BAD_NETWORK_NAME", but I can't list any files: >> >> [root(a)duck cache]# smbclient //DUCK/tmp -U dominic >> Password: >> Domain=[ORANDA] OS=[Unix] Server=[Samba 3.0.33-3.15.el5_4.1] >> smb: \> ls >> . D 0 Mon Dec 28 04:02:13 2009 >> .. D 0 Sun Dec 27 21:16:53 2009 >> >> 36224 blocks of size 8388608. 34082 blocks available >> smb: \> >> >> When I connect to the "test" share I get the "tree connect failed: >> NT_STATUS_BAD_NETWORK_NAME": >> [root(a)duck cache]# smbclient //DUCK/test -U dominic >> Password: >> Domain=[ORANDA] OS=[Unix] Server=[Samba 3.0.33-3.15.el5_4.1] >> tree connect failed: NT_STATUS_BAD_NETWORK_NAME >> >> The permissions on the /tmp and /test folders are the same: >> >> drwxrwxrwt 2 root root 4096 Dec 27 21:35 test >> drwxrwxrwt 4 root root 4096 Dec 28 04:02 tmp >> >> There are no complex acls on them either: >> >> [root(a)duck /]# getfacl tmp >> # file: tmp >> # owner: root >> # group: root >> user::rwx >> group::rwx >> other::rwx >> >> [root(a)duck /]# getfacl test >> # file: test >> # owner: root >> # group: root >> user::rwx >> group::rwx >> other::rwx >> >> I've tried getting more debug info by setting log levels to 10 in both >> smb.conf and using the -d10 parameter on the command line, but it gives me >> nothing useful in the logs or in the output. >> >> I've been through 'The Samba Checklist' >> (http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/diagnosis.html) >> and had no other problems. >> >> Here is the rest of my smb.conf: >> >> [global] >> workgroup = ORANDA >> server string = Duck >> passdb backend = ldapsam:ldap://localhost/ >> pam password change = Yes >> passwd program = /usr/sbin/smbldap-passwd %u >> passwd chat = *New*password* %n\n *Retype*new*password* %n\n >> *all*authentication*tokens*updated* >> unix password sync = Yes >> log level = 10 >> log file = /var/log/samba/log.%m >> load printers = No >> printcap name = /dev/null >> disable spoolss = Yes >> add user script = /usr/sbin/smbldap-useradd -m "%u" >> delete user script = /usr/sbin/smbldap-userdel "%u" >> add group script = /usr/sbin/smbldap-groupadd -p "%g" >> delete group script = /usr/sbin/smbldap-groupdel "%g" >> add user to group script = /usr/sbin/smbldap-groupmod -m "%u" "%g" >> delete user from group script = /usr/sbin/smbldap-groupmod -x "%u" >> "%g" >> set primary group script = /usr/sbin/smbldap-usermod -g "%g" "%u" >> add machine script = /usr/sbin/smbldap-useradd -w "%u" >> logon script = login.cmd >> logon path = \\%N\profiles\%U >> logon drive = H: >> domain logons = Yes >> os level = 127 >> wins support = Yes >> ldap admin dn = cn=admin,dc=oranda,dc=internal >> ldap delete dn = Yes >> ldap group suffix = ou=Group >> ldap idmap suffix = ou=Idmap >> ldap machine suffix = ou=Computers >> ldap passwd sync = Yes >> ldap suffix = dc=oranda,dc=internal >> ldap user suffix = ou=People >> panic action = /usr/share/samba/panic-action %d >> admin users = dominic >> hosts allow = 192.168.10., 127. >> hosts deny = ALL >> printing = bsd >> print command = lpr -r -P'%p' %s >> lpq command = lpq -P'%p' >> lprm command = lprm -P'%p' %j >> use client driver = Yes >> >> This has had me stumped for 3 days straight now and I don't know what else I >> can try. Samba just isn't giving me any more clues. >> >> I've found lots of other posts like mine through google with no replies to >> them. Does anyone have any ideas of what to do next? >> >> I would greatly appreciate if someone could point me in the right direction. > > This is strange. > > There should be some logging around such a BAD_NETWORK_NAME. > So could you please do the following? > > * stop samba services (smbd, nmbd, winbindd) > * remove (or comment out) the line "log file = /var/log/samba/log.%m" > from your smb.conf > * leave the log level at 10 globally > * remove the log files under /var/log/samba > * start samba services > * do the failing connect to the share "test" > * post /var/log/samba/log.smbd here > > Cheers - Michael > > > -- > 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
From: Dominic Gamble on 28 Dec 2009 19:50
Hi Rob, After a reboot, everything works (both the /test share and the /tmp share, and it now shows the files in them). It doesn't make any sense, but THANK YOU! I used chkconfig to ensure that both smb and ldap started at runlevels 3 and 5, and then rebooted. I don't know how many times I restarted smb and slapd, and I don't quite understand why a full reboot was required, but there you go! Best regards, Dominic. -----Original Message----- From: samba-bounces(a)lists.samba.org [mailto:samba-bounces(a)lists.samba.org] On Behalf Of Rob Townley Sent: Tuesday, 29 December 2009 4:45 AM To: samba(a)lists.samba.org Subject: Re: [Samba] tree connect failed: NT_STATUS_BAD_NETWORK_NAME On Mon, Dec 28, 2009 at 4:03 AM, Michael Adam <obnox(a)samba.org> wrote: > Hi Dominic, > > Dominic Gamble wrote: >> Hi, >> >> I can't get access to any shares when running "smbclient //DUCK/test -U >> Dominic". I'm getting the message: >> tree connect failed: NT_STATUS_BAD_NETWORK_NAME >> >> I'm pretty sure it's authenticating properly as it says "session setup ok" >> in the debug output. If I enter the wrong password I get: >> "session setup failed: NT_STATUS_LOGON_FAILURE" > > This is correct. Starting from a fresh boot up, try to use the /test share first, does it work? Does /tmp then fail? If so, look under /var/cache/samba/ i don't remember exactly what i came across the NT_STATUS_BAD_NETWORK_NAME error on CentOS 5.4 and what i did to fix it, but do remember it wasn't what i expected. > >> I'm running CentOS 5.4 with the following samba packages >> >> samba-common-3.0.33-3.15.el5_4.1 >> samba-3.0.33-3.15.el5_4.1 >> samba-swat-3.0.33-3.15.el5_4.1 >> samba-client-3.0.33-3.15.el5_4.1 >> >> My samba setup uses LDAP for authentication. All logging seems to indicate >> that authentication and LDAP is working well. >> >> My /etc/samba/smb.conf was generated with SWAT and has the following shares: >> >> [tmp] >> comment = temporary files >> path = /tmp >> hosts allow = >> hosts deny = >> >> [test] >> comment = test files >> path = /test >> hosts allow = >> hosts deny = >> >> >> Both shares contain a file called myfile.txt. >> >> When I connect to the "tmp" share, I don't get the "tree connect failed: >> NT_STATUS_BAD_NETWORK_NAME", but I can't list any files: >> >> [root(a)duck cache]# smbclient //DUCK/tmp -U dominic >> Password: >> Domain=[ORANDA] OS=[Unix] Server=[Samba 3.0.33-3.15.el5_4.1] >> smb: \> ls >> . D 0 Mon Dec 28 04:02:13 2009 >> .. D 0 Sun Dec 27 21:16:53 2009 >> >> 36224 blocks of size 8388608. 34082 blocks available >> smb: \> >> >> When I connect to the "test" share I get the "tree connect failed: >> NT_STATUS_BAD_NETWORK_NAME": >> [root(a)duck cache]# smbclient //DUCK/test -U dominic >> Password: >> Domain=[ORANDA] OS=[Unix] Server=[Samba 3.0.33-3.15.el5_4.1] >> tree connect failed: NT_STATUS_BAD_NETWORK_NAME >> >> The permissions on the /tmp and /test folders are the same: >> >> drwxrwxrwt 2 root root 4096 Dec 27 21:35 test >> drwxrwxrwt 4 root root 4096 Dec 28 04:02 tmp >> >> There are no complex acls on them either: >> >> [root(a)duck /]# getfacl tmp >> # file: tmp >> # owner: root >> # group: root >> user::rwx >> group::rwx >> other::rwx >> >> [root(a)duck /]# getfacl test >> # file: test >> # owner: root >> # group: root >> user::rwx >> group::rwx >> other::rwx >> >> I've tried getting more debug info by setting log levels to 10 in both >> smb.conf and using the -d10 parameter on the command line, but it gives me >> nothing useful in the logs or in the output. >> >> I've been through 'The Samba Checklist' >> (http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/diagnosis.html) >> and had no other problems. >> >> Here is the rest of my smb.conf: >> >> [global] >> workgroup = ORANDA >> server string = Duck >> passdb backend = ldapsam:ldap://localhost/ >> pam password change = Yes >> passwd program = /usr/sbin/smbldap-passwd %u >> passwd chat = *New*password* %n\n *Retype*new*password* %n\n >> *all*authentication*tokens*updated* >> unix password sync = Yes >> log level = 10 >> log file = /var/log/samba/log.%m >> load printers = No >> printcap name = /dev/null >> disable spoolss = Yes >> add user script = /usr/sbin/smbldap-useradd -m "%u" >> delete user script = /usr/sbin/smbldap-userdel "%u" >> add group script = /usr/sbin/smbldap-groupadd -p "%g" >> delete group script = /usr/sbin/smbldap-groupdel "%g" >> add user to group script = /usr/sbin/smbldap-groupmod -m "%u" "%g" >> delete user from group script = /usr/sbin/smbldap-groupmod -x "%u" >> "%g" >> set primary group script = /usr/sbin/smbldap-usermod -g "%g" "%u" >> add machine script = /usr/sbin/smbldap-useradd -w "%u" >> logon script = login.cmd >> logon path = \\%N\profiles\%U >> logon drive = H: >> domain logons = Yes >> os level = 127 >> wins support = Yes >> ldap admin dn = cn=admin,dc=oranda,dc=internal >> ldap delete dn = Yes >> ldap group suffix = ou=Group >> ldap idmap suffix = ou=Idmap >> ldap machine suffix = ou=Computers >> ldap passwd sync = Yes >> ldap suffix = dc=oranda,dc=internal >> ldap user suffix = ou=People >> panic action = /usr/share/samba/panic-action %d >> admin users = dominic >> hosts allow = 192.168.10., 127. >> hosts deny = ALL >> printing = bsd >> print command = lpr -r -P'%p' %s >> lpq command = lpq -P'%p' >> lprm command = lprm -P'%p' %j >> use client driver = Yes >> >> This has had me stumped for 3 days straight now and I don't know what else I >> can try. Samba just isn't giving me any more clues. >> >> I've found lots of other posts like mine through google with no replies to >> them. Does anyone have any ideas of what to do next? >> >> I would greatly appreciate if someone could point me in the right direction. > > This is strange. > > There should be some logging around such a BAD_NETWORK_NAME. > So could you please do the following? > > * stop samba services (smbd, nmbd, winbindd) > * remove (or comment out) the line "log file = /var/log/samba/log.%m" > from your smb.conf > * leave the log level at 10 globally > * remove the log files under /var/log/samba > * start samba services > * do the failing connect to the share "test" > * post /var/log/samba/log.smbd here > > Cheers - Michael > > > -- > 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 -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba |