From owner-freebsd-ports@FreeBSD.ORG Mon Feb 18 17:19:20 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2D1E16A41A for ; Mon, 18 Feb 2008 17:19:20 +0000 (UTC) (envelope-from gvm999@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by mx1.freebsd.org (Postfix) with ESMTP id EE7DC13C45D for ; Mon, 18 Feb 2008 17:19:19 +0000 (UTC) (envelope-from gvm999@gmail.com) Received: by ug-out-1314.google.com with SMTP id y2so1021140uge.37 for ; Mon, 18 Feb 2008 09:19:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=kBaBmcod67XkMiF0PgVp4s95JhYQZHOqcUp6k0C2HDI=; b=osAmuWWunt7Z6OxCU3HehGdWORA1Z91peYfsxlQQEbxr6tsedton4HQDRAWZUFsbKncb4tJNGrVTD1WJ2xBkLnQMDG+IoSDC0/WDxJUmY9FPdv1ZxFHbuFXWacxp9YmILiZqc4Gf8LgFXoOxDQMqqJUr52pHRFmC37zhplrCYtA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=wkXvUBGhTXaeCjVisCXahvhVV8WqXEjXmtbno2lIRRl+0aefcZFhuteBAQtsU4Q8KyCplrIcGSoLSs927fpqx7U1ndDRXrIEMWYkcW0dpGD1j7adZy+2T7l2cejzxm8rGKPXW5uI51wLbOS0Gx/RKREIHmNh9vkMHge+wdxKAvY= Received: by 10.67.27.3 with SMTP id e3mr971712ugj.22.1203353622762; Mon, 18 Feb 2008 08:53:42 -0800 (PST) Received: by 10.66.237.11 with HTTP; Mon, 18 Feb 2008 08:53:42 -0800 (PST) Message-ID: Date: Mon, 18 Feb 2008 17:53:42 +0100 From: gvm999 To: freebsd-ports@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Netbios name resolving for ping and other software (rdesktop,..) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 17:19:20 -0000 I want to be able to resolve Netbios names without the use of /etc/hosts nor a DNS server. However I cant get it to work. I want to be able to use the netbios name for example with CUPS, rdesktop, ssh. CUPS for example uses the netbios name with its shared printers. If another computer lists shared printer then the netbios name is used, which cannot be resolved, leaving it not working. So I wanted to have transparent name resolving. I had this working previously on Linux (debian) I thought I could fix this with /etc/nsswitch.conf but without any luck. Does someone knows what I am doing wrong? I have been searching for this for a few days :s I have a samba configured as wins server and nmbd is also running. Resolving with nmblookup works fine... however does not with for example PING. This is my config. My smb.conf: Code: [global] workgroup = MYGROUP server string = Samba Server interfaces = 192.168.1.11/24 log file = /usr/local/samba/var/log.%m max log size = 50 name resolve order = wins hosts lmhosts bcast printcap name = printcap os level = 33 preferred master = Yes domain master = Yes wins support = Yes hosts allow = 192.168.1., 192.168.100., 127. [homes] comment = Home Directories [printers] comment = All Printers path = /usr/spool/samba printable = Yes browseable = No [share] comment = Torrent Share path = /home/gvm/downloaded read only = No [torrent-watch] comment = Torrent Share path = /home/gvm/watch-torrent read only = No When I do smbclient -L vpn-gateway: Code: Anonymous login successful Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.0.23c] Sharename Type Comment --------- ---- ------- homes Disk Home Directories share Disk Torrent Share torrent-watch Disk Torrent Share IPC$ IPC IPC Service (Samba Server) Anonymous login successful Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.0.23c] Server Comment --------- ------- VPN-GATEWAY Samba Server Workgroup Master --------- ------- MYGROUP VPN-GATEWAY Still if I want to ping I get unknown host. Cat /etc/nsswitch.conf Code: group: compat group_compat: nis hosts: files wins winbind bcast dns networks: files passwd: compat passwd_compat: nis shells: files nmblookup vpn-gateway: Code: nmblookup vpn-gateway querying vpn-gateway on 192.168.1.255192.168.1.11 vpn-gateway<00> What I dont understand are the contents of /etc/host.conf They dont have wins or broadcast (bcast) in it. But it says that it is automatically generated. How can I regenerate that file? cat /etc/host.conf Code: # Auto-generated from nsswitch.conf, do not edit hosts dns Maybe it is just normal that it only has those 2 entrys.