LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 08-22-2004, 09:30 AM   #1
ulaoulao
Member
 
Registered: Jul 2004
Posts: 36

Rep: Reputation: 15
samba / wins /netbios


Basicly I have four computers two that pull from one gateway and two that pull from another.This is DHCP from my ISP. Why they force me to use two gateways I dont know. I would like to know if Samba uses netbios or if there is a way to set up my linux box as a WINS server. Or can I add a second ip say 192.168.1.25 to my currently pulled DHCP ip.



this is my Xandros/debian smb.conf:

#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentary and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not many any basic syntactic
# errors.
#

#======================= Global Settings =======================


[global]
workgroup=@home
server string=%h (Xandros Desktop)
dns proxy=no
name resolve order=lmhosts wins bcast host
log file=/var/log/samba/log.%m
max log size=1000
syslog=0
panic action=/usr/share/samba/panic-action %d
security=SHARE
encrypt passwords=true
passdb backend=tdbsam guest
obey pam restrictions=yes
invalid users=root
map to guest=Bad User
passwd program=/usr/bin/passwd %u
passwd chat=*Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
client use spnego=no
load printers=no
printing=cups
printcap name=cups
socket options=TCP_NODELAY
display charset=iso8859-1
unix charset=iso8859-1
preserve case=yes
case sensitive=no
short preserve case=yes
os level=20
; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom


[fake_windows]
public=yes
browseable=yes
path=/home/s_k_u_n_x/s_k_u_n_x_old/.cxoffice/dotwine/fake_windows
writeable=yes
force user=s_k_u_n_x
comment=c
max connections=0
available=yes
 
Old 08-22-2004, 03:03 PM   #2
hob
Senior Member
 
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
There's no problem with making a Samba server the WINS server for a network. Try something like this stanza in smb.conf:

# Settings to make this server the WINS server
local master = yes
domain master = yes
preferred master = yes
wins support = yes

You also need to increase the 'os level' setting (to 65). A low value can allow a Windows machine to take control of network browsing.
 
Old 08-23-2004, 07:59 PM   #3
ulaoulao
Member
 
Registered: Jul 2004
Posts: 36

Original Poster
Rep: Reputation: 15
this is what I have so far:

[global]
workgroup = @home
domain master = Yes
local master = Yes
preferred master = Yes
hosts allow = ALL
interfaces = 192.168.0.19
wins support = yes
security = user

server string=%h (Xandros Desktop)
dns proxy=no
name resolve order=lmhosts wins bcast host
log file=/var/log/samba/log.%m
max log size=1000
syslog=0
panic action=/usr/share/samba/panic-action %d
security=SHARE
encrypt passwords=true
passdb backend=tdbsam guest
obey pam restrictions=yes
invalid users=root
map to guest=Bad User
passwd program=/usr/bin/passwd %u
passwd chat=*Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
client use spnego=no
load printers=no
printing=cups
printcap name=cups
socket options=TCP_NODELAY
display charset=iso8859-1
unix charset=iso8859-1
preserve case=yes
case sensitive=no
short preserve case=yes
os level=20
; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom





I can connect to my linux box from any computer using \\192.168.0.19 but I can not connect to any computer at all from my linux box not even it's self


this is my ifconfig out put:


xanux:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:042:4F:60
inet addr: *.*.*.* Bcast:255.255.255.255 Mask:255.255.248.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2603 errors:0 dropped:0 overruns:0 frame:0
TX packets:68 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:162116 (158.3 KiB) TX bytes:6926 (6.7 KiB)
Interrupt:10 Base address:0xe800

eth0:1 Link encap:Ethernet HWaddr 00:50:042:4F:60
inet addr:192.168.0.19 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:10 Base address:0xe800

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:97 errors:0 dropped:0 overruns:0 frame:0
TX packets:97 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:50413 (49.2 KiB) TX bytes:50413 (49.2 KiB)

xanux:~#

Last edited by ulaoulao; 08-23-2004 at 09:52 PM.
 
Old 08-24-2004, 05:45 AM   #4
hob
Senior Member
 
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
This may be the problem:

interfaces = 192.168.0.19

I had to add 127.0.0.1 when playing with this option - the linux system presumably connects to itself over the loopback interface.

Again, I'd increase the OS level to make absolutely sure that Samba can't lose control of browsing during an election. The default level of 20 is to help ensure that a new Samba installation does not win control and disrupt existing networks.

BTW, the listing that you've given has two security settings:

security = user

and

security=SHARE
 
Old 08-24-2004, 04:36 PM   #5
ulaoulao
Member
 
Registered: Jul 2004
Posts: 36

Original Poster
Rep: Reputation: 15
I have to be missing something here?


[global]
workgroup = @home
domain master = Yes
local master = Yes
preferred master = Yes
hosts allow = ALL
interfaces = 192.168.0.19 127.0.0.1
wins support = yes
netbios name = Xandros1
server string=%h (Xandros Desktop)
dns proxy=no
name resolve order=lmhosts wins bcast host
log file=/var/log/samba/log.%m
max log size=1000
syslog=0
panic action=/usr/share/samba/panic-action %d
security=SHARE
encrypt passwords=true
passdb backend=tdbsam guest
obey pam restrictions=yes
invalid users=root
map to guest=Bad User
passwd program=/usr/bin/passwd %u
passwd chat=*Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n
\n .
client use spnego=no
load printers=no
printing=cups
printcap name=cups
socket options=TCP_NODELAY
display charset=iso8859-1
unix charset=iso8859-1
preserve case=yes
case sensitive=no
short preserve case=yes
os level=65
; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom


computer A xandros1 (linux 192.168.0.19)
can now connect to its self only
can ping 192.1678.0.21

computer B dino (win2k 192.168.0.21)
can now connect to its self and 192.168.0.19
can ping 192.1678.0.19


xanux:/etc/samba# smbclient //192.168.0.21/c$
Connection to 192.168.0.21 failed
xanux:/etc/samba#

or

xanux:/etc/samba# smbclient //dino/c$
Connection to dino failed
xanux:/etc/samba#
 
Old 08-24-2004, 05:36 PM   #6
hob
Senior Member
 
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
The Samba client doesn't rely on the Samba server, except for WINS resolution. It sounds like the Samba server is working fine (although strictly security = share is obsolete, and you should probably use security = user).

You have to supply the username and password of an account that is valid for the Win2k machine. If you don't specify a username, smbclient tries the name of the Linux account that you are logged in as.

First try:

smbclient -L 192.168.0.21 -U bob

where 'bob' is the name of any valid account for the Win2k system. That should give a list of shares.

C$ is only accessible if the account that you are using is a member of the Administrators group. It is not good practice to use "Administrator" to login over the network , so you should use another account that is a member of Administrators.

smbclient //192.168.0.21/c$ -U bob

where 'bob' is an Administrator.

If smbclient -L doesn't work at all then it's probably a WINS/name resolution issue.
 
Old 08-24-2004, 05:53 PM   #7
ulaoulao
Member
 
Registered: Jul 2004
Posts: 36

Original Poster
Rep: Reputation: 15
its so funny you say this I was just reading up on smbclient command and tried this in the mean time.


xanux:/etc/samba# smbclient -L 192.168.0.21 -U administrator
Password:

Sharename Type Comment
--------- ---- -------
IPC$ IPC Remote IPC
c Disk
ADMIN$ Disk Remote Admin
C$ Disk Default share
Connection to 192.168.0.21 failed
NetBIOS over TCP disabled -- no workgroup available

although

smbclient //192.168.0.21/temp -U root <---- i added root to my 2k
works fine but not the smbclient //dino/romz -U root



I'm strarting to think this is becoming a windows issue. I connected to another linux box just fine?

