LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 03-15-2005, 06:09 PM   #1
morgwai
LQ Newbie
 
Registered: Oct 2004
Location: krakow/poland
Distribution: other
Posts: 7

Rep: Reputation: 0
samba server visible for linux but invisible for windows


hi,
i have some problems setting up samba server in my LAN. the goal was to make every user's home directory accessible after password verification and to have one additional public share, to which everybody has access without password. my smb.conf file looks as follows:
Code:
[global]
  workgroup = INTRANET
  server string = thyservant
  security = user
  remote announce = 198.0.0.255
  log file = /var/log/samba/%m.log
  max log size = 50
  socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
  dns proxy = no
[homes]
  comment = Home Directories
  browseable = no
  guest ok = no
  writable = yes
[public]
  comment = katalog publiczny
  path = /var/data/public
  public = yes
  writable = yes
  printable = no
but id doesn't work as desired windows machines can't see this server at all, regardless they are in the same or different workgroup. when i try to get there by typing '\\thyservant\public' or '\\thyservant\userName' in the location bar i get an error message.
linux machines on the other hand can see the server and even can access the public share without any problems, but when i try to get to my home directory i get NT_STATUS_LOGON_FAILURE error after typing my password.
i have samba version 3.0.10 and i don't have any firewall on that machine.
does anybody knows what am i doing wrong? thanks in advance.
 
Old 03-15-2005, 06:21 PM   #2
kirkland500
LQ Newbie
 
Registered: Mar 2005
Distribution: Suse Linux 9.2
Posts: 8

Rep: Reputation: 0
have you tried logging into the box by ip address

i.e. from explorer window

\\192.168.0.3

see if that brings up a listing

David
 
Old 03-15-2005, 06:33 PM   #3
linuxpp
LQ Newbie
 
Registered: Feb 2005
Posts: 7

Rep: Reputation: 0
I had similer problem before. Now I can see and use linux directories from windows machine. I did it by disabling the firewalls "/etc/rc.d/init.d/ipchains stop" and "/etc/rc.d/init.d/iptables stop". I know disabling firewalls is not the right answer but it was the cause. I am still trying to find a way to view and use linux directories enabling firewalls. Maybe some others could help us.

Last edited by linuxpp; 03-15-2005 at 06:35 PM.
 
Old 03-15-2005, 10:44 PM   #4
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Rep: Reputation: 33
well, you could run your firewall, but open up the specific ports you need. i don't know which port samba uses, maybe someone else does. or maybe netstat -anp could tell you....
 
Old 03-16-2005, 11:51 AM   #5
morgwai
LQ Newbie
 
Registered: Oct 2004
Location: krakow/poland
Distribution: other
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by kirkland500
have you tried logging into the box by ip address

i.e. from explorer window

\\192.168.0.3

see if that brings up a listing

David
it doesn't
 
Old 08-22-2005, 05:02 AM   #6
tp11235
Member
 
Registered: Feb 2005
Posts: 106
Blog Entries: 1

Rep: Reputation: 15
Firewalls and ports

The firewalls should be up and running!!

The nameservice daemon (nmbd) listens for UDP traffic on port 137 and 138.
Samba itself (smbd) listens for TCP traffic on port 139 and 445.

Go into your firewalls (including the windows firewall) and just open those ports.

However, this will probably not be enough. I have posted my SMB.CONF in case it helps. This works for an Win XP Pro laptop connecting to a SuSE 9.1 server running Samba 3.02.

# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2005/08/19 10:32:46

# Global parameters
[global]
workgroup = MSHOME
server string = Linux samba server
password server =
passdb backend = smbpasswd, guest
log level = 2
preferred master = Yes
domain master = Yes
wins proxy = Yes
wins support = Yes
ldap ssl = no
idmap uid = 1-9999
idmap gid = 1-9999
hosts allow = 192.168.1.

[home]
comment = Home directories on Linux
path = /home
read only = No
guest ok = Yes

[Tim]
comment = Tim directory
path = /home/Tim
read only = No
guest ok = Yes

[judith]
comment = Judiths share
path = /home/judith
read only = No
guest ok = Yes

Notes:

I think that setting the linux box as the master browser might be important - it seemed to solve my problems. I am uncertain as to whether it is important that it is also the domain master - I am experimenting with that.

I think it might be important that your server is running before the windows boxes come on line.

Try logging into the share from the windows box as root. This got me past the connection problems and into the password problems which are easier to solve.

I also spent time getting winbind working. It is not necessary for the sharing in my network (I am not running it now), but it is possible that in getting it to work I fixed something else that was important.

Last but not least, have you tried working through the fault diagnostics in the Samba documentation. They are very thorough - don't try to skip steps no matter how boring they are. This is what got me working. http://de.samba.org/samba/docs/man/S...iagnosis.html.

Hope this helps. Tim.

 
Old 08-22-2005, 05:17 AM   #7
tp11235
Member
 
Registered: Feb 2005
Posts: 106
Blog Entries: 1

Rep: Reputation: 15
Exclamation Stop Press - Winbind

Hi,

Sorry - Linux networking is very much a work in progress for me. My experiments have revealed that Winbind was essential for me. Without it you can share files (that is why my network was working without it). HOWEVER, you need it to do the browsing in Windows Network Neighbourhood or with the Add Network Place wizard that sets up the network in the first place.

The Winbind daemon (winbindd) needs to be started last of the three. It has a log (mine is in /var/log/samba) that is bery informative if you set logging level 2 in the SMB.CONF file. I think my critical fix was to set the UID ranges in SWAT to accommodate the actual UIDs in my Linux setup. This error was flagged to me in the log file.

Cheers

Tim.
 
Old 08-22-2005, 08:40 AM   #8
tp11235
Member
 
Registered: Feb 2005
Posts: 106
Blog Entries: 1

Rep: Reputation: 15
Also - LMHOSTS

I finally got my second XP machine connected. It had the NT_STATUS_LOGON_FAILURE error and sometimes could not see the server at all. In the fault diagnostics I mentioned in a previous post, when I tried to ping the linux box from the XP box using the server name it did not recognise the name.

I solved this and got the network working by creating a LMHOSTS file on the XP box and importing it. There is documentation on this in the XP help system:

Go to Network Connections and right click on the network connection you are using then select properties.
Scroll down to Internet Protocol and select properties for that, then "advanced"
You might as well check everything here, but you probably know this stuff.

Under DNS I added the IP of my Linux server as a DNS server (lowest priority).
Under WINS I added my server as a WINS server. (I have enabled WINS support in my SAMBA setup).
Then select Enable LMHOSTS lookup.

I then created a simple textfile (using Notepad) to list the boxes on my network by IP and their names. Just the IP address, a space and the name:

192.168.1.22 linux
192.168.1.23 laptop

etc.

This has to be saved in C:/WINDOWS/System32/Drivers/etc

On my XP boxes I found a sample file for this: LMHOSTS.SAM with a lot of documentation commented into it. This included the option to append '#PRE' to each line to ensure the names are preloaded into the name cache (I don't understand enough about windows to know what is going on but I tried it and it worked).

Once you have your file saved as LMHOSTS (no extension) you can click on "Import LMHOSTS".

At this point my XP box found the linux box and the shares and I was running.

Cheers

Tim.
 
  


Reply



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
ntfs partition no more visible from windows after linux install fif Linux - Newbie 4 05-18-2005 01:12 AM
Linux is not visible after a Windows FIXMBR command ikhanr Linux - Newbie 6 10-23-2004 01:26 PM
Linux (Cups) printer visible to windows, invisible to linux boxes ? johnvoisey Linux - Networking 2 02-27-2004 02:57 AM
Making Linux invisible to MS with Samba Vincent_Vega Linux - Networking 5 01-23-2004 12:11 AM
is windows extended partion free space visible to linux fdisk purplesky Linux - General 1 11-12-2002 07:27 PM

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

All times are GMT -5. The time now is 09:30 AM.

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
Open Source Consulting | Domain Registration