Re: Samba related question.
Note the following excerpt from the "man gcc." -- __ | 0|___||. Andrew Gaunt - Computing Development Environment _| _| : : } Lucent Intranet: http://mvcde.inse.lucent.com/~quantum -(O)-==-o\ Internet: http://www.gaunt.org -pedantic Issue all the warnings demanded by strict ANSI standard C; reject all programs that use forbidden extensions. Valid ANSI standard C programs should compile properly with or without this option (though a rare few will require `-ansi'). However, without this option, certain GNU ex tensions and traditional C features are supported as well. With this option, they are rejected. There is no reason to use this option; it exists only to satisfy pedants. `-pedantic' does not cause warning messages for use of the alternate keywords whose names begin and end with `__'. Pedantic warnings are also disabled in the expression that fol lows __extension__. However, only system header files should use these escape routes; application programs should avoid them. -pedantic-errors Like `-pedantic', except that errors are produced rather than warnings. Jason wrote: I had to look this up and I was an English major 8). FWIW Pedantic: Marked by a narrow, often tiresome focus on or display of learning and especially its trivial aspects: a pedantic writing style; an academic insistence on precision; a bookish vocabulary; donnish refinement of speech; scholastic and excessively subtle reasoning. Just to be *really* pedantic: NetBIOS is the whole suite of protocols. WINS is a method for centralized registration of names in NetBIOS. In fact, the *official* name for WINS is "NetBIOS Name Service", or NBNS. Microsoft, of course, had to make up their own name. "Broadcast" is the other major form of name resolution under NetBIOS. Jason Kern www.KernBuilt.com 603.823.5150 ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Samba related question.
On Thu, 19 Feb 2004, at 2:51am, [EMAIL PROTECTED] wrote: > You obviously haven't been paying close attention to this list very > long... we have many pedants here, and many pedantic discussions. An > overabundance of pedantry, really... ;-) Hey! I resemble that remark! ;-) -- Ben Scott <[EMAIL PROTECTED]> | The opinions expressed in this message are those of the author and do | | not represent the views or policy of any other person or organization. | | All information is provided without warranty of any kind. | ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Samba related question.
On Wed, Feb 18, 2004 at 11:23:38AM -0500, Jason wrote: > I had to look this up and I was an English major 8). You obviously haven't been paying close attention to this list very long... we have many pedants here, and many pedantic discussions. An overabundance of pedantry, really... ;-) -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02 -=-=-=-=- This message is posted from an invalid address. Replying to it will result in undeliverable mail. Sorry for the inconvenience. Thank the spammers. pgp0.pgp Description: PGP signature
RE: Samba related question.
I had to look this up and I was an English major 8). FWIW Pedantic: Marked by a narrow, often tiresome focus on or display of learning and especially its trivial aspects: a pedantic writing style; an academic insistence on precision; a bookish vocabulary; donnish refinement of speech; scholastic and excessively subtle reasoning. > Just to be *really* pedantic: > NetBIOS is the whole suite of protocols. WINS is a method for centralized >registration of names in NetBIOS. In fact, the *official* name for WINS is >"NetBIOS Name Service", or NBNS. Microsoft, of course, had to make up their >own name. "Broadcast" is the other major form of name resolution under >NetBIOS. Jason Kern www.KernBuilt.com 603.823.5150 ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Samba related question.
On Fri, 13 Feb 2004, at 12:58pm, [EMAIL PROTECTED] wrote: > Well, I suppose so. But it's really client/server no matter how MS wishes > to look at it :) Absolutely. Alas, if you're using NetBIOS, chances are, you're using Microsoft, which means you have to deal with their brain damage. > Right, sorry, as you correctly state further down, I was confusing WINS w/ > NetBIOS. Just to be *really* pedantic: NetBIOS is the whole suite of protocols. WINS is a method for centralized registration of names in NetBIOS. In fact, the *official* name for WINS is "NetBIOS Name Service", or NBNS. Microsoft, of course, had to make up their own name. "Broadcast" is the other major form of name resolution under NetBIOS. I realize that, you, Paul, understand this stuff (even if the terminology is a bit fuzzy), but others might not, so I want to be as clear and exact as possible. > My bad. I was using the term 'broadcast' to mean announce, not actually > broadcast. When Samba starts up, it will make a NetBIOS request of 'Can I > use this hostname', the NetBIOS server will either say yes or no. Further pedantic clarification: NAME RESOLUTION When a NetBIOS node starts up, it attempts to register the name(s) it wants. Depending on configuration, it will either (1) broadcast to the local network, (2) contact a WINS server, or (3) both. When a NetBIOS node wants to find another NetBIOS name, it will either (1) broadcast to the local network, (2) contact a WINS server, or (3) both. A NetBIOS node will typically listen on the local network for broadcasts for its own names, and respond to those broadcasts with unicast replies. With Windows, you can configure name resolution by setting the "NetBIOS Node Type". There are four values, that translate to "WINS only", "broadcast only", "WINS then broadcast", or "broadcast then WINS". This can be set in the Windows Registry, or with DHCP. For Samba, you simply define the "name resolve order". For large LANs, or for networks with multiple LANs, I recommend using "WINS only". Excessive broadcast traffic can slow down a large LAN, and broadcasts don't work at all across multiple LANs. NETBIOS BROWSERS When a NetBIOS node wants to enumerate all the other NetBIOS nodes in a workgroup, it contacts the "master browser" for the workgroup. It finds the master browser by searching for the workgroup name (using the name resolution mechanisms described above). It then contacts the browser and asks for the list. Master browsers "elect" themselves automatically. This is good from an auto-configuration stand-point, but bad in the sense that it is quite easy for the whole system to go haywire. Different computers can end up using different master browsers, and various NetBIOS nodes can constantly fight to become the master browser (called a "browser war"). Microsoft Windows is designed to give newer versions of Windows preference in browser elections. The "Server" flavors of Windows also get preference. Any "Domain Controller" server gets even more preference. Most of this stuff is hard coded, and you have very little control over it, other then "try to become a browser" and "do not try to become a browser" options. Samba, in contrast, exposes all this stuff, in the "local master", "domain master", "preferred master", and "os level" parameters. For this reason, the addition of a Samba server, with all values set "on" or to high values, will solve all your browser war problems. (Just beware not to do this on more then *one* Samba server.) There are also "backup browsers", as well as "local master browsers" and "domain master browsers". But this message is already complex enough. :) > Thanks for correcting me once again Ben, and I promise not to answer > technical e-mails when I should be going to sleep (which is damn near > all the time ;) Join the club. :-) -- Ben Scott <[EMAIL PROTECTED]> | The opinions expressed in this message are those of the author and do | | not represent the views or policy of any other person or organization. | | All information is provided without warranty of any kind. | ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Samba related question.
In a message dated: Fri, 13 Feb 2004 08:55:25 EST [EMAIL PROTECTED] said: > While I do agree, it is important to understand that Microsoft Windows is >designed around Microsoft's concept of networking (i.e., "peer to peer" vs >"client/server"). If you put a Microsoft Windows Server computer on a LAN >of computers running Windows "clients", the server will automatically take >over the NetBIOS "Master Browser" roles, and the workstations will >automatically defer to it. This is how Windows is coded. Well, I suppose so. But it's really client/server no matter how MS wishes to look at it :) >On Thu, 12 Feb 2004, at 11:43pm, [EMAIL PROTECTED] wrote: >>> I would like to know how the Windows boxes on my network know the name of >>> my Linux box running Samba with no DNS or host files beyond the one on >>> the router. >> >> One of your systems is acting as a WINS server. > > Not necessarily true. Both Microsoft's and Samba's implementations of >NetBIOS will use local broadcasts for name resolution. Right, sorry, as you correctly state further down, I was confusing WINS w/ NetBIOS. What I meant was essentially what you state, that there is some resolution going on via NetBIOS, which should 'just work' but is occassionally unreliable. >Unfortunately, "unreliable" does not mean "always does not work" but >rather "sometimes does not work". It appears the human race has trouble >with this concept. Blame marketing :) >> [Samba will] broadcast [it's NetBIOS name] to the local network. As a >> result, whichever system is the WINS server will notice that system and >> announce it to all clients which register with it. > > No. WINS is not broadcast. My bad. I was using the term 'broadcast' to mean announce, not actually broadcast. When Samba starts up, it will make a NetBIOS request of 'Can I use this hostname', the NetBIOS server will either say yes or no. (amusingly, years ago at a DefCon, someone presented a hack he had created to just answer 'no' to any request that came along, effectively telling any client that no matter what name they requested to use, it was already in use :) > WINS is not auto-discovered. WINS is configured just like DNS. That >means you can manually enter the IP address of your WINS server(s), or you >can assign them via DHCP. Right. I was thinking of NetBIOS. >> There is *always* a WINS server on a network unless you explicitly tell >> all Windows systems not to try to be one ... > > Totally incorrect. > >> There's a whole election system built into the protocol such that the one >> most "qualified" to be the server "WINS" (pun intended :) the election. > > You're confusing WINS with NetBIOS master browsers. As I said, you're right again (hey, it was damn near midnight when I was typing this, and I get up at 5:30am, gimme a break, huh? :) (..a whole bunch of stuff which said basically what I meant, but actually accurately mapped the protocol names to the correct functionality :) Thanks for correcting me once again Ben, and I promise not to answer technical e-mails when I should be going to sleep (which is damn near all the time ;) Seeya, Paul -- Key fingerprint = 1660 FECC 5D21 D286 F853 E808 BB07 9239 53F1 28EE It may look like I'm just sitting here doing nothing, but I'm really actively waiting for all my problems to go away. If you're not having fun, you're not doing it right! ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Samba related question.
On Thu, 12 Feb 2004, at 11:22pm, [EMAIL PROTECTED] wrote: > While I fully understand the use of the term 'peer to peer' to imply that > there is no central server utilized for file storage or printing, I must > state emphatically that: > >There is no such thing as a 'peer to peer' network.[1] While I do agree, it is important to understand that Microsoft Windows is designed around Microsoft's concept of networking (i.e., "peer to peer" vs "client/server"). If you put a Microsoft Windows Server computer on a LAN of computers running Windows "clients", the server will automatically take over the NetBIOS "Master Browser" roles, and the workstations will automatically defer to it. This is how Windows is coded. This is significant because one of the most common problems on so-called "peer-to-peer" networks is name resolution and NetBIOS browsing issues (as Ed Lawson is discovering). Putting a Windows Server on a "peer-to-peer" network thus often makes everything magically better. Samba can be put to the same use, as you can configure Samba such that it will always win a NetBIOS browser election (even over a Windows Server). On Thu, 12 Feb 2004, at 11:43pm, [EMAIL PROTECTED] wrote: >> I would like to know how the Windows boxes on my network know the name of >> my Linux box running Samba with no DNS or host files beyond the one on >> the router. > > One of your systems is acting as a WINS server. Not necessarily true. Both Microsoft's and Samba's implementations of NetBIOS will use local broadcasts for name resolution. This does not require a WINS server. It is also very unreliable, which is why setting up a WINS server is recommended. However, people who don't understand the internals of all this often get upset that "everything worked before" without a WINS server. Unfortunately, "unreliable" does not mean "always does not work" but rather "sometimes does not work". It appears the human race has trouble with this concept. > I believe by default, Samba will, if the config file does not contain a > 'netbios name' statement, use the system's hostname as it's 'netbios name' > and broadcast that the local network. Yes. Specifically, the "first component" of the hostname, which is the same as the output of the command "hostname -s". > [Samba will] broadcast [it's NetBIOS name] to the local network. As a > result, whichever system is the WINS server will notice that system and > announce it to all clients which register with it. No. WINS is not broadcast. Even though they are totally different protocols, WINS functions much like DNS (or rather, DNS plus dynamic DNS update). WINS clients communicate with their WINS server via unicast. They send both registrations of their own names, and queries for other names. WINS is not auto-discovered. WINS is configured just like DNS. That means you can manually enter the IP address of your WINS server(s), or you can assign them via DHCP. > There is *always* a WINS server on a network unless you explicitly tell > all Windows systems not to try to be one ... Totally incorrect. > There's a whole election system built into the protocol such that the one > most "qualified" to be the server "WINS" (pun intended :) the election. You're confusing WINS with NetBIOS master browsers. NetBIOS master browsers are responsible for maintaining the list of all names on a network, so that other systems can list them (to power things like "Network Neighborhood" and the "NET VIEW" command). When a NetBIOS node starts, it finds the browser for it's workgroup and registers itself with said browser. (There's also the distinction between a Local Master Browser and a Domain Master Browser, but that only matters if you have more then one IP subnet.) WINS just registers NetBIOS names (and their associated IP addresses). One of the NetBIOS names that should get registered is the Master Browser for the workgroup. WINS clients will query for that name, and then contact the Master Browser for the Browse List. It happens that, in many networks, your WINS server also ends up being the Master Browser (because, again, Microsoft Windows Server will always win a browser election over a Microsoft Windows client, and Windows clients do not include WINS functionality). However, it is perfectly possible to have one computer be the WINS server and another computer be the Master Browser. -- Ben Scott <[EMAIL PROTECTED]> | The opinions expressed in this message are those of the author and do | | not represent the views or policy of any other person or organization. | | All information is provided without warranty of any kind. | ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Samba related question.
On Wed, 11 Feb 2004, at 12:21pm, [EMAIL PROTECTED] wrote: Just to cut to the chase, it looks as thought you would could make things better by setting the linux box up as a DNS server that serves a local domain That would be the rational way, but this person has zero experience with Linux and telling him, "OK, now we are going to set up a DNS" might put him over the edge. I suppose one could be easily scared off by the perceived complexity DNS because it is complicated. I don't pretent to be an expert, however, when I decided to set mine up I found that much of my fear was unwarranted and that getting it to "do what I want" was not so bad after all. One of the main reasons decided to use it as opposed to other methods is its abilty interoperabilty with msny platforms as opposed to just a few. Wins is doomed. Even Microsoft wishes it would go away, who can disagree with them on that? I do use DHCP for my clients, the DHCP server is aware of the client MAC addresses and gives them a well known "reserved" IP/hostname. For clients without reserved hostnames, there is a pool of addresses that also have DNS records so they get resolvable hostnames too. Not a problem. Yes, DNS may be more work, it may not do everything WINS does/did, however it has a future even with Windoze. The time and effort spent to get it working is worth it in my opinion especially when there are people like those on this mailing list who are more than willing to help each other out. -- __ | 0|___||. Andrew Gaunt - Computing Development Environment _| _| : : } Lucent Intranet: http://mvcde.inse.lucent.com/~quantum -(O)-==-o\ Internet: http://www.gaunt.org ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Samba related question.
In a message dated: Thu, 12 Feb 2004 15:42:05 EST Jeff Macdonald said: >On Wed, 2004-02-11 at 12:21, Ed Lawson wrote: >> On Wed, 11 Feb 2004 12:51:49 -0500 > >> I just ran a test and it isn't getting that info via DHCP. One of the >> windows boxes is a dual boot machine when booted under Linux it cannot >> ping the Samba server by name, but can when booted under Windows. > >I've missed most of the thread, but Windows has something called WINS >which I think is a variation on DNS. WINS is not a variation on DNS. They are similar only in that the last 2 letters of each are NS, and that they both assist computers in resolving IP-to-Hostname/Hostname-to-IP queries. > You can also edit the lmhosts file and add a static entry there. But that's a maintenance hassle, and no one relies on lmhosts files anymore. Even MS realized that maintaining a hosts file on every system on a network was a bad idea and that there had to "A Better Way". (why they thought that WINS was a better way is beyond me :) -- Seeya, Paul -- Key fingerprint = 1660 FECC 5D21 D286 F853 E808 BB07 9239 53F1 28EE It may look like I'm just sitting here doing nothing, but I'm really actively waiting for all my problems to go away. If you're not having fun, you're not doing it right! ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Samba related question.
In a message dated: Wed, 11 Feb 2004 12:21:36 EST Ed Lawson said: >That would be the rational way, but this person has zero experience with >Linux and telling him, "OK, now we are going to set up a DNS" might put >him over the edge. OTOH, I suspect we could spend no small amount of >time klutzing around with half baked solutions. Agreed. You want to set up Samba as a WINS server. It's the easiest and simplest solution. Both expedient in the near term, and the least time consuming or troubling to maintain long term. >I would like to know how the Windows boxes on my network know the name of my >Linux box running Samba with no DNS or host files beyond the one on the router. One of your systems is acting as a WINS server. Samba likely has, at the very least, a 'netbios name' statement and possibly even a 'workgroup' statement which is the same on all your Windows boxes. (the deault 'workgroup' for both Windows and Samba is 'WORKGROUP' usually). I believe by default, Samba will, if the config file does not contain a 'netbios name' statement, use the system's hostname as it's 'netbios name' and broadcast that the local network. As a result, whichever system is the WINS server will notice that system and announce it to all clients which register with it. There is *always* a WINS server on a network unless you explicitly tell all Windows systems not to try to be one(actually, I'm not even sure you can do that!). There's a whole election system built into the protocol such that the one most "qualified" to be the server "WINS" (pun intended :) the election. So, that's how your Windows systems know the name of your Linux/Samba system. >I just ran a test and it isn't getting that info via DHCP. One of the >windows boxes is a dual boot machine when booted under Linux it cannot >ping the Samba server by name, but can when booted under Windows. This is likely because when booted under Linux, there's no entry in your local /etc/hosts file for the Samba system. Plug an entry in the /etc/hosts system, and voila, you can ping the Samba system (Look Ma, no reboot either :) You should be able to ping the Samba server via IP address though, unless you numbered your network somewhat randomly and all hosts have different network assignments. If you're at all interested in understanding Windows networking more fully, I highly recommend the very first Samba book by John Blair. It's rather outdated, referring to Samba 1.x, but the first 3 chapters or so are an in-depth explanation to the twisted and contorted world of Windows Network protocols. I've yet to see another Samba book provide anywhere near as good an explanation of how this stuff works, and I think I've read them all :) -- Seeya, Paul -- Key fingerprint = 1660 FECC 5D21 D286 F853 E808 BB07 9239 53F1 28EE It may look like I'm just sitting here doing nothing, but I'm really actively waiting for all my problems to go away. If you're not having fun, you're not doing it right! ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Samba related question.
In a message dated: Wed, 11 Feb 2004 12:58:35 EST Ed Lawson said: >I think this means for purposes of using Samba I could forego the DNS, >enable WINS in SAMBA This would be the most expedient method, and likely the the simplest. >Since he currently has a small office running Windows peer to peer, I >assume there is no WINS server involved. While I fully understand the use of the term 'peer to peer' to imply that there is no central server utilized for file storage or printing, I must state emphatically that: There is no such thing as a 'peer to peer' network.[1] I think this has to be one of the worst misnomers ever perpetrated by the OS Marketing world (i.e. Novell). Any system which provides a service is a server. Any system which accesses those services is therefore a client. [1] Unless you consider the idea that someone somewhere may set up a network of computers which are in no way interdependant, and do not, for any reason connect to each other for anything. In that case, you have a network of isolated computers, all of which are 'peers'. But then, it's a 'peer' network, not 'peer-to-peer', since there is no 'to' communication. Of course, if you allow for all of these 'peers' to do anything useful like connect to the internet or exchange files, they've just become a client/server network. So, in it's true definition, 'peer' networks are networks of stand-a-lone computers. In which case, there's no need to network them :) -- Seeya, Paul -- Key fingerprint = 1660 FECC 5D21 D286 F853 E808 BB07 9239 53F1 28EE It may look like I'm just sitting here doing nothing, but I'm really actively waiting for all my problems to go away. If you're not having fun, you're not doing it right! ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Samba related question.
In a message dated: Wed, 11 Feb 2004 12:51:49 EST "Andrew W. Gaunt" said: >Just to cut to the chase, it looks as thought you would >could make things better by setting the linux box up >as a DNS server that serves a local domain (with >info re: stuff on the LAN in its zone file) and >caches/forwards everything else. Then configure the >clients (including the client side of the linux box's >DNS) use it as a DNS server. I get the impression that this is a small business environment without overly tech-savy people. In which case, I would consider the configuration of a DNS server to be more trouble than it's worth. All the Windows systems are already likely configured to broadcast WINS data, so it would be trivial to configure Samba to handle the job of WINS server. Also, it needs next to no upkeep, since any new clients would automatically broadcast their existence and partake in a WINS election. DNS on the otherhand, would require at the least, manual entry/assignment of hostnames/IPs for each new client. If memory serves, the OP mentioned that the network was handled via DHCP from a SOHO router. This means that there is likely no static assignment of IP addresses. Something which would cause problems if dependant on statically assigned data in DNS. Of course, he configure DHCP w/ dynamic DNS on a Linux box, but again, this is all a lot more work than adding a 'WINS = yes' statement to a Samba config file and being done with it. -- Seeya, Paul -- Key fingerprint = 1660 FECC 5D21 D286 F853 E808 BB07 9239 53F1 28EE It may look like I'm just sitting here doing nothing, but I'm really actively waiting for all my problems to go away. If you're not having fun, you're not doing it right! ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Samba related question.
In a message dated: 11 Feb 2004 13:08:26 EST "Kenneth E. Lussier" said: >DHCP doesn't assign hostnames, it assigns IP addresses (and other >various info). Well, that's not exactly true, among the 'other various info' you mention, DHCP can and is used to assign: - hostnames - IP addresses - DNS servers - NIS servers - WINS servers - Bootp servers - and 'other various info' :) >DNS is used to resolve those IP addresses to names. You >can have a box that has foo for a hostname, 192.168.1.2 for an IP >address, and an entry in DNS that resolves 192.168.1.2 to the name >bar.domain.com. You can ping 192.168.1.2 or bar.domain.com, but the name >foo will show up in network neighborhood and it cannot be ping'd by foo (if there is a WINS server in the picture, you can make this even more >convoluted). Actually, the name 'foo' might NOT show up in NetworkNeighborhood. Ping usually uses a gethostbyname() call to resolve hostnames to IP addresses and gethostbyname() usually will try all available resolution mechanisms, WINS, DNS, etc. So ping will succeed if DNS is properly configured to refer to a DNS server which will resolve the IP for foo properly. NN, on the other hand usually only uses WINS for resolution, which is why, when you open up NN, you only see a 'Microsoft Network' icon, which, when clicked, either shows you nothing, or only other Windows systems. However, if you install UNIX Services for Windows, you will also see NFS servers. (Remember, MS view of the world seems to be that there are only 2 types of servers, Print and File. If you have USW installed, then it only shows you NFS servers and LPR/LPD servers). -- Seeya, Paul -- Key fingerprint = 1660 FECC 5D21 D286 F853 E808 BB07 9239 53F1 28EE It may look like I'm just sitting here doing nothing, but I'm really actively waiting for all my problems to go away. If you're not having fun, you're not doing it right! ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Samba related question.
To go back to your original problem, try setting these options in the Linux box's /etc/samba/smb.conf file: netbios name = FOO workgroup = BAR encrypt passwords = yes smb passwd file = /etc/samba/smbpasswd local master = yes domain master = yes preferred master = yes name resolve order = lmhosts wins bcast dns proxy = no If the server's name isn't "FOO", change that. If the workgroup's name isn't "BAR", change that. Save and restart Samba. Oh, also try this, from Linux: smbclient -N -L //FOO That should list available shares. If it doesn't, Samba's busted. Oh, and run "testparm" to see if you have any syntax errors in the smb.conf file. -- Ben Scott <[EMAIL PROTECTED]> | The opinions expressed in this message are those of the author and do | | not represent the views or policy of any other person or organization. | | All information is provided without warranty of any kind. | ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Samba related question.
On Wed, 11 Feb 2004, at 12:21pm, [EMAIL PROTECTED] wrote: >> Just to cut to the chase, it looks as thought you would could make things >> better by setting the linux box up as a DNS server that serves a local >> domain > > That would be the rational way, but this person has zero experience with > Linux and telling him, "OK, now we are going to set up a DNS" might put > him over the edge. I'm not really sure it's the right thing to do, anyway. NetBIOS doesn't just store names and addresses, it also has a name "type" code that defines other kinds of names (like the workgroup). So just having DNS alone is not sufficient for any network with Windows 95/98/ME/NT4 clients. With Windows 2000/XP, all of that can be replaced with DNS and LDAP ("Active Directory"), but I don't think there's anything for Linux that provides equivilent functionality. Again, Samba still uses NetBIOS. So, while having DNS configured with names for everybody will often help, you still need to have NetBIOS resolution working properly for SMB to work "as intended". Generally speaking, the first thing I like to do when I find a Windows network with name resolution issues is to add a WINS server. Another thing I often do (especially on large LANs, or on networks with more then one IP broadcast domain) is set the NetBIOS node type to 0x2 (P-node, "peer node"). With all nodes as P-nodes, broadcast is no longer used for name resolution -- only WINS. That eliminates all the uncertainty of broadcasts for name resolution. The NetBIOS node type can be set using DHCP. Option "netbios-node-type". > I would like to know how the Windows boxes on my network know the name of > my Linux box running Samba with no DNS or host files beyond the one on the > router. NetBIOS broadcast name resolution. Samba listens for NetBIOS broadcasts and responds to them whenever it is running. > One of the windows boxes is a dual boot machine when booted under Linux it > cannot ping the Samba server by name, but can when booted under Windows. Right, because in Windows world, NetBIOS is asked when doing a gethostbyname() call. In the Unix world, this is not normally the case. You can, however, find the IP address attached to a NetBIOS name in Unix by doing nmblookup FOO where "FOO" is the name to lookup. nmblookup will send broadcasts to find the system holding that name (unless you've taken "bcast" out of the "name resolve order" setting in "smb.conf"). -- Ben Scott <[EMAIL PROTECTED]> | The opinions expressed in this message are those of the author and do | | not represent the views or policy of any other person or organization. | | All information is provided without warranty of any kind. | ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Samba related question.
On Wed, 2004-02-11 at 12:21, Ed Lawson wrote: > On Wed, 11 Feb 2004 12:51:49 -0500 > I just ran a test and it isn't getting that info via DHCP. One of the > windows boxes is a dual boot machine when booted under Linux it cannot > ping the Samba server by name, but can when booted under Windows. I've missed most of the thread, but Windows has something called WINS which I think is a variation on DNS. You can also edit the lmhosts file and add a static entry there. > > Ed Lawson > ___ > gnhlug-discuss mailing list > [EMAIL PROTECTED] > http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Samba related question.
On Wed, 11 Feb 2004 12:51:49 -0500 "Andrew W. Gaunt" <[EMAIL PROTECTED]> wrote: > > Just to cut to the chase, it looks as thought you would > could make things better by setting the linux box up > as a DNS server that serves a local domain That would be the rational way, but this person has zero experience with Linux and telling him, "OK, now we are going to set up a DNS" might put him over the edge. OTOH, I suspect we could spend no small amount of time klutzing around with half baked solutions. I would like to know how the Windows boxes on my network know the name of my Linux box running Samba with no DNS or host files beyond the one on the router. I just ran a test and it isn't getting that info via DHCP. One of the windows boxes is a dual boot machine when booted under Linux it cannot ping the Samba server by name, but can when booted under Windows. Ed Lawson ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Samba related question.
Yes, it is ugly, another reson to try and make everything use DNS for name resolotion. There are ways to convice the windows PCs to "put more weight" on DNS for name resolution via the registry. Here's what we have used (of course the DNS infrastructure is set up first): Win95 -- REGEDIT4 [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\MSTCP] "LMHostfile"="c:\\windows\\lmhosts" "EnableDNS"="1" WinNT4 --- REGEDIT4 [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\NetBT\Parameters] "EnableDNS"=dword:0001 Most of our PCs are running Win2K or greater (not better ;-) which is more easily convinced to use DNS. I believe Win98 has a 'check box' in the network settings you can set to make it use DNS for netbios name resolution. I haven't been in that mire for while so my recollection is clouded. We put these "registry fixes" on a public samba share (.reg files) for PC users. They simply click on them to install. The files are attached to this message. -- __ | 0|___||. Andrew Gaunt - Computing Development Environment _| _| : : } Lucent Intranet: http://mvcde.inse.lucent.com/~quantum -(O)-==-o\ Internet: http://www.gaunt.org [EMAIL PROTECTED] wrote: On Wed, 11 Feb 2004, at 11:31am, [EMAIL PROTECTED] wrote: My question relates to getting the Windows boxes to resolve the linux box by name. Ahhh. SMB name resolution. Never will you find a more retched hive of scum and kludges. First, it depends on the version of Windows. Win 95, 98, ME, and NT 4.0 all support NetBIOS only. Windows 2000 and XP add support for DNS, and have the option to disable NetBIOS. (95/98/ME/NT4 will appear to use DNS for SMB name resolution, but it won't work right.) Samba only supports NetBIOS. (I think Samba 3.0 might support SMB w/out NetBIOS, but I'm not sure.) NetBIOS is one of the worst ideas, ever. It can resolve names by either local broadcast or by using a WINS server. Broadcast means just that: A box sends a packet to every computer on the local network, and the right one is expected to respond. We hope. WINS is kinda like DNS for NetBIOS, except it (1) sucks and (2) clients automatically register their names. There's also the NetBIOS concept of "browse lists". A computer on the local network (the "local master browser") is responsible for keeping a list of known names. When a NetBIOS node starts, it sends a broadcast "here I am" packet. The LMB listens for those. Then, when someone else wants to find the list of names, it broadcasts to find the LMB, and then asks the LMB. How does the LMB get chosen? Well, when a NetBIOS node comes online, it broadcasts to find the LMB. If it doesn't get an answer, it nominates itself to be the LMB. If it does get an answer, then it tries to decide if it thinks it should be the LMB instead, and if so, holds an "election" with all the other potential LMBs on the LAN. (I'm pretty sure the actual process is even uglier then this, but this is close enough.) Oh, and NetBIOS names have to be... 14 characters or less, I think. You can try for longer, but Strange Things Can Happen. Anyhow, the following lines in /etc/samba/smb.conf are relevant: workgroup = FOO That says we're a member of workgroup "FOO". To keep things sane, everyone should be a member of the same workgroup. netbios name = BAR That says our own NetBIOS "computer" name is "BAR". This defaults to "hostname -s", but if you're having trouble, you might want to set this manually. name resolve order = lmhosts wins bcast host That controls how Samba resolves names (not how other nodes do). "lmhosts" is kinda like /etc/hosts, but with extra crap for NetBIOS. "bcast" is broadcast. "host" means the host OS (i.e., Linux), and means things like DNS and /etc/hosts. Sometimes, it is a good idea to remove "host", as it can complicate things, and MS-Windows generally doesn't use these mechanisms in the same way Samba does. local master = yes os level = 90 domain master = yes preferred master = yes domain logons = yes The above magic will make Linux win almost any browser election. This can be useful, as Samba is often better at SMB then Windows is -- in particular, the diagnostics are much better. wins support = yes If "yes", Samba will be a WINS server, and use itself for WINS name resolution. If "no", Samba will not be a WINS server. wins server = 12.23.34.45 Sets the IP address of your WINS server, if you have one. Do not set this if using "wins support = yes". ... any local machine can ping the linux box by using the assigned IP, but cannot ping it by name. Try this command from Linux: nmblookup -A foo where "foo" is the complete IP address of a Windoze machine. This should list the NetBIOS names the Windoze box is using. If this fails, SMB-over-NetBIOS-over-IP is not working, and neither will Samba. Try this c
Re: Samba related question.
On Wed, 11 Feb 2004, at 11:31am, [EMAIL PROTECTED] wrote: > My question relates to getting the Windows boxes to resolve the linux box > by name. Ahhh. SMB name resolution. Never will you find a more retched hive of scum and kludges. First, it depends on the version of Windows. Win 95, 98, ME, and NT 4.0 all support NetBIOS only. Windows 2000 and XP add support for DNS, and have the option to disable NetBIOS. (95/98/ME/NT4 will appear to use DNS for SMB name resolution, but it won't work right.) Samba only supports NetBIOS. (I think Samba 3.0 might support SMB w/out NetBIOS, but I'm not sure.) NetBIOS is one of the worst ideas, ever. It can resolve names by either local broadcast or by using a WINS server. Broadcast means just that: A box sends a packet to every computer on the local network, and the right one is expected to respond. We hope. WINS is kinda like DNS for NetBIOS, except it (1) sucks and (2) clients automatically register their names. There's also the NetBIOS concept of "browse lists". A computer on the local network (the "local master browser") is responsible for keeping a list of known names. When a NetBIOS node starts, it sends a broadcast "here I am" packet. The LMB listens for those. Then, when someone else wants to find the list of names, it broadcasts to find the LMB, and then asks the LMB. How does the LMB get chosen? Well, when a NetBIOS node comes online, it broadcasts to find the LMB. If it doesn't get an answer, it nominates itself to be the LMB. If it does get an answer, then it tries to decide if it thinks it should be the LMB instead, and if so, holds an "election" with all the other potential LMBs on the LAN. (I'm pretty sure the actual process is even uglier then this, but this is close enough.) Oh, and NetBIOS names have to be... 14 characters or less, I think. You can try for longer, but Strange Things Can Happen. Anyhow, the following lines in /etc/samba/smb.conf are relevant: workgroup = FOO That says we're a member of workgroup "FOO". To keep things sane, everyone should be a member of the same workgroup. netbios name = BAR That says our own NetBIOS "computer" name is "BAR". This defaults to "hostname -s", but if you're having trouble, you might want to set this manually. name resolve order = lmhosts wins bcast host That controls how Samba resolves names (not how other nodes do). "lmhosts" is kinda like /etc/hosts, but with extra crap for NetBIOS. "bcast" is broadcast. "host" means the host OS (i.e., Linux), and means things like DNS and /etc/hosts. Sometimes, it is a good idea to remove "host", as it can complicate things, and MS-Windows generally doesn't use these mechanisms in the same way Samba does. local master = yes os level = 90 domain master = yes preferred master = yes domain logons = yes The above magic will make Linux win almost any browser election. This can be useful, as Samba is often better at SMB then Windows is -- in particular, the diagnostics are much better. wins support = yes If "yes", Samba will be a WINS server, and use itself for WINS name resolution. If "no", Samba will not be a WINS server. wins server = 12.23.34.45 Sets the IP address of your WINS server, if you have one. Do not set this if using "wins support = yes". > ... any local machine can ping the linux box by > using the assigned IP, but cannot ping it by name. Try this command from Linux: nmblookup -A foo where "foo" is the complete IP address of a Windoze machine. This should list the NetBIOS names the Windoze box is using. If this fails, SMB-over-NetBIOS-over-IP is not working, and neither will Samba. Try this command from Windoze: nbtstat -A bar where "bar" is the complete IP address of the Linux machine. If this fails, then Samba is not talking to Windows right. Next, try this on Linux: nmblookup ding where "ding" is the name of a Windoze machine. That should attempt to locate the NetBIOS name in question via the same mechanisms that smbd (the server component of Samba) would use. Try this on Winzoe: nbtstat -a dong where "dong" is the name of the Linux box. This will test if Windoze can resolve the NetBIOS name of your Samba. If you could resolve a Windows name from Linux, try doing this on Linux: smbclient -L //ding That will list SMB information available on the Windoze box. If this fails when name lookup works, you might have an authentication or protocol configuration issue. You can also try smbclient -I foo -L //ding which gives "smbclient" the IP address to connect to, skipping name resolution entirely. On the Windoze side of things, try net view \\bar and net view \\dong which do similar things in the Windoze world. If name resolution appears to be wonky, try: - Make the Linux box a WINS server, and h
Re: Samba related question.
On 11 Feb 2004 13:08:26 -0500 "Kenneth E. Lussier" <[EMAIL PROTECTED]> wrote: > > The Network Neighborhood is using WINS to detect the Linux box. What > you are describing sounds like the Windows box is not authorized to > connect to the samba server. This is usually because Windows is using > encrypted passwords and samba isn't or vice versa. The little light starts to glow dim in my head now. I think this means for purposes of using Samba I could forego the DNS, enable WINS in SAMBA, set up authentication properly and the file sharing under SAMBA would work. > Since he currently has a small office running Windows peer to peer, I assume there is no WINS server involved. Thanks. Ed Lawson ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Samba related question.
In my case, I've used host files on each Windows box to tell them how to resolve the ip address of my linux server. It's easier for me than to setup a local DNS server (since I don't know how to do that [Aside to Andrew, I would love some pointers here]). Using a host file is as simple as opening notepad and editting your host file. On WinXP it is under c:\windows\system32\drivers\etc\hosts I think. For Win98, it is right in the windows directory. A sample entry is in that file, and would look like this: # ip host name alias 192.168.1.100 sambabox.mysite.com sambabox Once you save this host file, you can open a web browser on this machine and browse "sambabox.mysite.com". Or you can open a DOS shell and ping sambabox.mysite.com because the machine will know that it should connect to 192.168.1.100 on the network. That said, make sure that ipchains is not running on the Linux box, or else if it is running, that you add the right rules for Samba's port. As root, try service ipchains stop Then try connecting from Network Neighborhood A default RH box will normally be running ipchains, and not allow Samba connections. A quote from my own experience... (http://freephile.com/tiki/tiki-index.php?page=HowToNetworkPrinting) "After searching on the net, I realized that I had installed ipchains as a default firewall on my Linux machine, and it was not allowing access to the ports used by smb protocol. I will leave ipchains configuration for another day. I already have my Linksys router blocking traffic before it gets into my local network, so I stopped the ipchains service from the service control panel in Linux. The equivalent command line is: service ipchains stop Voila, I could connect to brie from Network Neighborhood. " Ed Lawson wrote: For reasons that are best left unsaid, I am attempting to help a person in Colorado set up a RH9 box as a SAMBA server for Windows desktops. He bought the Linux box from Dell with RH9 installed. My question relates to getting the Windows boxes to resolve the linux box by name. He uses the combo DSL modem/router as a DHCP server. There is no local DNS server, the router points to the ISP's DNS. The local boxes do not have hosts files for the other machines since DHCP is used. The linux box is getting its network info from the router and can access the Internet and any local machine can ping the linux box by using the assigned IP, but cannot ping it by name. Apparently the name of the linux box show up in the network neighborhood, but clicking on the icon results in a message about not finding machine on network. The router shows no name for the linux box in the connections page. To me this means the DHCP client is not sending its hostname. I have not encountered this problem before, but not familiar with RH9. If the DHCP client sends a hostname, shouldn't that take care of this? By that I mean the other clients will get the name of the linux box from the DHCP server on the router associated with the IP. TIA Ed Lawson ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss -- FREePHILE We are 'Open' for Business Free and Open Source Software http://www.freephile.com (978) 270-2425 I have no doubt the Devil grins, As seas of ink I spatter. Ye gods, forgive my "literary" sins-- The other kind don't matter. -- Robert W. Service
Re: Samba related question.
On Wed, 2004-02-11 at 11:31, Ed Lawson wrote: > > My question relates to getting the Windows boxes to resolve the linux > box by name. He uses the combo DSL modem/router as a DHCP server. > There is no local DNS server, the router points to the ISP's DNS. The > local boxes do not have hosts files for the other machines since DHCP is > used. You can still use hosts files, which will superseed the DNS entries (I think on Windows, the hosts file is in C:\windows/drivers/etc or something like that). > The linux box is getting its network info from the router and can > access the Internet and any local machine can ping the linux box by > using the assigned IP, but cannot ping it by name. Apparently the name > of the linux box show up in the network neighborhood, but clicking on > the icon results in a message about not finding machine on network. The Network Neighborhood is using WINS to detect the Linux box. What you are describing sounds like the Windows box is not authorized to connect to the samba server. This is usually because Windows is using encrypted passwords and samba isn't or vice versa. > The > router shows no name for the linux box in the connections page. To me > this means the DHCP client is not sending its hostname. DHCP doesn't assign hostnames, it assigns IP addresses (and other various info). DNS is used to resolve those IP addresses to names. You can have a box that has foo for a hostname, 192.168.1.2 for an IP address, and an entry in DNS that resolves 192.168.1.2 to the name bar.domain.com. You can ping 192.168.1.2 or bar.domain.com, but the name foo will show up in network neighborhood and it cannot be ping'd by foo (if there is a WINS server in the picture, you can make this even more convoluted). He needs to either run a local DNS server with all of the names and IP addresses in it, or set up hosts files on each of the machines. Or he could use samba as a WINS server to keep track of everything. He also needs to either enable plain-text passwords on the Windows side or enable encryption on the samba side (whichever he isn't doing now), and make sure that he has accounts on the samba server in the smbpasswd file. > I have not encountered this problem before, but not familiar with RH9. > > If the DHCP client sends a hostname, shouldn't that take care of this? > By that I mean the other clients will get the name of the linux > box from the DHCP server on the router associated with the IP. > > TIA > > Ed Lawson > ___ > gnhlug-discuss mailing list > [EMAIL PROTECTED] > http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss -- Kenneth E. Lussier <[EMAIL PROTECTED]> SentitO signature.asc Description: This is a digitally signed message part
Re: Samba related question.
Just to cut to the chase, it looks as thought you would could make things better by setting the linux box up as a DNS server that serves a local domain (with info re: stuff on the LAN in its zone file) and caches/forwards everything else. Then configure the clients (including the client side of the linux box's DNS) use it as a DNS server. I do this at home and work. Works great. I could provide examples if you need them. -- __ | 0|___||. Andrew Gaunt - Computing Development Environment _| _| : : } Lucent Intranet: http://mvcde.inse.lucent.com/~quantum -(O)-==-o\ Internet: http://www.gaunt.org Ed Lawson wrote: For reasons that are best left unsaid, I am attempting to help a person in Colorado set up a RH9 box as a SAMBA server for Windows desktops. He bought the Linux box from Dell with RH9 installed. My question relates to getting the Windows boxes to resolve the linux box by name. He uses the combo DSL modem/router as a DHCP server. There is no local DNS server, the router points to the ISP's DNS. The local boxes do not have hosts files for the other machines since DHCP is used. The linux box is getting its network info from the router and can access the Internet and any local machine can ping the linux box by using the assigned IP, but cannot ping it by name. Apparently the name of the linux box show up in the network neighborhood, but clicking on the icon results in a message about not finding machine on network. The router shows no name for the linux box in the connections page. To me this means the DHCP client is not sending its hostname. I have not encountered this problem before, but not familiar with RH9. If the DHCP client sends a hostname, shouldn't that take care of this? By that I mean the other clients will get the name of the linux box from the DHCP server on the router associated with the IP. TIA Ed Lawson ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss ___ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss