• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Samba Setup Problem

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Seal

Member
Joined
Aug 14, 2002
Location
London
Hi, ive followed the samba how to guide and im having a few problems. Heres my setup:

On Windows box i have set:

Hostname: joeys
Workgroup: LINUXBOX

On the Linux box:

smb.conf file looks like this:

[global]
workgroup = LINUXBOX
[homes]
guest ok = no
read only = no

Then in console have typed this line to add the user joe with the password: password.

smbpasswd -a joe password

Then i type in 'nmblookup joeys' and it confirms i get replies off it.

Now i try and log in using 'smbclient \\\\joeys\joe' and enter my password: 'password' and it returns this:

[root@box samba]# smbclient \\\\joeys\\joe
added interface ip=192.168.0.102 bcast=192.168.0.255 nmask=255.255.255.0
Password:
Domain=[LINUXBOX] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME


Anyone point me in the right direction?

Thanks
Seal
 
Last edited:
im not trying to share a folder called joe on the windows box, im trying to make my linux box shared and accessable from the windows box. also the \'s are needed, im not sure what for but they are needed.
 
heres an example of how to get this set up:

on linux box:
1.create account for user 'joe" (usually adduser on command line but some distros have different tools.

2. you may need to run smbpasswd again after creating the account (not 100% sure, all my shares on my linux box are set up public. no password needed).

on windows computer:
1. open network neighborhood/networ places
2. find linux box in list
3. you will be prompted for username/password. enter password you set up from linux box directions.

that should do it.
 
I was able to reproduce the NT_STATUS_BAD_NETWORK_NAME error on my network, simply by using an incorrect name for the share. That's probably what is happening in your case, as well.

Unless their is a reason why you need to share home directories specifically, I would just define the share seperatly, like so:
Code:
[share_name]
  path = /path/here
  public = yes
  guest ok = yes
  writable = yes

You can change the values for public, guest ok, and writable, to whatever suits your setup.

That's my personal preference for setting up shares. If you would like to share your home directories, that's possible too. Just connect to the share called "homes" not the username. So you would do the following:

smbclient \\\\joeys\\homes -U joe

and enter joe's samba password when prompted, to connect to joe's home directory.
 
Thanks for all your help so far.

I can now connect to my windows box from my linux box, however i cannot connect to my linux box from my windows box.

My linux box cant even connect to itself using:

smbclient \\\\box.joes\\filestore -U joe

I think it MIGHT be to do with the fact that theres a dot in the linux box's hostname. (box.joes)

The linux box does show in the windows network neighbourhood as Box but when i try to access it, it gives me a cannot connect error. Could this be windows getting confised with that dot?

THanks
Seal
 
Have you defined the "filestore" share in your smb.conf?

Also, just an FYI, you should be able to use smbclient //system/share instead of double \s.
 
Seal said:

My linux box cant even connect to itself using:

smbclient \\\\box.joes\\filestore -U joe

I think it MIGHT be to do with the fact that theres a dot in the linux box's hostname. (box.joes)

The linux box does show in the windows network neighbourhood as Box but when i try to access it, it gives me a cannot connect error. Could this be windows getting confised with that dot?

THanks
Seal

Is an nmblookup on box.joes successful? If so, I would doubt that is your problem. As far as I know, the only hostname Windows systems get confused about is 'localhost'.

I would think you probably have a configuration problem here. Would you be able to post the relevant parts of your smb.conf? Also, the testparm utility is useful in checking your smb.conf.
 
ok here goes: nmblookup is successfull.

When i try and connect to the box i get:

[root@box samba]# smbclient //box.joes/joe -U joe
added interface ip=192.168.0.102 bcast=192.168.0.255 nmask=255.255.255.0
Password:
Anonymous login successful
Domain=[LINUXBOX] OS=[Unix] Server=[Samba 2.2.7a-security-rollup-fix]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME

Here is my smb.conf:

[global]
username map = /etc/samba/smbusers
guest ok = yes
server string = Joes Linux Box
workgroup = linuxbox
null passwords = yes

[joe]
path = /home/joe/filestore
public = yes
guest ok = yes
writeable = yes


Yep, the folder /home/joe/filestore does exist. I can easily connect to my windows box from my linux box but not the other way around. The windows box CAN see the linux box in the network neighbourhood but when i click on it, it says that i dont have permission to access the computer. The computername of the windows box is joeys. Yep it is in the correct workgroup called linuxbox. The Linux box has the name box.joes

Seal
 
Well, the only time I've ever seen a NT_STATUS_BAD_NETWORK_NAME error is when Samba can't find the share specified. Have you restarted your smbd and nmbd clients after changing your smb.conf ?

Another thing to check is that /home/joe/filestore has proper permissions so that the Samba user (in this case, "joe") can read it. Considering its in his home directory, he probably does have the right permissions, but its worth a try.
 
Back