Master Browser Lookup

Windows Master Browser Lookup for NetBIOS Name and Elected Master Browser

The folders and printers shared by Windows clients appear in the client network environment. If the network environment remains empty, it is often the computer browser service. Windows attempts to view all PCs on a Windows network in the network environment.

Windows Workstation Service

First, you need to make sure that a Windows network is working properly at all. The Windows Workstation Service and Server services must be running, and the network connection properties must have file and printer sharing and the Microsoft Network Client active, and TCP/IP over NetBIOS must be enabled.

Note that clients that are not in a domain are in the same workgroup, the WORKGROUP and WORKING GROUP are different groups. If all this does not yet lead to success, one should search for the computer on the network, which has been delegated to the master browser.

NetBIOS Name Information

The NBTscan is a program for scanning IP networks for NetBIOS name information. It sends a NetBIOS status query to any address in the specified range and lists received information in a human-readable form. For each responding host, the IP address, NetBIOS computer name, user name, and MAC address of the computer are displayed.

C:\> nbtscan -s: -h -v

To discover the master browser on a local network, the following content can be created in a batch file.

@Echo Off
Title Master Browser Lookup & Color 1A
call :IsAdmin

if not [%1]==[] goto lookup
echo use: nbt [ip address range]
echo example: nbt

nbtscan -s: -h -v %1 | find "Master Browser"
for /f "delims=" %%A in ('nbtscan -s"   " -h -v %1 ^| find "Master Browser"') do set "var=%%A"
echo .
echo Elected Master Browser on %var:~0,15%
echo .
nbtstat -A %var:~0,15%

Reg.exe query "HKU\S-1-5-19\Environment"
 cls & echo You must have administrator rights to continue ... 
 pause & exit

Using Copy Paste to the batch file .bat save and, when the IP network is committed, run as an administrator in the command prompt, the program nbtscan.exe and cygwin1.dll must be in the same directory, or the path to the program must be in the search path environment.

Download NBTScan

Master Browser Delegation

Often it helps when the PC of this is the master browser on its network to restart, so the choice to delegate another computer is triggered. Microsoft sets priorities here, by regulating the assignment (election) to the master browser is granted. Administrators don’t just want to leave it to random rules about who master browser should be, to do so, you open Regedit and go to the following key.


Edit the REG_SZ MaintainServerList key and set it to FALSE or TRUE, for disable or enable. For Windows XP and Server 2003, the REG_SZ key is IsDomainMaster with value FALSE / TRUE, and MaintainServerList with the value AUTO / NO / YES. The change does not take effect immediately and may take up to 48 minutes.

Linux Samba Master Browser

For Linux, the Samba configuration file smb.conf is responsible, in the following example, a Samba server with the highest priority is chosen as the master browser, suitable on a network without Windows PDC. In networks in these there is a Windows PDC it is not recommended.

    domain master = yes
    preferred master = yes
    local master = yes
    os level = 255
Illustration: Computer Browser Service Architecture

NBTStat is a command-line tool for troubleshooting NetBIOS name over TCP/IP (NetBT) resolution issues, it is part of the Windows standard. It shows protocol statistics and current TCP/IP connections with NetBT.

C:\> nbtstat -A
LAN connection 1:
Node IP[] address: Rang[]e ID: 

NetBIOS name table of the remote computer

    Name          Type  Status
    AMX3000       <00>  CLEAR  Registered
    WORKGROUP     <00>  GROUP  Registered
    WORKGROUP     <1C>  GROUP  Registered
    AMX3000       <20>  CLEAR  Registered
    WORKGROUP     <1B>  CLEAR  Registered
    WORKGROUP     <1E>  GROUP  Registered
    ADMINISTRATOR <03>  CLEAR  Registered

    MAC Adresse = 00-0B-AB-0B-11-8E

NetBIOS name tables type <00> is output in hex.</00>

<00> specifies the domain to which this computer belongs
<03> Computer name assigned to the messenger service
<20> Computer name assigned to the server service
<1C> Internet group name registered with domain controller
<1B> Identifying a domain master browser name
<1E> Computer can be used as a backup browser in the domain
<03> Username currently logged on to this computer
<1D> Identify segment master browsers without a domain

Install and get e-mail with fetchmail daemon

fetchmail daemon pick up e-mails and forward to local mailbox

fetchmail is a daemon for retrieving and forwarding e-mail; the Unix pioneer retrieves e-mail from remote mail servers and forwards them to the delivery system. The mail can then be retrieved using normal e-mail user agents such as mutt, elm, or mail.

What is fetchmail ?

The fetchmail e-mail program can run in daemon mode to repeatedly queries one or more systems at a given interval, it collects e-mails from servers that support all common e-mail retrieval services, such as POP3 and IMAP, also support the ESMTP-ETRN extension and the ODMR protocols.

This article describes how to use fetchmail on a CentOS smart host with Postfix. The e-mail from external mail service providers is retrieved and the recipient is redirected to the mailbox server that receives e-mail from the smart host. Mail accounts do not require forwarding, and the smart host also scans the e-mail for viruses and SPAM before they are delivered to the user’s mailbox.

Install fetchmail e-mail daemon

To install fetchmail e-mail daemon on CentOS 7, the extras repository is required, if not already available.

$ wget
$ sudo rpm -Uvh epel-release-latest-7*.rpm

The fetchmail daemon can be installed from the CentOS Extras repository.

$ yum -y install fetchmail

We create the fetchmail configuration file for the daemon under /etc/sysconfig.

# This file will be used to declare some vars for fetchmail
# Uncomment the following if you dont want localized log messages
# export LC_ALL=C

# Declare here if we want to start fetchmail. 'yes' or 'no'

Copy Paste /etc/sysconfig/fetchmail

The fetchmail e-mail daemon Init script is created, here for a CentOS host on this the Postfix MTA is already running. As root with vi /etc/rc.d/init.d/fetchmaild

# chkconfig: 35 99 00
# description: Start and stop fetchmail

. /etc/init.d/functions

start() {
  echo "Starting fetchmaild..."
  su fetchmail -s /bin/sh -c "fetchmail -vv -d 900 -a -f /etc/fetchmailrc -L /var/log/fetchmail"

stop() {
  echo "Shutting down fetchmaild..."
  su fetchmail -s /bin/sh -c "fetchmail --quit"

case "$1" in
    echo "Usage: $0 {start|stop|restart}"

exit 0

Copy Paste /etc/rc.d/init.d/fetchmail
Make the init script executable.

$ chmod 0755 /etc/rc.d/init.d/fetchmaild

Create the global fetchmailrc Recource configuration for operation as a daemon.

set daemon 900
set no syslog
set logfile /var/log/fetchmail
set postmaster "postmaster"
set no bouncemail
set no spambounce
set properties ""

poll with proto POP3
user '' there with password 'secret' is here options fetchall nokeep ssl smtphost localhost

Copy Paste /etc/fetchmailrc

For each mail server fetchmail retrieved from this e-mail, a poll line is created. The aim is to retrieve the external mailbox from to the POP3 Server and to be delivered to the user via the localhost via Postfix to the Mailbox Server. To prevent logging in maillog, log is made in fetchmail instead of it.

Possibilities with fetchmail

fetchmail offers a number of syntactic subtleties to make it easier for fetchmailrc to read files. For example, the words and, with, has, wants, and options are ignored by fetchmail, as well as punctuation marks. While it is possible to provide credentials for a server on a row, common configurations are specified over a number of different lines. fetchmail is insensitive to whitespace unless the argument is in quotation marks and closing characters.

fetchmail options

There are fetchmail provide several options for the Poll statement (e.B. nofetchall (default), fetchall, keep, nokeep ).The meanings are as follows:

nofetchall: retrieve only new messages (default). Unless otherwise specified (i.e. fetchall, keep ), this means nofetchall.
fetchall: get all messages, seen or not.keep.
keep: do not delete any message on server.
nokeep: delete the read messages on server.

Create the fetchmail user and group and set the rights.

$ groupadd -r fetchmail
$ useradd -r -m -g fetchmail -s /sbin/nologin fetchmail
$ chown fetchmail /etc/fetchmailrc
$ chmod 0600 /etc/fetchmailrc
$ touch /var/log/fetchmail
$ chown fetchmail:fetchmail /var/log/fetchmail
$ chmod 0600 /var/log/fetchmail

The fetchmail e-mail daemon starts.

$ /etc/rc.d/init.d/fetchmaild start

After changing the fetchmailrc configuration, the systemd daemon have to restart.

$ systemctl daemon-reload

fetchmail check

You can check the fetchmail e-mail daemon conversation to server with run the following command:

$ fetchmail -vv -N --ssl -p pop3 -P 995

Test the fetchmailrc configuration file.

$ fetchmail -v -a -k -f /etc/fetchmailrc

Check the fetchmail e-mail daemon process.

$ ps -ef | grep -v grep | grep fetchmail

The output may look something like this:

fetchma+ 4126 1 0 19:19 ?        00:00:00 fetchmail -vv -d 900 -a -f /etc/fetchmailrc -L /var/log/fetchmail
root 6488 3985 0 16:25 pts/0 00:00:00 su fetchmail

fetchmail daemon logging

fetchmail e-mail daemon logging now takes place in the fetchmail file.

$ tail -f /var/log/fetchmail

The fetchmail e-mail daemon man page outputs a lot of information.

$ man fetchmail
Exit mobile version