This is a discussion on Basic Samba Question from Newbie within the Linux Networking forums, part of the Linux Forums category; Firstly my apologies for just kicking the door down and bursting in here with this question. I did try to ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Firstly my apologies for just kicking the door down and bursting in here with this question. I did try to find a Samba NG but my NS does not seem to carry one.
This is down to my limited understanding, can anyone give me some pointers? I'm playing with Samba and trying to expand on my networking understanding at the same time. The issue I am trying to get my head around is when I try a test connection. If I use: smbclient -L //hostname -U Username I'm prompted for a password as expect, put it in and get a list of shares on the host: Domain=[blahblahblah] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] Sharename Type Comment --------- ---- ------- VIDEO SHARED Disk D3_300GB (E) Disk LINUXSHARE Disk Domain=[DISHINGDIRT] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] Server Comment --------- ------- Workgroup Master --------- ------- Which is fine and dandy. BUT if I issue the same command using the IP address instead of the host name: smbclient -L //192.168.1.25 -U User I get the same as before but with the extra lines: Domain=[blahblahblah] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] Sharename Type Comment --------- ---- ------- VIDEO SHARED Disk D3_300GB (E) Disk LINUXSHARE Disk session request to 192.168.1.25 failed (Called name not present) session request to 192 failed (Called name not present) Domain=[DISHINGDIRT] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] Server Comment --------- ------- Workgroup Master --------- ------- I'm just wondering why these lines spring up: session request to 192.168.1.25 failed (Called name not present) session request to 192 failed (Called name not present) Any ideas? |
|
|||
|
On Apr 28, 2:12 am, root <gizm...@buzzhost.co.uk> wrote:
> If I use: > smbclient -L //hostname -U Username > I'm prompted for a password as expect, put it in and get a list of > shares > on the host: > Which is fine and dandy. BUT if I issue the same command using the > IP address > instead of the host name: > smbclient -L //192.168.1.25 -U User > I get the same as before but with the extra lines: > session request to 192.168.1.25 failed (Called name not present) > session request to 192 failed (Called name not present) The name you called the server "192.168.1.25" is not present in the list of NETBIOS names for that host. If you read the documentation, you can see that '-L' is supposed to be followed by the NETBIOS name of the host. If you want to specify the IP to connect to, use '-I'. DS |
|
|||
|
It looks like the IP is being taken for an actual hostname. Then it can't work with that, and takes the "name" up to the first dot, which would be the host part of the FQDN (thinking host 192 in the 168.whatever domain) Windows machines, by and large, don't know their own names because they usually aren't setup right for networking. I think the lmhosts file controls some/all of this, but it's been a long time since I had to configure Windows. I know Samba, with lmhosts entires, doesn't do it: [ jayjwa@vdrl:~>] smbclient -A ~/.smbauth -L //atr2 Domain=[ATR2NET] OS=[Unix] Server=[Samba 3.0.27] Sharename Type Comment --------- ---- ------- cifs Disk CIFS/SMB global public root share Disk Incoming/uploadable storage space IPC$ IPC IPC Service ([ATr2 RG 2008/04/30 11:15:33] atr2 SMB/CIFS 3.0.27.) jayjwa Disk Home Directories Domain=[ATR2NET] OS=[Unix] Server=[Samba 3.0.27] Server Comment --------- ------- ATR2 [ATr2 RG 2008/04/30 11:04:32] atr2 SMB/CIFS 3.0. VDRL [ATr2 RG 2008/04/25 12:34:16] vdrl SMB/CIFS 3.0. Workgroup Master --------- ------- ATR2NET VDRL [ jayjwa@vdrl:~>] smbclient -A ~/.smbauth -L //192.168.10.75 Domain=[ATR2NET] OS=[Unix] Server=[Samba 3.0.27] Sharename Type Comment --------- ---- ------- cifs Disk CIFS/SMB global public root share Disk Incoming/uploadable storage space IPC$ IPC IPC Service ([ATr2 RG 2008/04/30 11:15:57] atr2 SMB/CIFS 3.0.27.) jayjwa Disk Home Directories Domain=[ATR2NET] OS=[Unix] Server=[Samba 3.0.27] Server Comment --------- ------- ATR2 [ATr2 RG 2008/04/30 11:04:32] atr2 SMB/CIFS 3.0. VDRL [ATr2 RG 2008/04/25 12:34:16] vdrl SMB/CIFS 3.0. Workgroup Master --------- ------- ATR2NET VDRL It finds what to do with the address. My lmhosts file is from an old Windows install. cat /etc/samba/lmhosts # Copyright (c) 1993-1995 Microsoft Corp. # # This is a sample LMHOSTS file used by the Microsoft TCP/IP for Windows # NT. # # This file contains the mappings of IP addresses to NT computernames # (NetBIOS) names. Each entry should be kept on an individual line. # The IP address should be placed in the first column followed by the # corresponding computername. The address and the comptername # should be separated by at least one space or tab. The "#" character # is generally used to denote the start of a comment (see the exceptions # below). # # This file is compatible with Microsoft LAN Manager 2.x TCP/IP lmhosts # files and offers the following extensions: # # #PRE # #DOM:<domain> # #INCLUDE <filename> # #BEGIN_ALTERNATE # #END_ALTERNATE # \0xnn (non-printing character support) # # Following any entry in the file with the characters "#PRE" will cause # the entry to be preloaded into the name cache. By default, entries are # not preloaded, but are parsed only after dynamic name resolution fails. # # Following an entry with the "#DOM:<domain>" tag will associate the # entry with the domain specified by <domain>. This affects how the # browser and logon services behave in TCP/IP environments. To preload # the host name associated with #DOM entry, it is necessary to also add a # #PRE to the line. The <domain> is always preloaded although it will not # be shown when the name cache is viewed. # # Specifying "#INCLUDE <filename>" will force the RFC NetBIOS (NBT) # software to seek the specified <filename> and parse it as if it were # local. <filename> is generally a UNC-based name, allowing a # centralized lmhosts file to be maintained on a server. # It is ALWAYS necessary to provide a mapping for the IP address of the # server prior to the #INCLUDE. This mapping must use the #PRE directive. # In addtion the share "public" in the example below must be in the # LanManServer list of "NullSessionShares" in order for client machines to # be able to read the lmhosts file successfully. This key is under # \machine\system\currentcontrolset\services\lanmans erver\parameters\nullsessionshares # in the registry. Simply add "public" to the list found there. # # The #BEGIN_ and #END_ALTERNATE keywords allow multiple #INCLUDE # statements to be grouped together. Any single successful include # will cause the group to succeed. # # Finally, non-printing characters can be embedded in mappings by # first surrounding the NetBIOS name in quotations, then using the # \0xnn notation to specify a hex value for a non-printing character. # # The following example illustrates all of these extensions: # # 102.54.94.97 rhino #PRE #DOM:networking #net group's DC # 102.54.94.102 "appname \0x14" #special app server # 102.54.94.123 popular #PRE #source server # 102.54.94.117 localsrv #PRE #needed for the include # # #BEGIN_ALTERNATE # #INCLUDE \\localsrv\public\lmhosts # #INCLUDE \\rhino\public\lmhosts # #END_ALTERNATE # # In the above example, the "appname" server contains a special # character in its name, the "popular" and "localsrv" server names are # preloaded, and the "rhino" server name is specified so it can be used # to later #INCLUDE a centrally maintained lmhosts file if the "localsrv" # system is unavailable. # # Note that the whole file is parsed including comments on each lookup, # so keeping the number of comments to a minimum will improve performance. # Therefore it is not advisable to simply add lmhosts file entries onto the # end of this file. # Loopback 127.0.0.1 localhost # Netbios name 192.168.10.75 ATR2 192.168.10.76 VDRL Then later in /etc/hosts those names get mapped into fqdn: 127.0.0.1 localhost.localdomain localhost 192.168.10.76 vdrl.ath.cx vdrl 192.168.10.75 atr2.ath.cx atr2 Would it still work if I pull the lmhosts file? Not sure, and I'm not logged in as root right now ;) Check the Samba docs (the 3 pdf's that come with Samba), there's alot of info on getting Windows setup in there, too. -- [** America, the police state **] Whoooose! What's that noise? Why, it's US citizen's rights, going down the toilet with Bush flushing. http://www.theregister.co.uk/2008/01..._nsa_internal/ http://www.wired.com/politics/securi...007/08/wiretap http://www.hermes-press.com/police_state.htm http://www.privacyinternational.org/...D=x-347-559597 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|