dslreports logo
 
    All Forums Hot Topics Gallery
spc
uniqs
631
Eradicator8
join:2002-10-16
07555

Eradicator8 to vwpirate

Member

to vwpirate

Re: Samba Loopback error - sharing problem

Nov 6 21:32:19 localhost smb: smbd shutdown failed
Nov 6 21:32:20 localhost smb: nmbd shutdown failed
Nov 6 21:32:20 localhost smb: smbd startup succeeded
Nov 6 21:32:20 localhost smbd[1985]: [2003/11/06 21:32:20, 0] lib/util_sock.c:open_socket_in(804)
Nov 6 21:32:20 localhost smbd[1985]: bind failed on port 139 socket_addr = 192.168.123.1.
Nov 6 21:32:20 localhost smbd[1985]: Error = Cannot assign requested address
Nov 6 21:32:20 localhost nmbd[1995]: [2003/11/06 21:32:20, 0] lib/util_sock.c:open_socket_in(804)
Nov 6 21:32:20 localhost nmbd[1995]: bind failed on port 137 socket_addr = 192.168.123.1.
Nov 6 21:32:20 localhost nmbd[1995]: Error = Cannot assign requested address
Nov 6 21:32:20 localhost nmbd[1995]: [2003/11/06 21:32:20, 0] nmbd/nmbd_subnetdb.c:make_subnet(139)
Nov 6 21:32:20 localhost nmbd[1995]: nmbd_subnetdb:make_subnet()
Nov 6 21:32:20 localhost nmbd[1995]: Failed to open nmb socket on interface 192.168.123.1
Nov 6 21:32:20 localhost nmbd[1995]: for port 137.
Nov 6 21:32:20 localhost nmbd[1995]: Error was Cannot assign requested address
Nov 6 21:32:20 localhost nmbd[1995]: [2003/11/06 21:32:20, 0] nmbd/nmbd.c:main(872)
Nov 6 21:32:20 localhost nmbd[1995]: ERROR: Failed when creating subnet lists. Exiting.
Nov 6 21:32:20 localhost smb: nmbd startup succeeded

Does this help?

Why do I see 192.168.123.1 shown, is that supposed to by my linux box ip?

vwpirate
Premium Member
join:2001-02-06
Winter Park, FL

vwpirate

Premium Member

It is trying to bind to that ip address. It is normal. It is failing bind to the netbios ports though. Try to add a # in front of the bind to ipaddress line in you smb.conf file. Then service smb restart. Then netstat -an.
vwpirate

vwpirate to Eradicator8

Premium Member

to Eradicator8
What is your ip addy. Type ifconfig to find it.
Eradicator8
join:2002-10-16
07555

Eradicator8 to vwpirate

Member

to vwpirate
I did that and I changed the interfaces line to read

interfaces = 192.168.123.2/24 127.0.0.1/24

I did not get the OK on samba till I changed the ip

and not I get this

[root@localhost samba]# /etc/rc.d/init.d/smb restart
Shutting down SMB services: [ OK ]
Shutting down NMB services: [FAILED]
Starting SMB services: [ OK ]
Starting NMB services: [ OK ]

and

[root@localhost samba]# netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:32768 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:32770 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:901 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN
tcp 1 0 192.168.123.25:33032 209.123.205.210:80 CLOSE_WAIT
udp 0 0 0.0.0.0:32768 0.0.0.0:*
udp 0 0 0.0.0.0:68 0.0.0.0:*
udp 0 0 0.0.0.0:111 0.0.0.0:*
Eradicator8

Eradicator8

Member

eth0 Link encap:Ethernet HWaddr 00:50:04:72:5C:1F
inet addr:192.168.123.25 Bcast:192.168.123.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3089 errors:0 dropped:0 overruns:0 frame:0
TX packets:3558 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:1917332 (1.8 Mb) TX bytes:886096 (865.3 Kb)
Interrupt:11 Base address:0x1400

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:220 errors:0 dropped:0 overruns:0 frame:0
TX packets:220 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:32938 (32.1 Kb) TX bytes:32938 (32.1 Kb)

vwpirate
Premium Member
join:2001-02-06
Winter Park, FL

vwpirate to Eradicator8

Premium Member

to Eradicator8
Change this:
interfaces = 192.168.123.2/24 127.0.0.1/24

to this:
interfaces = 192.168.123. 127.

then type service smb restart

**note the period at the end of the ip address**
vwpirate

