LinuxQuestions.org
Review your favorite Linux distribution.
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 10-14-2005, 10:07 PM   #1
trevor4706
Member
 
Registered: Oct 2005
Location: Ottawa, Canada
Distribution: Fedora FC 5& 6
Posts: 34

Rep: Reputation: 16
Unhappy Connecting a Linux Computer to a Windows XP Network


I tried without success to get help with my problem in the "Newbie" forum, so am giving it a go here. I am new to Linux but experienced in Windows (and DOS too). I have just loaded Fedora FC1 on a computer that was surplus to my needs and would like to connect it to my existing Windows XP home network (4 stations). The computers on the XP network share a DSL connection to the INet by a router, and share an Epson Stylus Color 640 printer connected to one of the Windows computers (TREVOR1).

The Linux machine connects to the INet just fine.

I have encountered two problems, probably associated. First, although I can see the Linux computer as Samba Server (Linuxhost) in XP's network neighborhood when I open the Microsoft Windows Network, I cannot open Samba Server. I get the following message: \\Linux host not accessible. You might not have permission to use this network resource. Contact the administrator ....". I have yet to figure out how I find out if I can "see" the XP computers from my Linux machine.

Second, I have had no success in adding the Epson Stylus as a SMB printer, not surprising given the network problem described above.

After much trial and error on my own, I adapted a smb.conf file I found in a message thread posted in this forum by Dolphin2005 on 10-09-05. It enabled me at least to see the Linux com[puter in XP, but still left me unable to access the network from either end.

Here is my smb.conf file:

[global]

workgroup = OWEN OFFICE
netbios name = linuxhost
server string = Samba Server

printcap name = /etc/printcap
load printers = yes

cups options = raw

log file = /var/log/samba/smbd.log
max log size = 50

security = user

password server = none

unix password sync = Yes
passwd program = /usr/bin/passwd %u

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

local master = no

wins server = w.x.y.z
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431

dns proxy = no


[homes]
comment = Home Directories
read only = no

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
printable = yes

[tmp]
comment = Temporary file space
path = /tmp
read only = no
guest ok = yes

[public]
comment = Public Stuff
path = /usr/tmp
public = yes
read only = no
guest only = yes
guest ok = yes

g[root directory]
comment = root's account on Linux machine
path = /home
valid users = root
read only = no

I received advice in the Newbie Forum to download and install smb4k. I did and ran it, but it did not see my XP network or detect my XP shares.

Any help would be greatly appreciated.

Thanks in advance

Trevor

Last edited by trevor4706; 10-14-2005 at 10:09 PM.
 
Old 10-14-2005, 10:44 PM   #2
dhruvypatel
Member
 
Registered: Oct 2005
Location: Bangalore,India
Distribution: Debian
Posts: 37

Rep: Reputation: 15
did you add root password to smbpasswd file? If not then add it.
#smbpasswd -a root
After restarting smb service check once again.
 
Old 10-15-2005, 07:06 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
I believe that you may also need to use the "smbpasswd" program to add the name/password of the windows user.

Consider adding the samba-doc package as well as swat. Swat is a convenient way of setting up your server. The samba-doc package will add a number of manpages and books that you can use to help you set things up. This documentation includes:
Samba-3 by Example Practical Exercises in Successful Samba Deployment.
The Official Samba-3 HOWTO and Reference Guide.
Using Samba, 2nd Edition ( This one is for samba 2.2 )
 
Old 10-15-2005, 12:41 PM   #4
trevor4706
Member
 
Registered: Oct 2005
Location: Ottawa, Canada
Distribution: Fedora FC 5& 6
Posts: 34

Original Poster
Rep: Reputation: 16
Unhappy

Thanks for the responses. I took the action suggested to add the users and passwords, but nothing has changed with respect to my ability to either access XP from Linux or vice versa.

I cannot find any Swat executable on my system, and when I try to run it by entereing http://localhost:901/ in my browser, I get the following message: "The connection was refused when attempting to connect to Localhost:901"

Can anyone suggest a "generic" smb.conf file I might copy and give a try?

Running out of ideas in Ottawa

Trevor
 
Old 10-15-2005, 07:11 PM   #5
ludwig W
Member
 
Registered: Mar 2003
Posts: 404

Rep: Reputation: 30
go to suse-tutorials.co.uk and check out the Networking tutorial
 
Old 10-16-2005, 05:10 PM   #6
trevor4706
Member
 
Registered: Oct 2005
Location: Ottawa, Canada
Distribution: Fedora FC 5& 6
Posts: 34

Original Poster
Rep: Reputation: 16
Unhappy

I see progress! The SuSe tuorial was big help.

Here's where things sit now. I am able to "Ping" from the XP computer to the Linux computer and vice versa. Further, when I open up my XP Network Neighbourhood/Entire Network/MS Windows Network I can see the Linux computer (Samba 3.07-2.FC1 Linuxhost), together with the other four computers on the network; however, when I click on the Linux computer I get this message:


\\Linuxhost is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.

The network path was not found.

It seems like an issue of permissions. I've added users and passwords in Linux (smbuser and smbpasswd). Do I need to add them to XP somehow?


 
Old 10-17-2005, 04:13 PM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
You want to add the same users/passwords that are on the XP computers to the samba server, using smbpasswd. When you try to open a resource on the Linux server, from an XP computer, the XP host will use the username/password information in trying to set up a session.

You are using "security=user". That is the same mode that I use. I am able to click on the profiles share, and the home directory of the user I am logged in as pops up. I am access my home directory on the server from a laptop for example (normally running linux). I don't have my system set up so that, when booting my laptop to XP, the Documents and Data are actually located on the server. For one thing, I have XP home on my laptop, and XP home cannot join a domain.

If what you want to do is serve up a shared directory on the Linux Server, without regard to who the user is, the "security = share" may be a better fit. This option is less secure but may work more like the way you are accustomed to.
 
Old 10-18-2005, 07:54 AM   #8
trevor4706
Member
 
Registered: Oct 2005
Location: Ottawa, Canada
Distribution: Fedora FC 5& 6
Posts: 34

Original Poster
Rep: Reputation: 16
Thumbs up

jschiwal

Thanks for your help. I am now getting somewhere. With everyone's help I think I now have a smb.conf that works. I have also discovered that the firewall on my Linux computer was configured (by default I guess) to block all traffic. When I stop the firewall I can access the shares on the Linux computer from my XP network, but I still cannot accees the shared resources (on the XP network from the Linux machine. I'm primarily interested in accessing the printer attached to my primary XP desktop (TREVOR1). When I try to add a SMB printer in Linux it does not list TREVOR1 as a share, and when I specifiy the printer I cannot print to it.

I have three more questions.

Question 1: I have configured the firewall to allow network access according to the directions in Fedora Linux for Dummies, but when the firewall thus configured is enabled the XP machine cannot see the Linux machine (Linuxhost not accessible etc, etc.) Remove the firewall and everything is fine again, at least XP to Linux. Do I need to enable SSH or something?

Question 2: I think the XP to Linux accessibility is resolved (excepting the firewall issue). Can anyone offer suggestions as to what I need to do to open it the other way, Linux to XP?

Question 3: Is there a Linux equivalent to XP's Network Neighborhood where you can graphically see your network connections?

Thanks for your patience w this Newbie

Trevor
 
Old 10-19-2005, 01:03 AM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Two things to try:

A) If you have a samba server configuration utility on Fedora Core, it may offer to open the neccesary ports. You could be sneeky and back up your smb.conf file first, run the Redhat configuration tool, and if it isn't to your liking, copy over smb.conf with your backup, but keeping the changes to the firewall.
B) Look in the /etc/services file for entries mentioning SMB and IPP. Sometimes both TCP and UDP ports are used, and you need to allow both in the firewall.

