LinuxQuestions.org
Help answer threads with 0 replies.
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 07-07-2003, 05:34 PM   #1
paranoia1980
Member
 
Registered: Jun 2003
Location: LA
Distribution: RedHat Linux 7.1
Posts: 34

Rep: Reputation: 15
Question About configuring Samba to work w/ Windows 2000


Hi all,

I have RedHat 7.1 and samba 2.0.7-36 installed on my computer. My task is to configure my Linux machine as a Samba server so that I can log into it from my Windows 2000 machine.

The followings are the steps I tried:

1. "cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd"
2. "chmod 600 /etc/samba/smbpasswd"
3. "smbpasswd root" and then enter a new password.
4. Uncomment the following lines in the /etc/samba/smb.conf file:

encrypt password = yes
smb passwd file = /etc/samba/smbpasswd

5. Update the following two lines:

workgroup = DOMAIN (which is the name of the workgroup of my Windows 2000 machine)
server string = Samba Server

6. "service smb restart".

When I tried to access my Linux machine in Windows 2000 under "My Network Places"->"Microsfot Windows Network"->"domain", I saw my Linux machine with the name "Localhost" and the description string "Samba Server".

However, when I tried to double-click it, it said

\\Localhost is not accessible
A duplicate name exists on the network

When I right-clicked and selected properties, it said

The server Localhost does not accept remote requests

The hostname of my Linux machine isn't Localhost, as it showed "MARTIAN" (which is the name I assiged to it) when I typed "hostname" in a Linux shell prompt.

Does anybody have a clue as of what's going on in my situation? Any kind of pointer is appreciated, thanks!
 
Old 07-07-2003, 06:01 PM   #2
ikw38
Member
 
Registered: Nov 2002
Location: Dallas
Distribution: RedHat 8
Posts: 270

Rep: Reputation: 30
Gee I thought I was the only one going crazy on this for 3 days now... If you get an answer I would deeply apreciate you emailing me with results.
I have done configuration changes- reinstalled Samba I still get this error over and over again...

"The following Error occurred when trying to join the smis domain..
Then account used is a computer account. User your global or local account to access this server".

It getting like Kurt Vonneguts "Slaughter House Five" and so it goes....

Very frustrating so far and it no fun not have success sometimes...

Thanks
ikw38
 
Old 07-07-2003, 06:09 PM   #3
akolff
Member
 
Registered: Jan 2002
Location: Milwaukee
Distribution: Ubuntu Server 12.04.1 LTS & Mint 17
Posts: 38

Rep: Reputation: 4
Possible source of answers

I'm so new at this Samba thing that this may not be germaine.

However, I have solved a few of my problems using this troubleshooting file

ftp://ftp.stratus.com/pub/vos/customers/samba/

I got it from Samba.org

This page also provided a TON of help in understanding and configuring Samba.

http://us3.samba.org/samba/docs/

God Bless you,
Al Kolff

"There is a God we want, and there is a God who is. They are not the same God. The turning point of our lives is when we stop seeking the God we want and start seeking the God who is."
Patrick Morley
Seven Seasons of the Man in the Mirror
p184
 
Old 07-09-2003, 11:50 AM   #4
paranoia1980
Member
 
Registered: Jun 2003
Location: LA
Distribution: RedHat Linux 7.1
Posts: 34

Original Poster
Rep: Reputation: 15
How to open the port 137?

I found that the Linux machine and Windows 2000 machine can only ping each other by their IP addresses, but not their Netbios name. I tried to

nbtstat -a 192.168.0.8 (which is the IP address of my Linux machine)

in a DOS prompt on my Windows 2k machine, but it said "Host not found". Some trouble shooting guide suggests that it's because the port 137 is blocked. Do you know how I can open up the port 137? Thanks a lot!
 
Old 07-09-2003, 11:59 AM   #5
hakcenter
Member
 
Registered: Apr 2003
Location: Not to far from the computer screen
Distribution: RedHat 9.0
Posts: 324

Rep: Reputation: 30
open the port by disabling the firewall.

or

iptables -A INPUT -p tcp --dport 137 -j ACCEPT
iptables -A INPUT -p udp --dport 137 -j ACCEPT
 
Old 07-09-2003, 03:25 PM   #6
paranoia1980
Member
 
Registered: Jun 2003
Location: LA
Distribution: RedHat Linux 7.1
Posts: 34

Original Poster
Rep: Reputation: 15
Hi hakcenter

I disabled the firewall by

service iptables stop

and now I can't even start the smbd and nmbd daemons! I'm not sure if this is related to the disabling of the firewall, but I could start the two daemons with

service smb start

or

samba start

before I did that "service iptables stop". Is there a way to enable the firewall again? Thanks a lot!
 
Old 07-10-2003, 11:37 AM   #7
paranoia1980
Member
 
Registered: Jun 2003
Location: LA
Distribution: RedHat Linux 7.1
Posts: 34

Original Poster
Rep: Reputation: 15
Sovled the previous problem, but still...

My hostname was "localhost.localdomain" originally and I changed it to "Martian" by editing the /etc/sysconfig/network file. I rebooted and tried to start Samba but it wouldn't run. So I looked into the nmb.log file in /var/log/samba and saw the line

Get_Hostbyname: Unknown host Martian

So I changed it back to "localhost.localdomain" and rebooted. Now I can start Samba.

However, on the Linux machine, I still can't ping itself using its Netbios name. Its Netbios name is "Martian" as I set in the smb.conf file, and the IP address of the WLAN card installed on the Linux machine is 192.168.0.8. I did

ping 192.168.0.8

and

ping 127.0.0.1

and it succeeded to ping itself. However, when I did

ping Martian

ping: Unknown host Martian

I've already disabled the firewall by

service iptables stop

and I think the ports 137-139 should be open by doing this. However, this still can't solve my problem.

I tried to do a

nmblookup -T DOMAIN#1b (DOMAIN is the name of the workgroup the other Windows machines are in)

and it reported "192.168.0.2 DOMAIN<1b>" so the domain master browser is the Windows 2000 server machine (IP: 192.168.0.2) on my network.

I also did a

nmblookup HOST (where host is the Netbios name of any machine in the workgroup DOMAIN)

and I could get the IP address of EVERY Windows machine on the network EXCEPT the Linux machine itself! (neither "nmblookup Martian" nor "nmblookup localhost.localdomain" worked).

Finally, when I checked the nmb.log file after Samba was started for a while, I saw the line

Samba name server is now a local master browser for workgroup DOMAIN on subnet 192.168.0.8

Could someone solve my problem? I can provide any information you need... Thanks a lot!
 
Old 07-10-2003, 12:14 PM   #8
ikw38
Member
 
Registered: Nov 2002
Location: Dallas
Distribution: RedHat 8
Posts: 270

Rep: Reputation: 30
Be in root.
try disabling the iptables
cd /etc/samba
samba#iptables -a off (could be -al)
samba# samba stop
samba# samba restart

I don't know if this 100% command perfect but the idea is to turn them off and see what kind of results you get.
With mine I found that they were somehow interfering with my router which would in effect cause a collision on the network. Because you in effect have two routers hitting head on.

Hope this helps,

ikw38
 
Old 07-10-2003, 01:29 PM   #9
paranoia1980
Member
 
Registered: Jun 2003
Location: LA
Distribution: RedHat Linux 7.1
Posts: 34

Original Poster
Rep: Reputation: 15
Hi ikw38

I found that the command

iptables -a (or -al) off

didn't work. Actually, I can turn off the iptables by

service iptables stop

Is it correct? However, I still cannot ping myself using the NetBIOS name of my Linux machine, that is, Martian. Let me clear things up a little bit: (For my Linux machine)

hostname: localhost.localdomain
NetBIOS name: Martian

I can "ping localhost.localdomain" but I can't "ping Martian" or any other Windows machine by their hostnames.

After playing w/ the smbclient command for a while, here's what I've found. I did "smbclient //windows_server/some_folder -Usome_name" where

windows_server: the hostname of the Windows 2000 Server machine on my netowrk

some_folder: a folder it shares

some_name: the name I log on to it from my Windows 2000 machine.

and I could access the some_folder from my Linux machine! I also did a "smbclient //localhost.localdomain/tmp -U root" and I could also access the share I specified in smb.conf on my Linux machine.

When I tried to access my Linux machine in Windows 2000 under "My Network Places"->"Microsfot Windows Network"->"domain", I saw my Linux machine with the name "Martian" and the description string "Samba Server".

However, when I tried to double-click it, it said

\\Martian is not accessible
The network path was not found

When I right-clicked and selected properties, it said

The server Martian cannot be found on the network

So I can access from Linux to Windows with smbclient, but not from Windows to Linux with "My Network Places" or "net use". Can somebody figure what's going on? Thanks a lot!
 
Old 07-13-2003, 08:27 AM   #10
WhiteHowler
LQ Newbie
 
Registered: Jul 2003
Posts: 3

Rep: Reputation: 0
I'm having the exact same problem. I can mount my Windows shares from my LINUX box (RedHat 9) with no problems. I cannot, however, get to my Samba shares from either of my Windows machines (one running Win2k, one running 98).

I can ping the LINUX box by both IP and hostname, and it is showing up in Network Neighborhood correctly (it's even in the right Workgroup!). When I try to navigate to it in Windows Explorer, I get: "\\machinename is not accessible. The network path was not found."

I have also tried navigating with:
\\machinename
\\machinename\sharename
\\machineIP
\\machineIP\sharename

Nothing works, unfortunately.

I did turn password encryption on in my smb.conf file, and I created a user with the same username/password as my Windows login on the LINUX machine. After adding the user/password with smbpasswd, it still won't let me in.

(Note: As for the ping problem, I was getting the same thing. All I had to do was add the local machine name in my \etc\hosts file. Suddenly the LINUX box knew "who it was". )
 
Old 07-13-2003, 01:05 PM   #11
paranoia1980
Member
 
Registered: Jun 2003
Location: LA
Distribution: RedHat Linux 7.1
Posts: 34

Original Poster
Rep: Reputation: 15
Hi WhiteHowler

I managed to solve my problem by turning the firewall off. Some people told me to turn it off by

service iptables stop

but it didn't work for me. Then, I found that there's a tool called "lokkit" for RedHat Linux. Just type

lokkit

at your command prompt and you'll be directed to a page where you can set the security level of the firewall. You can simply turn it off there. After I turn it off, every thing works fine for me. If you're not using RedHat Linux, you may wanna ask other ppl for the proper way of turning the firewall off.

Hope this helps =)
 
Old 07-13-2003, 06:08 PM   #12
WhiteHowler
LQ Newbie
 
Registered: Jul 2003
Posts: 3

Rep: Reputation: 0
Re: Hi WhiteHowler

Quote:
Originally posted by paranoia1980
I managed to solve my problem by turning the firewall off.

Hope this helps =)
It worked perfectly!

Strangely, I could have sworn that when RedHat was first installing, it asked whether I wanted the firewall set up and I said "No" (since I'm already behind a hardware firewall). Ah well, everything seems to be working now (and I can use SSH too!).

Thanks for all the help.
 
  


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
Samba+Windows 2000 Jimi_l SUSE / openSUSE 3 02-20-2005 10:24 AM
Samba 3/Windows 2000 Integration markham82 Linux - Networking 1 11-19-2004 11:10 AM
Samba and Windows 2000 aeb105 Linux - Newbie 11 08-17-2003 04:44 PM
Samba, RedHat 7.2, Windows 2000 bananaman Linux - Newbie 7 04-16-2003 10:39 PM
Opinion, does samba+winbind work well with windows 2000+active directory? tisource Linux - Networking 5 02-23-2003 01:34 AM

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

All times are GMT -5. The time now is 07:06 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