vwpirate to Eradicator8

Premium Member

to Eradicator8
After you do those commands type:

smbclient '//windowsxp/public'
Eradicator8
join:2002-10-16
07555

Eradicator8 to vwpirate

Member

to vwpirate
I made those changes...it looks like this now

# Global parameters
[global]
workgroup = HOME
netbios name = windowsxp
server string = Linux
interfaces = 192.168.123. 127.
# bind interfaces only = Yes
security = user
encrypt passwords = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
unix password sync = Yes
log file = /var/log/samba/log.%m
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = lpstat
dns proxy = No
printing = cups
hosts allow = 192.168.123. 127.

[homes]
comment = Home Directories
read only = No
browseable = No

[public]
comment = Public Stuff
path = /data/mp3
read list = kevin, mdk, Computer
write list = kevin, mdk, Computer

[public2]
comment = Public Stuff
path = /home
read list = kevin, mdk, Computer
write list = kevin, mdk, Computer

[root@localhost samba]# service smb restart
Shutting down SMB services: [ OK ]
Shutting down NMB services: [FAILED]
Starting SMB services: [ OK ]
Starting NMB services: [ OK ]

[root@localhost samba]# smbclient '//windowsxp/public'
can't determine netmask for 192.168.123.
can't determine netmask for 127.
WARNING: no network interfaces found
Connection to windowsxp failed

out of ideas yet?

vwpirate
Premium Member
join:2001-02-06
Winter Park, FL

vwpirate

Premium Member

Crap. Missed this.
Change this:

interfaces= 192.168.123. 127.

to this
#interfaces= 192.168.123. 127.

then service smb restart

then try to connect again.
Eradicator8
join:2002-10-16
07555

Eradicator8

Member

should i have the windowsxp address 192.168.123.2 in my hosts file?
Eradicator8

Eradicator8

Member

getting somewhere now

[root@localhost samba]# smbclient '//windowsxp/public'
added interface ip=192.168.123.25 bcast=192.168.123.255 nmask=255.255.255.0
Got a positive name query response from 192.168.123.25 ( 192.168.123.25 )
Password:
session setup failed: NT_STATUS_LOGON_FAILURE

I thought my password is the one on my xp machine?

vwpirate
Premium Member
join:2001-02-06
Winter Park, FL

vwpirate to Eradicator8

Premium Member

to Eradicator8
That really isn't necessary. Your ip is 192.168.123.25 though. The hosts file is used for resoving names like www.yahoo.com to an ip address. I use it on my locale network so I don't have to setup a dns server just for that purpose.
vwpirate

vwpirate to Eradicator8

Premium Member

to Eradicator8
You are logged in as root so use the root password.
Eradicator8
join:2002-10-16
07555

Eradicator8

Member

actually I am using SU in the console...I forget my password as I am logged in under kevin right now...I will try to reset my password if that matters

I did try the root password and it did not work
Eradicator8

Eradicator8

Member

well that did not work....hmmm

what is that UNIX password synch for?

vwpirate
Premium Member
join:2001-02-06
Winter Park, FL

vwpirate to Eradicator8

Premium Member

to Eradicator8
If you are still in su when you try the smbclient then it is still using the root password. If it fails with kevin also then type
smbpasswd -a kevin

you can also do this command if the previous works.
smbpasswd -a root

it will then propt you for a password. This is just to get into the shares not to log into the machine.
Eradicator8
join:2002-10-16
07555

Eradicator8

Member

YAY!!!!

That worked...now what

vwpirate
Premium Member
join:2001-02-06
Winter Park, FL

vwpirate

Premium Member

That pretty much it. As long as the workgroup name is the same on the other pc's, your linux box should be seen in network neighborhood. You may want to use the smbpasswd command with the usernames you are logging into the other pc's with.
Eradicator8
join:2002-10-16
07555

Eradicator8

Member

THANKS SO MUCH

I can see my directories on my xp box now. What was the problem if you had to summarize it?

Will it work if I reboot?

Thanks
Thanks
Thanks

I will check in with you tomorrow

vwpirate
Premium Member
join:2001-02-06
Winter Park, FL

vwpirate

Premium Member

No problem. The biggest problem with the interface line. It was trying to bind to an ip address that didn't exist on the system. The other was the hosts allow line which was doing similar things.
vwpirate

vwpirate to Eradicator8

Premium Member

to Eradicator8
Yes it should work if you reboot. I think those two lines were causing it not to startup correctly.