Good Luck!
 
Old 10-19-2005, 01:09 AM   #10
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Two things to try:

A) If you have a samba server configuration utility on Fedora Core, it may offer to open the neccesary ports. You could be sneeky and back up your smb.conf file first, run the Redhat configuration tool, and if it isn't to your liking, copy over smb.conf with your backup, but keeping the changes to the firewall.

B) Look in the /etc/services file for entries mentioning SMB and IPP. Sometimes both TCP and UDP ports are used, and you need to allow both in the firewall. Cups is IPP based, so any ports needed by the IPP protocol are needed by Cups.

C) Also, make sure that the documentation and Howto's that you are referring to are Samba 3.0 based, and don't predate Windows XP. For example, avoid using "security=server" alway now. An older how-to may assume that you are on a NT network. XP doesn't work the same way as NT and Windows 98 might have. It is IP based now. The Home edition also cannot join a domain.

Good Luck!
 
Old 10-19-2005, 08:20 AM   #11
dhruvypatel
Member
 
Registered: Oct 2005
Location: Bangalore,India
Distribution: Debian
Posts: 37

Rep: Reputation: 15
Hi Trevor,
I had the same situation which you have. And I have a solution to it. It worked in my case but I am not sure it will work in your case. Anyway just try it. What you are supposed to do is just make security=user in smb.conf. Now at windows XP side remove the NIC card drivers and install it again and setup the network again. All these shoud be done while running the linux on the server. It seems strange but as I said it worked in my case.
 
