Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Still can't share files with samba
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Need4Speed
Guru
Guru


Joined: 06 Jun 2004
Posts: 497

PostPosted: Mon Jul 05, 2004 11:16 pm    Post subject: Still can't share files with samba Reply with quote

Okay I have two computers connected by a hub both part of the workgroup "HOME". The gentoo computer is named "linux" with IP address 192.168.1.46 and the windows xp computer is named "XP" with IP address 192.168.1.47. They can both ping each other by name or ip address. They can also both see their own shares, but not access each others. When I type XP.HOME in my gentoo computer I get "the connection was refused when attempting to contact xp.home". When I type \\linux in my windows computer it doesn't even reconize it. Whats wrong? I really want to share files! :(
Here's my samba conf file:
Code:
[global]

workgroup = HOME
netbios name = linux
encrypt passwords = yes

log file = /var/log/samba/log.%m
max log size = 50

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

interfaces = lo eth0
bind interfaces only = yes

hosts allow = 127.0.0.1 192.168.1.0/24
hosts deny = 0.0.0.0/0

security = share

#guest account = root
guest ok = yes

[public]
comment = Public Files
browseable = yes
public = yes
create mode = 0766
guest ok = yes
path = /home/samba/public
writable = yes
Back to top
View user's profile Send private message
neomatrix35
n00b
n00b


Joined: 05 Jul 2004
Posts: 53

PostPosted: Tue Jul 06, 2004 12:17 am    Post subject: Reply with quote

on your xp box... do u have the xp firewall enabled? and like wise on the linux box... do you have port 445( i believe is the port) enabled to accept incoming connections.
Back to top
View user's profile Send private message
Need4Speed
Guru
Guru


Joined: 06 Jun 2004
Posts: 497

PostPosted: Tue Jul 06, 2004 12:22 am    Post subject: Reply with quote

neomatrix35 wrote:
on your xp box... do u have the xp firewall enabled? and like wise on the linux box... do you have port 445( i believe is the port) enabled to accept incoming connections.


no firewall's on the xp computer and i don't think the linux box hss one either. Any way I can make sure that port is open?
Back to top
View user's profile Send private message
SZwarts
l33t
l33t


Joined: 13 Oct 2003
Posts: 629
Location: Sydney, NSW, Australia

PostPosted: Tue Jul 06, 2004 12:24 am    Post subject: Reply with quote

I would suggest that you try to acces your shared files on your linux computer from your linux computer first...
Just use smbclient to see if you can logon to your own computer, and if it does fail, there is probably more information than only "connection was refused"

And I don't know about Win XP but I know that Win2000 tries to logon with username and password. Even if there is a guest account available it chooses not use that, so although you have guest enabled the Win2000 computer still gets rejected because it tries to logon on with its username and password. So you also might want to look into that.

And if it doesn't recognize the \\linux, try to access it by ip first, to see if that works use "\\192.168.1.46" ...

But I really suggest you use smbclient to test if everything is working, and to get some detailed information what is going wrong and where...
Back to top
View user's profile Send private message
Need4Speed
Guru
Guru


Joined: 06 Jun 2004
Posts: 497

PostPosted: Tue Jul 06, 2004 12:33 am    Post subject: Reply with quote

Okay, tried smbclient, it asks for a password, but I can enter anything I want and it still works:
Code:
eric root # smbclient -L 127.0.0.1
Password:
Domain=[HOME] OS=[Unix] Server=[Samba 3.0.4]

        Sharename       Type      Comment
        ---------       ----      -------
        public          Disk      Public Files
        IPC$            IPC       IPC Service (Samba 3.0.4)
        ADMIN$          IPC       IPC Service (Samba 3.0.4)
Domain=[HOME] OS=[Unix] Server=[Samba 3.0.4]

        Server               Comment
        ---------            -------
        LINUX                Samba 3.0.4

        Workgroup            Master
        ---------            -------
        HOME                 LINUX

On the XP computer I did try just using the ip and the same results.
Back to top
View user's profile Send private message
neomatrix35
n00b
n00b


Joined: 05 Jul 2004
Posts: 53

PostPosted: Tue Jul 06, 2004 12:33 am    Post subject: Reply with quote

SZwarts is right concerning the XP box. u will need to connect with a username and password. if you didnt change ur configurations you can change it so that it will accept the connection without a password but depending on ur situation I wouldnt advise that. If you want to check to see that the ports are open. type netstat -nl on the linux box and look for 445 and on the xp box... type netstat -n. both situations will give a list of listening and connection established ports... also another way on the linux box is to type iptables -L (if you are using iptables).
Back to top
View user's profile Send private message
Need4Speed
Guru
Guru


Joined: 06 Jun 2004
Posts: 497

PostPosted: Tue Jul 06, 2004 12:44 am    Post subject: Reply with quote

neomatrix35 wrote:
SZwarts is right concerning the XP box. u will need to connect with a username and password. if you didnt change ur configurations you can change it so that it will accept the connection without a password but depending on ur situation I wouldnt advise that. If you want to check to see that the ports are open. type netstat -nl on the linux box and look for 445 and on the xp box... type netstat -n. both situations will give a list of listening and connection established ports... also another way on the linux box is to type iptables -L (if you are using iptables).


linux:
Code:
tcp        0      0 192.168.1.46:445        0.0.0.0:*               LISTEN

xp: shows nothing, is that the right command? the blank list is titled ACTIVE connections

EDIT: You must have ment netstat -a which shows the listening ports, but 445 is not listed. How do I enable it?

EDIT: Wait actually it might, it mentions netbios is that is?
Code:
C:\DOCUME~1\Eric>netstat -a

Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    XP:epmap               XP:0                   LISTENING
  TCP    XP:microsoft-ds        XP:0                   LISTENING
  TCP    XP:1025                XP:0                   LISTENING
  TCP    XP:1028                XP:0                   LISTENING
  TCP    XP:1051                XP:0                   LISTENING
  TCP    XP:netbios-ssn         XP:0                   LISTENING
  UDP    XP:microsoft-ds        *:*
  UDP    XP:isakmp              *:*
  UDP    XP:1030                *:*
  UDP    XP:1043                *:*
  UDP    XP:ntp                 *:*
  UDP    XP:1054                *:*
  UDP    XP:ntp                 *:*
  UDP    XP:netbios-ns          *:*
  UDP    XP:netbios-dgm         *:*
Back to top
View user's profile Send private message
neomatrix35
n00b
n00b


Joined: 05 Jul 2004
Posts: 53

PostPosted: Tue Jul 06, 2004 1:03 am    Post subject: Reply with quote

if you are using xp pro ... go into "administrative tools>services" look for server in the list and make sure its turned on to automatic and started otherwise you have to turn it on manually. I believe they don't actually have the port 445 listed as a listneing port. it is the port but when u do a netstat i'm not quite sure they have that listed(my bad). in order to connect to the linux box, i'd use the "net" command from the command prompt. type net in the prompt and use settings custom to your environment. on the linux box i'd use the mount command...not sure if thats how u are connecting to it but just making sure... i have to go but i can look for the proper command and post it for ya
Back to top
View user's profile Send private message
Need4Speed
Guru
Guru


Joined: 06 Jun 2004
Posts: 497

PostPosted: Tue Jul 06, 2004 1:15 am    Post subject: Reply with quote

neomatrix35 wrote:
if you are using xp pro ... go into "administrative tools>services" look for server in the list and make sure its turned on to automatic and started otherwise you have to turn it on manually. I believe they don't actually have the port 445 listed as a listneing port. it is the port but when u do a netstat i'm not quite sure they have that listed(my bad). in order to connect to the linux box, i'd use the "net" command from the command prompt. type net in the prompt and use settings custom to your environment. on the linux box i'd use the mount command...not sure if thats how u are connecting to it but just making sure... i have to go but i can look for the proper command and post it for ya


hmm...no i'm not familar with those commands, what are they?

EDIT: Is it "net view ipaddress"?
Because if i enter the linux box's ip address, I get this:
Code:
C:\DOCUME~1\Eric>net view 192.168.1.46
System error 1231 has occurred.

The network location cannot be reached. For information about network troublesho
oting, see Windows Help.
Back to top
View user's profile Send private message
Need4Speed
Guru
Guru


Joined: 06 Jun 2004
Posts: 497

PostPosted: Tue Jul 06, 2004 3:36 pm    Post subject: Reply with quote

and this is what I get when I try to mount one of my windows computer's share directories:
Code:
eric / # mount -t nfs 192.168.1.47:/Downloads /mnt/test
mount: RPC: Remote system error - Connection refused
Back to top
View user's profile Send private message
neomatrix35
n00b
n00b


Joined: 05 Jul 2004
Posts: 53

PostPosted: Tue Jul 06, 2004 6:18 pm    Post subject: Reply with quote

try this

mount -t smbfs -o username=guest,password= //windowshostname(put actual hostname here)/Downloads /mnt/test

windows doesn't use nfs(network file system) it uses ntfs( a windows native file system). Linux doesnt support ntfs very well ... it does but not worth the hassle. Windows shares operate just like samba shares so consider it a samba file system.

you can also put this into /etc/fstab if you want to make it a little more automated

\\windowshostname/Downloads /mnt/test smbfs username=guest,password=,defaults(or "user" if u need them acccessible by a non root user but i would mount it with defaults and mount them with the root user**delete this and keep the space after the bracket) 0 2



if this doesn't work ... then u aren't sharing or like i said before you have a firewall issue. can have the net command in a few for ya

hope this helps
Back to top
View user's profile Send private message
neomatrix35
n00b
n00b


Joined: 05 Jul 2004
Posts: 53

PostPosted: Tue Jul 06, 2004 6:23 pm    Post subject: Reply with quote

ok easier way then net command...


go to My Computer
in the menu bar up top.. go to tools>Map Network Drives
pick a drive letter
click connect with a different user and enter in the user used for the samba share and go back to where u picked the drive letter
enter in the ip address of the linux box in the folder and then hit browse
now look for the samba share.

if it doesn't appear then either again there is a firewall issue or you aren't sharing. make sure samba is running.

If these don't work ... let me know... we can try something else.
Back to top
View user's profile Send private message
DaveArb
Guru
Guru


Joined: 29 Apr 2004
Posts: 510
Location: Texas, USA

PostPosted: Tue Jul 06, 2004 6:38 pm    Post subject: Reply with quote

Need4Speed wrote:
EDIT: Is it "net view ipaddress"?
Because if i enter the linux box's ip address, I get this:
Code:
C:\DOCUME~1\Eric>net view 192.168.1.46
System error 1231 has occurred.

The network location cannot be reached. For information about network troubleshooting, see Windows Help.


Microsoft Knowledgebase article KB325122 has this to say about error 1231:

For example, if a firewall or a router is not allowing Transmission Control Protocol (TCP) port 139, you may receive the following error messages:

Error 121: The semaphore timeout period has expired (ERROR_SEM_TIMEOUT).
-and-
Error 1231: The remote network is not reachable by the transport (ERROR_NETWORK_UNREACHABLE).

(emphasis mine)

I think you need to look seriously at iptables on your Samba box, and maybe reverify that ICF is turned off on your XP machine.

Dave
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum