home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 20 NDrivers / 20-NDrivers.zip / samba193.zip / nmbd.txt < prev    next >
Text File  |  1996-01-06  |  21KB  |  595 lines

  1.  
  2.  
  3.  
  4. NMBD(8)                        nmbd                       NMBD(8)
  5.  
  6.  
  7. NAME
  8.        nmbd - provide netbios nameserver support to clients
  9.  
  10. SYNOPSIS
  11.        nmbd  [  -B broadcast address ] [ -I IP address ] [ -D ] [
  12.        -C comment string ] [ -G group name ] [ -H  netbios  hosts
  13.        file  ] [ -N netmask ] [ -d debuglevel ] [ -l log basename
  14.        ] -n netbios name ] [ -p port number ]
  15.  
  16.  
  17. DESCRIPTION
  18.        This program is part of the Samba suite.
  19.  
  20.        nmbd is a server that understands and can reply to netbios
  21.        name  service  requests, like those produced by LanManager
  22.        clients. It also controls browsing.
  23.  
  24.        LanManager clients, when they start up, may wish to locate
  25.        a  LanManager  server.  That is, they wish to know what IP
  26.        number a specified host is using.
  27.  
  28.        This program simply listens for such requests, and if  its
  29.        own  name  is specified it will respond with the IP number
  30.        of the host it is running on. "Its own name" is by default
  31.        the  name  of  the  host it is running on, but this can be
  32.        overriden with the -n option (see "OPTIONS" below).  Using
  33.        the  -S  option  (see  "OPTIONS"  below),  it  can also be
  34.        instructed to respond  with  IP  information  about  other
  35.        hosts, provided they are locatable via the gethostbyname()
  36.        call, or they are in a netbios hosts file.
  37.  
  38.        Nmbd can also be used as a  WINS  (Windows  Internet  Name
  39.        Server)  server. It will do this automatically by default.
  40.        What this basically means is that it will respond  to  all
  41.        name requests that it receives that are not broadcasts, as
  42.        long as it can resolve the name.
  43.  
  44. OPTIONS
  45.        -B
  46.  
  47.           On some systems, the server is unable to determine  the
  48.           broadcast   address   to   use  for  name  registration
  49.           requests. If your  system  has  this  difficulty,  this
  50.           parameter  may be used to specify an appropriate broad-
  51.           cast address. The address should be given  in  standard
  52.           "a.b.c.d" notation.
  53.  
  54.           Only use this parameter if you are sure that the server
  55.           cannot properly determine the proper broadcast address.
  56.  
  57.           The  default  broadcast  address  is  determined by the
  58.           server at run time. If it encounters  difficulty  doing
  59.           so, it makes a guess based on the local IP number.
  60.        -I
  61.  
  62.  
  63.  
  64. nmbd                        17/1/1995                           1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. NMBD(8)                        nmbd                       NMBD(8)
  71.  
  72.  
  73.           On  some systems, the server is unable to determine the
  74.           correct IP address to use. This allows you to  override
  75.           the default choice.
  76.  
  77.        -D
  78.  
  79.           If specified, this parameter causes the server to oper-
  80.           ate as a daemon. That is, it detaches itself  and  runs
  81.           in the background, fielding requests on the appropriate
  82.           port.
  83.  
  84.           By default, the server will NOT operate as a daemon.
  85.  
  86.        -C comment string
  87.  
  88.           This allows you to set the  "comment  string"  that  is
  89.           shown next to the machine name in browse listings.
  90.  
  91.           A %v will be replaced with the Samba version number.
  92.  
  93.           A %h will be replaced with the hostname.
  94.  
  95.           It defaults to "Samba %v".
  96.  
  97.        -G
  98.  
  99.           This option allows you to specify a netbios group (also
  100.           known as lanmanager domain) that the server  should  be
  101.           part  of.  You may include several of these on the com-
  102.           mand line if you like. Alternatively you can use the -H
  103.           option  to  load a netbios hosts file containing domain
  104.           names.
  105.  
  106.           At startup, unless the -R switch  has  been  used,  the
  107.           server  will attempt to register all group names in the
  108.           hosts file  and  on  the  command  line  (from  the  -G
  109.           option).
  110.  
  111.           The server will also respond to queries on this name.
  112.  
  113.        -H
  114.  
  115.           It may be useful in some situations to be able to spec-
  116.           ify a list of netbios names for which the server should
  117.           send  a  reply if queried. This option allows that. The
  118.           syntax is similar to the standard /etc/hosts file  for-
  119.           mat, but has some extensions.
  120.  
  121.           The file contains three columns. Lines beginning with a
  122.           # are ignored as comments. The first column  is  an  IP
  123.           address,  or a hostname. If it is a hostname then it is
  124.           interpreted as the IP address  returned  by  gethostby-
  125.           name()  when  read.  Any  IP address of 0.0.0.0 will be
  126.           interpreted as the servers own IP address.
  127.  
  128.  
  129.  
  130. nmbd                        17/1/1995                           2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. NMBD(8)                        nmbd                       NMBD(8)
  137.  
  138.  
  139.           The second column is a netbios name. This is  the  name
  140.           that  the  server will respond to. It must be less than
  141.           20 characters long.
  142.  
  143.           The third column  is  optional,  and  is  intended  for
  144.           flags.  Currently the only flags supported are G, S and
  145.           M. A G indicates that the name is a group  (also  known
  146.           as domain) name.
  147.  
  148.           At  startup all groups known to the server (either from
  149.           this file or from the -G option) are registered on  the
  150.           network (unless the -R option has been selected).
  151.  
  152.           A  S  or G means that the specified address is a broad-
  153.           cast address of a network that you want  people  to  be
  154.           able  to browse you from. Nmbd will search for a master
  155.           browser in that domain and will send host announcements
  156.           to  that machine, informing it that the specifed somain
  157.           is available.
  158.  
  159.           A M means that this name is the  default  netbios  name
  160.           for  this machine. This has the same affect as specify-
  161.           ing the -n option to nmbd.
  162.  
  163.           After startup the server waits for  queries,  and  will
  164.           answer  queries  to any name known to it. This includes
  165.           all names in the netbios hosts file (if any), it's  own
  166.           name, and any names given with the -G option.
  167.  
  168.           The  primary  intention  of the -H option is to allow a
  169.           mapping from netbios names to  internet  domain  names,
  170.           and  to  allow  the  specification  of  groups that the
  171.           server should be part of.
  172.  
  173.           Example:
  174.  
  175.                   # This is a sample netbios hosts file
  176.  
  177.                   # DO NOT USE THIS FILE AS-IS
  178.                   # YOU MAY INCONVENIENCE THE OWNERS OF THESE IPs
  179.                   # if you want to include a name with a space in
  180.           it then
  181.                   # use double quotes.
  182.  
  183.                   # first put ourselves in the group LANGROUP
  184.                   0.0.0.0 LANGROUP G
  185.  
  186.                   # next add a netbios alias for a faraway host
  187.                   arvidsjaur.anu.edu.au ARVIDSJAUR
  188.  
  189.                   # finally put in an IP for a hard to find host
  190.                   130.45.3.213 FREDDY
  191.  
  192.                   # now we want another  subnet  to  be  able  to
  193.  
  194.  
  195.  
  196. nmbd                        17/1/1995                           3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. NMBD(8)                        nmbd                       NMBD(8)
  203.  
  204.  
  205.           browse
  206.                   # us in the workgroup UNIXSERV
  207.                   192.0.2.255  UNIXSERV G
  208.  
  209.  
  210.        -M workgroup name
  211.  
  212.           If  this parameter is given, the server will look for a
  213.           master browser for the specified workgroup name, report
  214.           success  or  failure,  then exit. If successful, the IP
  215.           address of the name located will be reported.
  216.  
  217.           If you use the workgroup name "-" then nmbd will search
  218.           for  a  master  browser  for any workgroup by using the
  219.           name __MSBROWSE__.
  220.  
  221.           This option is meant to be used  interactively  on  the
  222.           command line, not as a daemon or in inetd.
  223.  
  224.        -N
  225.  
  226.           On  some systems, the server is unable to determine the
  227.           netmask. If  your  system  has  this  difficulty,  this
  228.           parameter  may  be  used to specify an appropriate net-
  229.           mask. The mask should be given  in  standard  "a.b.c.d"
  230.           notation.
  231.  
  232.           Only use this parameter if you are sure that the server
  233.           cannot properly determine the proper netmask.
  234.  
  235.           The default netmask is determined by the server at  run
  236.           time.  If it encounters difficulty doing so, it makes a
  237.           guess based on the local IP number.
  238.  
  239.        -d debuglevel
  240.  
  241.           debuglevel is an integer from 0 to 5.
  242.  
  243.           The default value if this parameter is not specified is
  244.           zero.
  245.  
  246.           The  higher  this value, the more detail will be logged
  247.           to the log files about the activities of the server. At
  248.           level 0, only critical errors and serious warnings will
  249.           be logged. Level 1 is a reasonable level for day to day
  250.           running  -  it  generates a small amount of information
  251.           about operations carried out.
  252.  
  253.           Levels above 1 will generate  considerable  amounts  of
  254.           log  data, and should only be used when investigating a
  255.           problem. Levels above 3 are designed for  use  only  by
  256.           developers  and generate HUGE amounts of log data, most
  257.           of which is extremely cryptic.
  258.  
  259.  
  260.  
  261.  
  262. nmbd                        17/1/1995                           4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. NMBD(8)                        nmbd                       NMBD(8)
  269.  
  270.  
  271.        -l log file
  272.  
  273.           If specified, logfile specifies a  base  filename  into
  274.           which  operational data from the running server will be
  275.           logged.
  276.  
  277.           The default base name is specified at compile time.
  278.  
  279.           The base name is  used  to  generate  actual  log  file
  280.           names.  For  example,  if the name specified was "log",
  281.           the following files would be used for log data:
  282.  
  283.              log.nmb (containing debugging information)
  284.  
  285.              log.nmb.in (containing inbound transaction data)
  286.  
  287.              log.nmb.out (containing outbound transaction data)
  288.  
  289.           The log  files  generated  are  never  removed  by  the
  290.           server.
  291.  
  292.        -n netbios name
  293.  
  294.           This  parameter  tells  the server what netbios name to
  295.           respond with when queried. The same name is also regis-
  296.           tered on startup unless the -R parameter was specified.
  297.  
  298.           The default netbios name used if this parameter is  not
  299.           specified  is  the name of the host on which the server
  300.           is running.
  301.  
  302.        -p port number
  303.  
  304.           port number is a positive integer value.
  305.  
  306.           The default value if this parameter is not specified is
  307.           137.
  308.  
  309.           This  number  is the port number that will be used when
  310.           making connections to the server from client  software.
  311.           The standard (well-known) port number for the server is
  312.           137, hence the default. If you wish to run  the  server
  313.           as  an  ordinary user rather than as root, most systems
  314.           will require you to use a port number greater than 1024
  315.           -  ask your system administrator for help if you are in
  316.           this situation.
  317.  
  318.           Note that the name server uses UDP, not TCP!
  319.  
  320.           This parameter is not normally specified except in  the
  321.           above situation.
  322.  
  323. FILES
  324.        /etc/inetd.conf
  325.  
  326.  
  327.  
  328. nmbd                        17/1/1995                           5
  329.  
  330.  
  331.  
  332.  
  333.  
  334. NMBD(8)                        nmbd                       NMBD(8)
  335.  
  336.  
  337.           If  the  server  is to be run by the inetd meta-daemon,
  338.           this file must contain suitable startup information for
  339.           the  meta-daemon. See the section "INSTALLATION" below.
  340.  
  341.        /etc/rc.d/rc.inet2
  342.  
  343.           (or whatever initialisation script your system uses)
  344.  
  345.           If running the server as a daemon at startup, this file
  346.           will  need  to  contain an appropriate startup sequence
  347.           for the server. See the section "Installation" below.
  348.  
  349.        /etc/services
  350.  
  351.           If running the server via the meta-daemon  inetd,  this
  352.           file  must contain a mapping of service name (eg., net-
  353.           bios-ns)  to service port (eg., 137) and protocol  type
  354.           (eg., udp). See the section "INSTALLATION" below.
  355.  
  356.  
  357. ENVIRONMENT VARIABLES
  358.        Not applicable.
  359.  
  360.  
  361. INSTALLATION
  362.        The location of the server and its support files is a mat-
  363.        ter for individual system  administrators.  The  following
  364.        are thus suggestions only.
  365.  
  366.        It  is  recommended  that the server software be installed
  367.        under the /usr/local hierarchy, in a directory readable by
  368.        all,  writeable  only  by  root. The server program itself
  369.        should be executable by all, as users may wish to run  the
  370.        server  themselves  (in  which  case it will of course run
  371.        with their privileges).  The server should NOT  be  setuid
  372.        or setgid!
  373.  
  374.        The server log files should be put in a directory readable
  375.        and writable only by root, as the log  files  may  contain
  376.        sensitive information.
  377.  
  378.        The remaining notes will assume the following:
  379.  
  380.           nmbd (the server program) installed in /usr/local/smb
  381.  
  382.           log files stored in /var/adm/smblogs
  383.  
  384.        The  server  may  be run either as a daemon by users or at
  385.        startup, or it may be run from a meta-daemon such as inetd
  386.        upon  request.  If run as a daemon, the server will always
  387.        be ready, so starting sessions will be faster. If run from
  388.        a meta-daemon some memory will be saved and utilities such
  389.        as the tcpd TCP-wrapper may be used for extra security.
  390.  
  391.  
  392.  
  393.  
  394. nmbd                        17/1/1995                           6
  395.  
  396.  
  397.  
  398.  
  399.  
  400. NMBD(8)                        nmbd                       NMBD(8)
  401.  
  402.  
  403.        When you've decided, continue  with  either  "Running  the
  404.        server as a daemon" or "Running the server on request".
  405.  
  406. RUNNING THE SERVER AS A DAEMON
  407.        To  run the server as a daemon from the command line, sim-
  408.        ply put the "-D" option on the command line. There  is  no
  409.        need  to place an ampersand at the end of the command line
  410.        - the "-D" option causes the server to detach itself  from
  411.        the tty anyway.
  412.  
  413.        Any  user  can run the server as a daemon (execute permis-
  414.        sions permitting, of course). This is useful  for  testing
  415.        purposes.
  416.  
  417.        To  ensure that the server is run as a daemon whenever the
  418.        machine is started, you will need  to  modify  the  system
  419.        startup  files.  Wherever  appropriate  (for  example,  in
  420.        /etc/rc.d/rc.inet2), insert the following line, substitut-
  421.        ing values appropriate to your system:
  422.  
  423.           /usr/local/smb/nmbd -D -l/var/adm/smblogs/log
  424.  
  425.        (The  above should appear in your initialisation script as
  426.        a single line.  Depending on  your  terminal  characteris-
  427.        tics,  it may not appear that way in this man page. If the
  428.        above appears as more than one line, please treat any new-
  429.        lines  or indentation as a single space or TAB character.)
  430.  
  431.        If the options used at compile time  are  appropriate  for
  432.        your system, all parameters except the desired debug level
  433.        and "-D" may be omitted.  See  the  section  on  "Options"
  434.        above.
  435.  
  436. RUNNING THE SERVER ON REQUEST
  437.        If  your  system uses a meta-daemon such as inetd, you can
  438.        arrange to have the SMB name  server  started  whenever  a
  439.        process  attempts  to connect to it. This requires several
  440.        changes to the startup files on the host machine.  If  you
  441.        are experimenting as an ordinary user rather than as root,
  442.        you will need the assistance of your system  administrator
  443.        to modify the system files.
  444.  
  445.        First,  ensure  that  a  port  is  configured  in the file
  446.        /etc/services. The well-known port 137 should be  used  if
  447.        possible, though any port may be used.
  448.  
  449.        Ensure  that  a  line  similar  to  the  following  is  in
  450.        /etc/services:
  451.  
  452.           netbios-ns     137/udp
  453.  
  454.        Note for NIS/YP users: You may need  to  rebuild  the  NIS
  455.        service  maps  rather  than alter your local /etc/services
  456.        file.
  457.  
  458.  
  459.  
  460. nmbd                        17/1/1995                           7
  461.  
  462.  
  463.  
  464.  
  465.  
  466. NMBD(8)                        nmbd                       NMBD(8)
  467.  
  468.  
  469.        Next, put a suitable line in the file /etc/inetd.conf  (in
  470.        the  unlikely event that you are using a meta-daemon other
  471.        than inetd, you are on your own). Note that the first item
  472.        in  this  line  matches the service name in /etc/services.
  473.        Substitute appropriate values for your system in this line
  474.        (see inetd(8)):
  475.  
  476.           netbios-ns  dgram  udp  wait  root  /usr/local/smb/nmbd
  477.           -l/var/adm/smblogs/log
  478.  
  479.        (The above should appear in /etc/inetd.conf  as  a  single
  480.        line.  Depending  on your terminal characteristics, it may
  481.        not appear that way  in  this  man  page.   If  the  above
  482.        appears  as  more than one line, please treat any newlines
  483.        or indentation as a single space or TAB character.)
  484.  
  485.        Note that there is no need to specify a port number  here,
  486.        even if you are using a non-standard port number.
  487.  
  488. TESTING THE INSTALLATION
  489.        If  running the server as a daemon, execute it before pro-
  490.        ceeding. If using a meta-daemon, either restart the system
  491.        or  kill  and  restart  the  meta-daemon. Some versions of
  492.        inetd will  reread  their  configuration  tables  if  they
  493.        receive a HUP signal.
  494.  
  495.        To  test  whether  the  name server is running, start up a
  496.        client on a different machine and see whether the  desired
  497.        name  is now present. Alternatively, run the nameserver on
  498.        a different machine  specifying  "-L  netbiosname",  where
  499.        "netbiosname"  is  the  name  you have configured the test
  500.        server to respond with. The command  should  respond  with
  501.        success, and the IP number of the machine using the speci-
  502.        fied netbios name. You may need the -B parameter  on  some
  503.        systems. See the README file for more information on test-
  504.        ing nmbd.
  505.  
  506.  
  507. VERSION
  508.        This man page is (mostly) correct for  version  1.9.00  of
  509.        the  Samba  suite,  plus some of the recent patches to it.
  510.        These notes will necessarily lag behind development of the
  511.        software,  so  it  is  possible  that  your version of the
  512.        server has extensions or parameter semantics  that  differ
  513.        from  or  are  not covered by this man page. Please notify
  514.        these to the address below for rectification.
  515.  
  516. SEE ALSO
  517.        inetd(8), smbd(8), smb.conf(5), smbclient(1), testparm(1),
  518.        testprns(1)
  519.  
  520.  
  521. DIAGNOSTICS
  522.        [This section under construction]
  523.  
  524.  
  525.  
  526. nmbd                        17/1/1995                           8
  527.  
  528.  
  529.  
  530.  
  531.  
  532. NMBD(8)                        nmbd                       NMBD(8)
  533.  
  534.  
  535.        Most  diagnostics  issued  by the server are logged in the
  536.        specified log file. The log file name is specified at com-
  537.        pile time, but may be overridden on the command line.
  538.  
  539.        The  number and nature of diagnostics available depends on
  540.        the debug level used by the server. If you have  problems,
  541.        set the debug level to 3 and peruse the log files.
  542.  
  543.        Most  messages  are  reasonably self-explanatory. Unfortu-
  544.        nately, at time of creation of this man  page  the  source
  545.        code  is  still  too  fluid to warrant describing each and
  546.        every diagnostic. At this stage your best bet is still  to
  547.        grep  the source code and inspect the conditions that gave
  548.        rise to the diagnostics you are seeing.
  549.  
  550.  
  551. BUGS
  552.        None known.
  553.  
  554. CREDITS
  555.        The original Samba software  and  related  utilities  were
  556.        created by Andrew Tridgell (samba-bugs@anu.edu.au). Andrew
  557.        is also the Keeper of the Source for this project.
  558.  
  559.        This man page written by Karl Auer (Karl.Auer@anu.edu.au)
  560.  
  561.        See smb.conf(5)  for  a  full  list  of  contributors  and
  562.        details on how to submit bug reports, comments etc.
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592. nmbd                        17/1/1995                           9
  593.  
  594.  
  595.