Old 10-20-2005, 09:44 PM   #12
dundas
LQ Newbie
 
Registered: Jun 2005
Distribution: Gentoo
Posts: 4

Rep: Reputation: 0
Dear trevor4706:

I am also trying to hook up my samba wiz a netbios name when i can use \\linuxnetbiosname to access it in the LAN wiz windows 98 or windows xps, I see that u r already getting there, so would u plz post ur working smb.conf to let us know a bit more?

Thank you so much since this prob 's biting me for a long time.
 
Old 10-21-2005, 08:02 AM   #13
trevor4706
Member
 
Registered: Oct 2005
Location: Ottawa, Canada
Distribution: Fedora FC 5& 6
Posts: 34

Original Poster
Rep: Reputation: 16
Question

Thanks again to all who have replied. I've included my smb.conf file for Dundas, for what it's worth.

Here's where I'm at after following all your excellent suggestions. When my iptables firewall is down I can ping my XP Home computer (TREVOR1) from the Linux computer (Linuxhost) and vice versa. When the iptables firewall is up and running I can ping the XP computer from the Linux computer but not vice versa. When the firewall is running I can see the Linux shares on the XP computer, but I cannot access them (makes sense); when the firewall is down I can both see them and access them. I can see one other computer (CATHY1 - Windows 95) on my LAN from the Linux computer, but I cannot see the XP Home computer to which the printer is attached.

There is clearly a firewall issue blocking access from TREVOR1 to Linuxhost. I am using a very simple firewall I copied from Fedora Linux for Dummies repeated below. These are the lines I added to iptables to make my firewall. Can anyone see where the problem is?

iptables --policy INPUT DROP
iptables --policy OUTPUT DROP
iptables --policy FORWARD DROP

iptables -A OUTPUT -o ACCEPT -j lo
iptables -A INPUT -i ACCEPT -j lo

iptables -A OUTPUT -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -m state --state RELATED, ESTABLISHED

As for my inability to "see" TREVOR1 from Linuxhost, is that due to the fact XP Home cannot join a domain (I'm not exactly sure what that means in practical terms)?

This is not a big deal because I have been able to successfully connect my printer to Linuxhost as a local printer (long cable!), so being able to access it via the network is a matter of convenience, not necessity.

For Dundas, here's my present smb.conf file:

[global]

# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = Owen office
username map = /etc/samba/smbusers
netbios name = localhost
guest ok = yes
encrypt passwords = yes
comment = Linux PC

server string = Samba Server

printcap name = /etc/printcap
load printers = yes

; printing = cups

; cups options = raw

; guest account = pcguest
; guest ok = yes

; log file = /var/log/samba/smbd.log

; max log size = 50

security = share

#
# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

; local master = no

; domain master = yes

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
; wins support = yes

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
wins server = w.x.y.z

# WINS Proxy - Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one WINS Server on the network. The default is NO.
; wins proxy = yes


[homes]
comment = Home Directories
browseable = yes
writable = yes

[trevor's data]
comment = trevor's home folder
path = /home/trevor
writeable = yes
browseable = yes
read only = no


Thanks for all the wonderful help I've received so far.



Trevor
 
Old 10-21-2005, 08:27 PM   #14
dundas
LQ Newbie
 
Registered: Jun 2005
Distribution: Gentoo
Posts: 4

Rep: Reputation: 0
great,

I also had iptables, but I did test when service iptables stop, I can find linuxhost wiz \\ip, but not \\netbios, since there is no wins server in my network, I set samba as the wins server, I had it worked for my gentoo box, but not yet for redhat 9.

anyways,
thanks Trevor, good luck.
 
Old 10-21-2005, 10:03 PM   #15
solveit
Member
 
Registered: Jan 2005
Posts: 83

Rep: Reputation: 15
Use smb4k to browse from linux like NetworkNeighborhood

http://freshmeat.net/projects/smb4k/
 
  


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
Connecting Linux computer to a Windows XP network trevor4706 Linux - Newbie 4 10-13-2005 08:25 PM
Connecting linux machine to windows network corbis_demon Linux - Networking 3 11-08-2004 02:47 AM
Connecting to windows network migggens Linux - Wireless Networking 1 04-13-2004 07:56 PM
connecting to windows computer master Linux - Newbie 4 03-21-2004 01:14 PM
connecting to a windows network emperorjordan Mandriva 2 02-25-2004 09:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:00 PM.

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