P. 1
Samba

Samba

|Views: 167|Likes:
Publicado porNurul Istiqomah

More info:

Published by: Nurul Istiqomah on Dec 14, 2010
Direitos Autorais:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

02/21/2014

pdf

text

original

nmblookuphas a rich set of command options,making this a versatile debugging tool. This
section discusses all the options. Table 12.2 outlines many of these command options.

TABLE 12.2The nmblookupCommand Options

Command Option

Behavior

-d debuglevel

Set nmblookup’s debug level

-B broadcast IP

Use broadcast,explicitly naming a broadcast address

-U unicast IP

Use unicast,explicitly naming the IP address of the WINS server

-M

Locate the master browser

-S

Looks up all names on an explicitly specified IP address

-T

Uses reverse DNS to convert outputted IP addresses to names

other options

-R

Makes the request recursive

-h

Displays help

-r

Corrects a Windows 95 bug

-A

Looks up a node status

-i

Handles NetBIOS scopes

-s

Explicitly specifies a nondefault smb.conffile

-d debuglevel

This option determinesthe detail of the debug messages printed to stdoutby the

nmblookupcommand. Anything above 2is obnoxiously verbose and should be used only
for troubleshooting,typically piped into lessor into a file or grepcommand.

-B broadcast IP

This shouldnot be necessary under default conditions,because the default broadcast
address is typically correct. However,if nmblookupcommands that should succeed fail,
you might want to explicitly set this option to the broadcast address of the subnet.

-U unicast IP

This option sends the query directly to the WINS server at the unicast address. The

-U unicast IPoption plus the -Roption are necessary for querying a WINS server.

Creating a Turnkey Samba System

PARTII

374

15 8628 CH12 3/17/00 12:54 PM Page 374

-M

This is how you find the master browser. Start with this command:

$ nmblookup -SM -
querying ____MSBROWSE___ on 192.168.100.255
192.168.100.1 ____MSBROWSE___<01>
Looking up status of 192.168.100.1
received 9 names

MAINSERV <00> - M
MAINSERV <03> - M
MAINSERV <20> - M
..__MSBROWSE__. <01> - M
MYGROUP <00> - M
MYGROUP <1b> - M
MYGROUP <1c> - M
MYGROUP <1d> - M
MYGROUP <1e> - M
num_good_sends=0 num_good_receives=0

$

The preceding shows a Samba machine as the master browser. The following shows a
total lack of a master browser:

$ nmblookup -SM -
querying ____MSBROWSE___ on 192.168.100.255
querying ____MSBROWSE___ on 192.168.200.255
name_query failed to find name ____MSBROWSE___
$

Here’s the result when an NT box is the master server:

$ nmblookup -SM -
querying ____MSBROWSE___ on 192.168.100.255
192.168.100.10 ____MSBROWSE___<01>
Looking up status of 192.168.100.10
received 10 names

DESK1 <20> - M
DESK1 <00> - M
MYGROUP <00> - M
DESK1 <03> - M
MYGROUP <1e> - M
INet~Services <1c> - M
IS~DESK1 <00> - M
ADMINISTRATOR <03> - M
MYGROUP <1d> - M
..__MSBROWSE__. <01> - M
num_good_sends=0 num_good_receives=0

$

Samba Client Utilities

CHAPTER12

375

12

S

A
M
B
A

C

L
I
E
N
T

U

T
I
L
I
T
I
E
S

15 8628 CH12 3/17/00 12:54 PM Page 375

The -Moption (combined with -Sto find the name) is vital in determining which box (if
any) is the master browser. Without a master browser,Network Neighborhood browsing
problems usually occur for any resources in workgroups outside the client.

$ nmblookup -U mainserv -R ‘desk2’

-S IP

This option performs an additional lookup on any returned IP addresses to grab the
names. This is the way you find the name list on client computers,as shown in the fol-
lowing session example,which looks up all names on client wincli:

$ nmblookup -Umainserv -RS ‘wincli’
querying wincli on 192.168.100.1
192.168.100.201 wincli<00>
Looking up status of 192.168.100.201
received 6 names

WINCLI <00> - M
MYGROUP <00> - M
WINCLI <03> - M
WINCLI <20> - M
MYGROUP <1e> - M
USERNAME <03> - M
num_good_sends=0 num_good_receives=0

$

Combined with the -Moption,this option is a vital window into the browsing system.

-T

This optiontranslates IP addresses into names using reverse DNS lookup (including the

hostsfile). However,it’s only as accurate as reverse DNS. Consider using the -Soption
instead,because that’s a pure NetBIOS system. On the other hand,if NetBIOS is sus-
pect,-Tmight be a valuable system check.

Other nmblookupCommand Options

The nmblookupcommand has several other options which are not as important or fre-
quently used as those previously discussed. The following is a list of those options:

The -Roption sets recursion on and,when used,is typically used in querying a
WINS server (together with the -Uoption).

The -roption can correct an obscure Windows 95 bug. If necessary,read about it
in the nmblookupman page.

The -Aoption looks up a node status on a name after translating the name to an IP
address. This is an alternative to the -Soption,but -Sis typically more reliable.

Creating a Turnkey Samba System

PARTII

376

15 8628 CH12 3/17/00 12:54 PM Page 376

The -ioption takes a NetBIOS scope as an argument,and handles NetBIOS
scopes. Read the nmblookupman page for details.

The -soption takes a filename as an argument,and specifies a non-default Samba
configuration file. If the system uses a different smb.conffile than the compiled
default one,the -soption tells nmblookupwhere to find it.

The -hoption prints a brief help and syntax message.

You're Reading a Free Preview

Descarregar
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->