LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 07-05-2005, 02:55 PM   #1
sohmc
Member
 
Registered: Aug 2002
Location: Alexandria
Distribution: ubuntu 12.04.2
Posts: 217

Rep: Reputation: 30
samba: NT_STATUS_BAD_NETWORK_NAME


I'm having some weird issues with samba.

I've recently reinstalled linux to fedora core 4. Using default settings, I should be about to mount my home directory on windows...but I get this:

Code:
sohmc@bart:~$ smbclient //127.0.0.1/sohmc
added interface ip=192.168.1.201 bcast=192.168.1.255 nmask=255.255.255.0
Client started (version 3.0.14a-2).
Connecting to 127.0.0.1 at port 445
Password: 
Doing spnego session setup (blob length=58)
got OID=1 3 6 1 4 1 311 2 2 10
got principal=NONE
Got challenge flags:
Got NTLMSSP neg_flags=0x608a0215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x60080215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x60080215
Domain=[BART] OS=[Unix] Server=[Samba 3.0.14a-2]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
my smb.conf:
Code:
[global]
        workgroup = MYGROUP2
        server string = Samba Server
        log level = 3
        log file = /var/log/samba/%m.log
        max log size = 50
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        printcap name = /etc/printcap
        dns proxy = No
        idmap uid = 16777216-33554431
        idmap gid = 16777216-33554431
        cups options = raw

[homes]
        comment = Home Directories
        read only = No
        browseable = No

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

[tmp]
        comment = Temporary file space
        path = /tmp
        read only = No
        guest ok = Yes
When I mount tmp, I can see the directories, but I cannot see individual files, even the ones I created and own and permissions to.

I've searched on google and on LQ and cannot seem to find a solution that fixes this problem. I don't think it's a permissions issue because Iv'e tried making my home directory and files in tmp world readable to no avail.

I've also copied this smb.conf from a working linux computer and still does not work.

If you have any suggestions, I'm open!!

thanks!
 
Old 07-05-2005, 03:24 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
What I'm confused with is your command 'smbclient //127.0.0.1/sohmc'

Are you connecting using two machines on a network or the same machine? Why would you need to use smbclient on a linux host to connect to itself? 127.0.0.1 is a loopback address
 
Old 07-05-2005, 03:50 PM   #3
sohmc
Member
 
Registered: Aug 2002
Location: Alexandria
Distribution: ubuntu 12.04.2
Posts: 217

Original Poster
Rep: Reputation: 30
I use the loopback address to test the samba mounts on my local machine.

the results are the same if I use the actual address or when I attempt to get the samba share from another computer.
 
Old 07-08-2005, 06:19 AM   #4
sohmc
Member
 
Registered: Aug 2002
Location: Alexandria
Distribution: ubuntu 12.04.2
Posts: 217

Original Poster
Rep: Reputation: 30
http://www.linuxquestions.org/questi...hreadid=335899

This thread solves the problem. SELinux blocks accessing home directories...

Quote:
Originally posted by HomeBrewer
Well, I figured this out. Fedora Core 4 blocks home shares in Samba by default through SELinux policies...

For the benefit of Google, here's how to fix it:

Solution 1 (temporary; won't survive a re-boot):

Issue the command:

[root]# setsebool samba_enable_home_dirs=1

Solution 2 (might survive a reboot; I didn't actually try this one):

[root]# setsebool -P samba_enable_home_dirs=1

Solution 3 (survives a reboot):

This is the solution I ultimately settled on. Go to the /etc/selinux/targeted directory. Create a text file called booleans.local, and put the "samba_enable_home_dirs=1" line in it (without the quotes, of course).

Solution 4 (surives a reboot, but removes all SELinux protection):

Edit /etc/selinux/config. Change the line SELINUX=enforcing to SELINUX=permissive or SELINUX=disabled.
 
Old 09-20-2005, 02:36 PM   #5
ebo
LQ Newbie
 
Registered: Feb 2005
Posts: 5

Rep: Reputation: 0
Hi all,

I have a similar problem. I got a FC4 Server running samba. I solved the problem with the home directory like written here. But I also got a HDD in the server which is NTFS formatted. I mount it (with the ntfs kernel module) and share it with samba as public. When I try to connect, I get the same error as the SELinux-Homedirectory error (which I got fixed, thanks).

Quote:
Domain=[JESSICA] OS=[Unix] Server=[Samba 3.0.14a-2]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
Isn´t it possible to share an NTFS folder with samba? (The NTFS HDD did belong to a Win 2003 Server with Domain etc. But the HDD with the Win Sys crashed and now only the data hdd left)

Thanks for your help.

br

René
 
Old 01-20-2007, 08:06 PM   #6
jcbparry
Member
 
Registered: Sep 2006
Distribution: Slackware 12, Fedora Core 5
Posts: 38

Rep: Reputation: 15
I get the same problem too.

Code:
# smbclient //192.168.2.13/

Domain=[PHIL-2AE3A13399] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME



# smbclient //192.168.2.11/

Domain=[JOE] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME



#smbclient //127.0.0.1/

Domain=[JACOB] OS=[Unix] Server=[Samba 3.0.20]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
Please Help!
 
Old 12-20-2007, 06:39 PM   #7
veggiebenz
LQ Newbie
 
Registered: Dec 2007
Location: austin tx
Distribution: ubuntu, ubuntu, fedora, knoppix, ubuntu
Posts: 3

Rep: Reputation: 0
NT_STATUS_BAD_NETWORK_NAME --- Fixed!

I was getting:

"tree connect failed: NT_STATUS_BAD_NETWORK_NAME", and now I've fixed it.

This may or may not work for you, but it fixed my problem.


I could LIST the shared resources like this:

Code:
smbclient -L 127.0.0.1 -U chris
but I could not CONNECT like this:

Code:
smbclient //127.0.0.1/Pubshare -U chris%password
finally with some help from gradin on #samba, we identified the problem in my smb.conf:

Code:
msdfs proxy = no     # dont know what this is but it messed me up bad
Now that this line is gone, everything works fine!

Here's a link on this bug / problem:

http://bugs.centos.org/view.php?id=2554

Hope somebody else can benefit from this.

Thanks
 
Old 12-21-2007, 12:49 PM   #8
veggiebenz
LQ Newbie
 
Registered: Dec 2007
Location: austin tx
Distribution: ubuntu, ubuntu, fedora, knoppix, ubuntu
Posts: 3

Rep: Reputation: 0
Smile Re: NT_STATUS_BAD_NETWORK_NAME --- Fixed!

I should add that the offending "msdfs" line was placed in my smb.conf by "kcontrol" kde app from "kdenetwork-filesharing" package.

If you are using kcontrol, you can set the defaults in the advanced | VFS section to disable this problematic setting.

or just remove it manually, and be sure to restart samba before trying again
 
  


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
samba & NT_STATUS_BAD_NETWORK_NAME wlfdgcrkz Linux - Software 10 05-19-2009 10:55 AM
Nt_status_bad_network_name rtcary Linux - Newbie 0 08-10-2005 07:24 PM
Nt_status_bad_network_name MrFish Linux - Software 2 02-06-2005 02:54 AM
Samba+windows printer=NT_STATUS_BAD_NETWORK_NAME rickenbacherus Linux - Networking 0 05-27-2004 06:28 PM
What does NT_STATUS_BAD_NETWORK_NAME mean ? ZhiYi Linux - Networking 2 02-14-2003 12:31 PM


All times are GMT -5. The time now is 04:45 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration