LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-11-2003, 12:55 PM   #1
dopper
Member
 
Registered: Jun 2003
Location: Canada
Distribution: Muppy 006 (puppy 2.12 derivative) & Ubuntu 6.06 LTS Dapper Drake, ipcop 1.4.13
Posts: 52

Rep: Reputation: 15
samba issues connecting to localhost


I'm having issues running a script that uses the hostnames of the machines on my lan. When I try to connect from a machine with the hostname amd1400 with the smbclient to amd1400 I get an error. However, when I connect to 127.0.0.1 from amd1400 it allows me to connect.

I notice that when I connect by hostname it tries 127.0.0.2 instead of 127.0.0.1. What would cause this and is there a way around it?

amd1400:/etc/samba # smbclient -L amd1400 -U myaccount
added interface ip=192.168.2.13 bcast=192.168.2.255 nmask=255.255.255.0
added interface ip=127.0.0.1 bcast=127.255.255.255 nmask=255.0.0.0
error connecting to 127.0.0.2:139 (Connection refused)
Error connecting to 127.0.0.2 (Connection refused)
Connection to amd1400 failed
amd1400:/etc/samba # smbclient -L 127.0.0.1 -U myaccount
added interface ip=192.168.2.13 bcast=192.168.2.255 nmask=255.255.255.0
added interface ip=127.0.0.1 bcast=127.255.255.255 nmask=255.0.0.0
Password:
Domain=[DOPP_LAN] OS=[Unix] Server=[Samba 2.2.7a-SuSE]

Sharename Type Comment
--------- ---- -------
print$ Disk Printer Drivers
share2 Disk file server
share1 Disk file server upload location
backups Disk backup system
cdrom Disk CD-ROM
ipc$ IPC IPC Service (amd1400 Samba Server)
ADMIN$ Disk IPC Service (amd1400 Samba Server)
myaccount Disk Home Directories

Server Comment
--------- -------
AMD1400 Dopper's amd1400 Samba Server
PPRO200 Another Samba Server

Workgroup Master
--------- -------
DOPP_LAN PPRO200
amd1400:/etc/samba #
 
Old 09-11-2003, 06:58 PM   #2
lyle_s
Member
 
Registered: Jul 2003
Distribution: Slackware
Posts: 389

Rep: Reputation: 52
Is it only with samba, or with anything? Maybe you made a typo in /etc/hosts?

Normally, amd1400 shouldn't resolve to the loopback device (127.0.0.1) anyway; localhost should. amd1400 should resolve to a LAN network device.

If you're still having problems post the output of these commands:

/sbin/ifconfig
cat /etc/hosts
ping -c1 amd1400
ping -c1 localhost

Lyle
 
Old 09-11-2003, 08:38 PM   #3
ufgeek
LQ Newbie
 
Registered: Aug 2003
Location: Univeristy of Florida
Distribution: Redhat 9, Debian Sid
Posts: 7

Rep: Reputation: 0
Make sure that he first uncommented line of your /etc/hosts file looks like this:

Code:
127.0.0.1     localhost.localdomain     localhost
Also make sure there are no references to 127.0.0.2

also make sure that your samb lmhosts file (in redhat /etc/samba/lmhosts) looks something like this:

Code:
127.0.0.1     localhost
192.168.0.2     server_name
/geek
 
Old 09-12-2003, 08:33 AM   #4
dopper
Member
 
Registered: Jun 2003
Location: Canada
Distribution: Muppy 006 (puppy 2.12 derivative) & Ubuntu 6.06 LTS Dapper Drake, ipcop 1.4.13
Posts: 52

Original Poster
Rep: Reputation: 15
thanks for the help

For some reason this was in my /etc/hosts file

127.0.0.2 amd1400.localdomain amd1400

However I didn't enter it so I'm not sure how it got there.

Last edited by dopper; 09-12-2003 at 09:55 AM.
 
Old 09-12-2003, 03:07 PM   #5
ufgeek
LQ Newbie
 
Registered: Aug 2003
Location: Univeristy of Florida
Distribution: Redhat 9, Debian Sid
Posts: 7

Rep: Reputation: 0
So making changing that line to
127.0.0.1 localhost.localdomain localhost

and adding the

127.0.0.1 amd1400


worked?


Just want to make sure there isn't any other weirdness going on, which might creep up later.

/geek
 
Old 09-12-2003, 04:14 PM   #6
dopper
Member
 
Registered: Jun 2003
Location: Canada
Distribution: Muppy 006 (puppy 2.12 derivative) & Ubuntu 6.06 LTS Dapper Drake, ipcop 1.4.13
Posts: 52

Original Poster
Rep: Reputation: 15
yes

yes changing the entry to 127.0.0.1 in /etc/hosts and since that worked. I should've known to check there first because I had narrowed it down to knowing it was only resolving the hostname to 127.0.0.2 that wasn't working but for some reason I didn't think to check /etc/hosts because I hadn't added an entry for 127.0.0.2

This is how I edited /etc/hosts:

127.0.0.1 amd1400.mydomain.com amd1400

Last edited by dopper; 09-12-2003 at 04:20 PM.
 
  


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 to localhost using PPPoE zWaR Linux - Networking 5 10-17-2005 12:16 AM
Samba - Connecting from WinXP Pro to Samba running on Debian critical Linux - Networking 1 02-03-2005 09:36 AM
localhost.localdomain issues mebrelith Fedora 2 11-25-2004 12:07 AM
Samba connects @ localhost but not @ netbios name biglaz Linux - Networking 5 10-19-2004 01:22 PM
change hostname from localhost in samba Sathington Linux - Newbie 4 04-07-2004 05:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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