Last edited by ulaoulao; 08-25-2004 at 11:46 AM.
 
Old 08-25-2004, 09:52 AM   #8
hob
Senior Member
 
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
The man page for smbclient says that name resolution is done by WINS etc., so if the IP works but not the name then it's a naming problem.

One thought - have you set the clients to use the Linux server as a WINS server ? If not then the name of the Win2k box won't be registered with the WINS service, which might account for the problem.
 
Old 08-25-2004, 11:44 AM   #9
ulaoulao
Member
 
Registered: Jul 2004
Posts: 36

Original Poster
Rep: Reputation: 15
.

All the windows systems have the correct ip for their wins yes. I used the hosts. files for the windows name resulotion but this is nothing more then a work around.

As I understand it the wins server picks up the names on client bootup. But how can one check? does it register it in the /etc/hosts file? if so its not there. or is it the /etc/resolv.conf:

mine has nothing but isp junk?


nameserver 24.95.227.39 # dhcp: eth0
nameserver 24.95.227.40 # dhcp: eth0
nameserver 65.32.1.79 # dhcp: eth0
search cfl.rr.com


Also do you happen to know how you would set up the windows systems. This is what I understand. I set up tcp/ip to use wins ip(190.168.0.19) no netbios and no lmhost. I tried useing netbios but that only helps my see the other windows clients.

Last edited by ulaoulao; 08-25-2004 at 03:20 PM.
 
Old 08-25-2004, 04:17 PM   #10
hob
Senior Member
 
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
WINS name resolution is separate to DNS name resolution - it's really part of a parallel (and obsolete) system. It gets confusing because MS used UNIX/IP technology for Win2k and kludged in support for their older network technologies, so you end up with weird stuff like NetBIOS-over-TCP/IP. Table:

IP networking | MS networking
TCP/IP | NetBEUI aka NetBIOS
IP address | n/a
DNS hostname | 'computer name'
'hosts' file | 'lmhosts' file
DNS server | WINS server
dynamic DNS | WINS registration
DNS domain | workgroup/NT domain browse list
Multicast DNS service advertising | NetBIOS broadcasting

You're right that you need to put the IP address of the Samba machine in the 'WINS server' item in Windows, and they should then register with Samba's nmbd service on bootup. They will also periodically reregister. I don't know where Samba stores its WINS database.
 
Old 08-25-2004, 05:21 PM   #11
ulaoulao
Member
 
Registered: Jul 2004
Posts: 36

Original Poster
Rep: Reputation: 15
I must say you have been great help up till this point I do thank you.

I have my three windows computer able to acces each other via UUNC names or IP, although none of them list any computers in thier browsers ecept one. Maybe they are fighting each other. If I disable the computer browsers they give me "the specified network name is no longer available" also none of them can access my linux server. Did I miss a step?
also my linux box still wont accept host names? see below:



xanux:/etc/samba# smbclient -L 192.168.0.25 -U administrator
Password:

Sharename Type Comment
--------- ---- -------
E$ Disk Default share
IPC$ IPC Remote IPC
print$ Disk Printer Drivers
data Disk data
G$ Disk Default share
desktop Disk desktop
romz Disk romz
ADMIN$ Disk Remote Admin
H$ Disk Default share
C$ Disk Default share
Connection to 192.168.0.25 failed
NetBIOS over TCP disabled -- no workgroup available




xanux:/etc/samba# smbclient -L gamer -U administrator
<<sits there and never does a thing>>>



xanux:/etc/samba# smbclient //192.168.0.25/c$ -U administrator
Password:
smb: \> ls
dos D 0 Sun Aug 10 23:21:04 2003
BOOTLOG.TXT HS 386 Thu Feb 27 17:43:32 2003
My Documents D 0 Fri May 26 15:24:44 2000
RECYCLED DHS 0 Fri May 26 15:40:12 2000
Program Files DA 0 Sun May 9 20:30:04 2004
WPT.exe A 634880 Sun Jan 11 10:20:52 2004
BOOTLOG.PRV HS 386 Sat Jan 25 13:35:02 2003
ntldr AHSR 281200 Thu Jun 19 17:20:08 2003
KPCMS D 0 Fri May 26 15:52:06 2000
emuz D 0 Fri Aug 3 22:26:48 2001
NTDETECT.COM AHSR 47612 Thu Jun 19 09:58:20 2003
nvlog.txt A 0 Mon Jan 20 01:51:06 2003
qbasic D 0 Fri May 26 15:52:16 2000




smb.conf:


[global]
workgroup = @home
domain master = yes
local master = yes
preferred master = yes
hosts allow = ALL
interfaces = eth0:1 192.168.0.19 127.0.0.1
wins support = yes
netbios name = Xanux
server string=%h (Xandros Desktop)
dns proxy=no
name resolve order=lmhosts wins bcast host
log file=/var/log/samba/log.%m
max log size=1000
syslog=0
panic action=/usr/share/samba/panic-action %d
security=SHARE
encrypt passwords=true
passdb backend=tdbsam guest
obey pam restrictions=yes
invalid users=root
map to guest=Bad User
passwd program=/usr/bin/passwd %u
passwd chat=*Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n
\n .
client use spnego=no
load printers=no
printing=cups
printcap name=cups
socket options=TCP_NODELAY
display charset=iso8859-1
unix charset=iso8859-1
preserve case=yes
case sensitive=no
short preserve case=yes
os level=65
; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom





thx again. I hope I get this working yet.

Last edited by ulaoulao; 08-25-2004 at 06:07 PM.
 
Old 08-25-2004, 06:29 PM   #12
hob
Senior Member
 
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
SMB networking is complicated and messy, and I've spent a lot of time struggling with it myself...

I think that the browser service on Windows is responsible for WINS registration, so it needs to enabled.

On the Linux side:

- It may be worth double-checking the lmhosts file (contents,permissions etc.) , and perhaps rearranging this line to try different resolution types:

name resolve order=lmhosts wins bcast host

- WINS registration and broadcasts only happen every 15 minutes and it can take several intervals for browse lists to work fully. Once I got completely frustrated setting up Samba and went for a walk; when I got back everything had appeared in Network Neighbourhood.

- There's unnecessary stuff in your smb.conf which could be dropped.

- Lastly, is Xandros/Debian using Samba 3 or something older ?

If you are using Samba 3 and are still stuck, post and I'll write up a minimum smb.conf for what you need.
 
Old 08-25-2004, 06:35 PM   #13
ulaoulao
Member
 
Registered: Jul 2004
Posts: 36

Original Poster
Rep: Reputation: 15
!!!

! low 'en be hold I think he's got it!

For any one following this threat, in part of http://www.duxcw.com/faq/network/names.htm

dont use any thing other then letters, at least dont use the @. I changed my workgroup from @home to renpet and everything works....

although my linux box is working as a great WINS server, it doesn't use wins so I can't browse from my linux box, any ideas.

Last edited by ulaoulao; 08-26-2004 at 06:44 AM.
 
Old 08-26-2004, 06:52 AM   #14
ulaoulao
Member
 
Registered: Jul 2004
Posts: 36

Original Poster
Rep: Reputation: 15
I take that back it too seems to work now! thx for your help Hob.
 
  


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
Samba or Wins issue: netbios aliases, not accessible by hostname pingu Linux - Networking 1 05-02-2008 01:51 PM
how to subsitute netbios/wins???? yenonn Linux - Networking 3 11-04-2004 03:01 AM
samba and wins hoover93 Linux - Networking 0 08-16-2004 04:25 PM
Samba WINS Server rmarvin Linux - Networking 0 10-24-2003 12:35 PM
Samba WINS server acid_kewpie Linux - Networking 1 10-03-2001 01:30 AM

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

All times are GMT -5. The time now is 12:26 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration