Installation & Configuring WINS on Windows 2003

Background

To get Linux and Windows computers to be able to use the same name resolution mechanism we can rely on DNS or Microsoft WINS.

While DNS supports global address names, WINS is better suited for mapping Microsoft Windows computer names to their corresponding IP Address.

 

WINS

What is WINS

Wikipedia

Link

Windows Internet Name Service (WINS) is Microsoft’s implementation of NetBIOS Name Service (NBNS), a name server and service for NetBIOS computer names.

WINS offers to NetBIOS names a central mapping of host names to network addresses.

Like the DNS, it is implemented in two parts.

The parts are :-

  1. Server
    • A server service that manages a database of netbios names.
    • It facilitates server to server replication, service requests, and conflicts.
    • A TCP/IP client component supports client’s registration and renewal of names
  2. Client
    • And, respond to clients query requests

Installation

Outline

  1. Windows
    • Launch Configure Your Server
      • Control Panel, Administrative Tools, Configure Your Server
    • Window – “Welcome to the Configure Your Server Wizard”
    • Window – Preliminary Steps
    • Window – Server Role
      • Select “WINS Server”
    • Avail Windows Installation Media
      • In our case Windows Server 2003 Standard Edition

Images

Image – Welcome

Image – Preliminary Steps

Image – Server Role

WINS server is marked not Configured

Image – Configuring Components

Please insert the Compact Disc labeled ‘Windows Server 2003, Standard Edition CD-ROM’ into your CD-ROM

 

Files Needed – Copy files from

Summary of Selections

This Server is now a WINS Server

Configuration

On each Workstation, access Control panel, networking, NIC Configuration and specify WINS Server IP Address.

Samba :- Name Resolution – From Windows, Resolve Linux Host Names

Background

Upon trying to connect to the lone Linux host on our LAB network found it inaccessible.

Later found out that the IP Address received from the DHCP Server has changed.

 

Goal

Need to be able to use name resolution and find the Linux host from a windows box.

 

Network Ports

  1. Netbios Name Service
    • UDP Port 137
  2. Netbios Datagram Service
    • UDP Port 138
  3. SMB/CIFS Network Traffic
    • Windows NT 4.0 and Below
      • TCP Port 139
      • UDP Port 139
    • Windows 2000 and above
      • TCP Port 445

Access Linux Hosts from Windows

Outline

  1. Samba Package
    • Is Samba Package Installed?
    • If not, install Samba Package
  2. Configuration
    • /etc/samba/smb.conf
      • netbios name
  3. Start and Enable Services
    • smb
      • Start & Enable for auto-start
      • Check Status
  4. Firewall
    • Netbios Naming Service
      • UDP port 137
      • TCP port 137
  5. Confirm
    • Linux
      • Confirm listening network ports
    • Windows
      • Confirm windows hosts name resolution

Tasks

Samba Package

Is Samba Installed?

yum
Syntax
sudo yum list installed

Sample
sudo yum list installed | grep samba

Output – Image

source.windows.01.20190709.0847PM

Explanation
  1. Samba Installed

Install Samba

If Samba has not yet been installed, we install it.

yum
Syntax
sudo yum -y install {package}
Sample
sudo yum -y install samba

Samba Configuration

Outline

  1. /etc/samba/smb.conf
    • Domain
    • Host
Editor
Syntax
sudo vi {file}
Sample
sudo vi /etc/samba/smb.conf

Output – Image

smb.conf.02.20190709.0946PM.PNG

Service

Service Start and Enable for auto-start

Syntax
sudo systemctl start {service}
sudo systemctl enable {service}
Sample
sudo systemctl start nmb
sudo systemctl enable nmb

 

Service Status

Syntax
sudo service {service} status -l
Sample
sudo service nmb status -l
Output

service.nmb.status.01.20190709.0913PM.PNG

Explanation
  1. Local Master Browser
    • Our Linux host takes upon the role of a local master browser
    • The role is for a specific subnet based on the Interface’s IP Address

Firewall

Firewall – Open
Syntax
sudo firewall-cmd --zone=public --add-port={port}/{protocol} --permanent

Sample
sudo firewall-cmd --zone=public --add-port=137/udp --permanent
sudo firewall-cmd --zone=public --add-port=137/tdp --permanent

Output – Image

firewall.137.01.20190709.0902PM

Explanation
  1. TCP Port 137
    • Opened
  2. UDP Port 137
    • Opened

Confirmation

Confirm Listening Ports

On Linux Hosts, confirm listening network ports

netstat
Syntax
netstat
Sample
netstat -lu | grep netbios
Output – Image

netstat.listening.01.20190710.0218M

Explanation
  1. The listening ports are listed
    • Network Ports
      • They are udp ports
        • netbios-ns
        • netbios-dgm
    • Services
      • /etc/services
        • Please consult the /etc/services file for corresponding network port numbers for the listed service

 

Confirm Windows Host Name Resolution

Confirm that windows host able to perform name resolution against Linux Hosts

Command Line Tools
Syntax
ping {linux-host-name}
Sample
ping linuxdbhost
Output – Image

ping.windows.02.20190710.0144AM

Explanation
  1. The windows host is able to perform name resolution against the windows host

 

Referenced Work

Vladyslav Baidak
Backend Engineer at Scalified
Devops: Configuring Host Name Resolution
Link
September 24, 2017

References

  1. Samba.org
    • Firewalling Samba
      Link
  2. Centrify
    • Configuring the Samba integration
      • Modifying the Samba smb.conf configuration file
        Link
  3. Stack Exchange
    • superuser
      • What is NetBIOS? Does Windows need its ports 137 and 138 open?
        Link
  4. Rackspace
    • How To
      • Check running services on Linux
        Link
  5. Makandra Cards
    • netstat: show listening ports
      Link
  6. Red Hat
    • Archives
      • Re: What is NMB ?
        Link
  7. OS Technix
    • How To Find The Port Number Of A Service In Linux
      Link

Win OS – Error – “Certificate for local system with Thumbprint is about to expire or already expired”

Background

Want to quickly deal with a MS Windows Error.

The error is logged in the Event Viewer and it reads :-

Certificate for local system with Thumbprint is about to expire or already expired.

Event Viewer

Windows Logs

Application

List

List Events
Image

autoEnrollment.20190702.0802PM

Tabulate
  1. Log Name :- Application
  2. Source :- CertificateServicesClient-AutoEnrollment
  3. Event ID :- 64

Trouble Shooting

PowerShell

Outline

  1. Issue Directory command against local machine’s certificate repository
    • Specifically check machine, not services nor user
  2. Return Sorted By
    • Display the following fields
      • Subject
      • Thumbprint
      • Expire Date

 

Code


Set-StrictMode -Version Latest

Write-Host

Write-host "Certificates in Local Machine Store"
Write-host "==================================="

dir cert:\LocalMachine\my | Sort-Object NotAfter | Foreach-Object `
	{

		$log = "{0}" -f $_.subject;
		Write-host $log

		$log = "`tThumprint :- {0}" -f $_.thumbprint;
		Write-host $log

		$log = "`tExpiry Date :- {0}" -f $_.NotAfter;
		Write-host $log

		Write-host
		#Write-Host

	}

Output

listCertsMachine.20190702.0829PM.PNG

Expiration

We can see that one of our certificates expired at 5 AM this morning.

SQL Server – Distributed Replay :- Component Services Configuration

 

Background

It is a good practice to review Windows Event Viewer upon installing new products and also as part of ongoing maintenance.

 

Installing

For this post we will do so as we familiarize ourselves with SQL Server’s Distributed Replay toolset.

Trouble Shooting

Event Viewer

Images

Windows Logs – System

Image – List Events

SQLServerDistributedReplayController.launchAndActivation.01.EventViewer.20190625.0336AM.PNG

Image – Detail Event

Image – Detail Event – Replay Controller

eventViewer.SQLServerDistributedReplayController.20190625.0440PM.PNG

Image – Detail Event – Replay Client

eventViewer.SQLServerDistributedReplayClient.20190625.0837AM.PNG

SERVICES

SQL Server Distributed Replay Controller

Text

The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID
{D63B10C5-BB46-4990-A94F-E40B9D520160}
and APPID
{9CA88EE3-ACB7-47C8-AFC4-AB702511C276}
to the user NT SERVICE\SQL Server Distributed Replay Controller SID (S-1-5-80-1337333740-2787872843-2774717225-1767203911-559312492) from address LocalHost (Using LRPC) running in the application container Unavailable SID (Unavailable). This security permission can be modified using the Component Services administrative tool.

Explanation

  1. Issue :- Does not have Local Activation permission
  2. CLASS ID :- D63B10C5-BB46-4990-A94F-E40B9D520160
  3. APPID :- 9CA88EE3-ACB7-47C8-AFC4-AB702511C276
  4. User :- NT SERVICE\SQL Server Distributed Replay Controller SID (S-1-5-80-1337333740-2787872843-2774717225-1767203911-559312492)
  5. Source Computer :- Localhost
  6. Using :- LRPC ( Local RPC )

SQL Server Distributed Replay Client

Text

The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID
{D63B10C5-BB46-4990-A94F-E40B9D520160}
 and APPID
{9CA88EE3-ACB7-47C8-AFC4-AB702511C276}
 to the user NT SERVICE\SQL Server Distributed Replay Client SID (S-1-5-80-3249811479-2167633679-2115734285-1138413726-166979568) from address LocalHost (Using LRPC) running in the application container Unavailable SID (Unavailable). This security permission can be modified using the Component Services administrative tool.

Explanation

  1. Issue :- Does not have Local Activation permission
  2. CLASS ID :- D63B10C5-BB46-4990-A94F-E40B9D520160
  3. APPID :- 9CA88EE3-ACB7-47C8-AFC4-AB702511C276
  4. User :- NT SERVICE\SQL Server Distributed Replay Client SID (S-1-5-80-3249811479-2167633679-2115734285-1138413726-166979568)
  5. Source Computer :- Localhost
  6. Using :- LRPC ( Local RPC )

Remediation

Outline

  1. Services
    • The List of Services are :-
      • SQL Server Distributed Replay Controller
      • SQL Server Distributed Replay Client
    • Please access the Services applet and get the Service Account
    • Get the following information
      • Accounts that Services are running under
      • Service Folder
  2. Component Services
    • Launch Component Services
      • Navigate to “Console Root” \ “Component Services” \ Computers \ “My Computer” \ “DCOM Config” branch
      • Select “DReplayController”
      • Right click on the component
      • Select Properties
      • Access “Security” Tab
        • Access the “Launch and Activation Permissions” group box
          • Ensure that the “Customize” option is selected
          • In the “Launch and Activation Permission” window
            • Grant the “NT Service\SQL Server Distributed Replay Client” principal the following permissions
              • Local Launch
              • Remote Launch
              • Local Activation
              • Remote Activation
            • Grant the “SQL Server Distributed Replay Controller” principal the following permissions
              • Local Launch
              • Remote Launch
              • Local Activation
              • Remote Activation
      • Access the “Access Permissions” group box
        • Ensure that the “Customize” option is selected
        • In the “Launch and Activation Permission” window
          • Grant the “NT Service\SQL Server Distributed Replay Client” principal the following permissions
            • Local Access
            • Remote Access
          • Grant the “SQL Server Distributed Replay Controller” principal the following permissions
            • Local Access
            • Remote Access
  3. Restart Services
    • Stop the “SQL Server Distributed Replay Client” service
    • Stop the “SQL Server Distributed Replay Controller” service
    • Restart the “SQL Server Distributed Replay Controller” service
    • Restart the “SQL Server Distributed Replay Client” service
  4. Review Services Log
    • SQL Server Distributed Replay Controller
      • Review”SQL Server Distributed Replay Controller” Log Folder
    • SQL Server Distributed Replay Client
      • Review”SQL Server Distributed Replay Client” Log Folder

Tasks

Component Services

Component – DReplayController Properties

Tab – Security – Launch and Activation Permission
Initial

SQLServerDistributedReplayController.launchAndActivation.01.20190625.0334AM.PNG

Post Changes

SQLServerDistributedReplayController.launchAndActivation.02.20190625.0336AM.PNG

Tab – Security – Launch and Activation Permission
Initial

SQLServerDistributedReplayController.access.01.20190625.0341AM.PNG

Post Changes

SQLServerDistributedReplayController.access.02.20190625.0336AM.PNG

Review Services Log

DReplayController

DReplayController Log
Image

DReplayControllerLog.20190625.0402PM.png

Textual

2019-06-24 14:19:52:868 OPERATIONAL [Controller Service] Microsoft SQL Server Distributed Replay Controller - 15.0.1300.359.
2019-06-24 14:19:52:888 OPERATIONAL [Controller Service] © Microsoft Corporation.
2019-06-24 14:19:52:889 OPERATIONAL [Controller Service] All rights reserved.
2019-06-24 14:19:52:997 OPERATIONAL [Controller Service] Current edition is: [Enterprise Evaluation Edition].
2019-06-24 14:19:53:000 OPERATIONAL [Controller Service] The number of maximum supported client is 16.
2019-06-24 14:19:53:001 OPERATIONAL [Controller Service] Windows service "Microsoft SQL Server Distributed Replay Controller" has started under service account "NT Service\SQL Server Distributed Replay Controller". Process ID is 8792.
2019-06-24 14:19:53:003 OPERATIONAL [Controller Service] Time Zone: Pacific Standard Time.
2019-06-24 14:19:53:013 OPERATIONAL [Common] Initializing dump support.
2019-06-24 14:19:53:014 OPERATIONAL [Common] Failed to get DmpClient. [HRESULT=0x8007007F]
2019-06-24 17:53:37:589 OPERATIONAL [Controller Service] Windows service "Microsoft SQL Server Distributed Replay Controller" is stopping...

Explanation
  1. Edition
    • Current edition is: [Enterprise Evaluation Edition].
  2. Max Supported Client
    • The number of maximum supported client is 16.

DReplayClient

DReplayClient Log
Image

DReplayClientLog.20190625.0409PM

Textual

2019-06-25 08:37:49:929 OPERATIONAL  [Client Service]      Microsoft SQL Server Distributed Replay Client - 15.0.1300.359.
2019-06-25 08:37:49:930 OPERATIONAL  [Client Service]      © Microsoft Corporation.
2019-06-25 08:37:49:931 OPERATIONAL  [Client Service]      All rights reserved.
2019-06-25 08:37:49:936 OPERATIONAL  [Client Service]      Current edition is: [Enterprise Evaluation Edition].
2019-06-25 08:37:49:940 OPERATIONAL  [Common]              Initializing dump support.
2019-06-25 08:37:49:941 OPERATIONAL  [Common]              Failed to get DmpClient. [HRESULT=0x8007007F]
2019-06-25 08:37:49:943 OPERATIONAL  [Client Service]      Windows service "Microsoft SQL Server Distributed Replay Client" has started under service account "NT Service\SQL Server Distributed Replay Client". Process ID is 10812.
2019-06-25 08:37:49:946 OPERATIONAL  [Client Service]      Time Zone: Pacific Standard Time.
2019-06-25 08:37:49:949 OPERATIONAL  [Client Service]      Controller name is "LAB".
2019-06-25 08:37:49:951 OPERATIONAL  [Client Service]      Working directory is "E:\Program Files (x86)\Microsoft SQL Server\150\Tools\DReplayClient\WorkingDir".
2019-06-25 08:37:49:952 OPERATIONAL  [Client Service]      Result directory is "E:\Program Files (x86)\Microsoft SQL Server\150\Tools\DReplayClient\ResultDir".
2019-06-25 08:37:49:953 OPERATIONAL  [Client Service]      Heartbeat Frequency(ms): 3000
2019-06-25 08:37:49:954 OPERATIONAL  [Client Service]      Heartbeats Before Timeout: 3
2019-06-25 08:37:49:989 OPERATIONAL  [Client Service]      Registered with controller "LAB".

Explanation
  1. Version
    • 2019-06-25 08:37:49:929 OPERATIONAL [Client Service] Microsoft SQL Server Distributed Replay Client – 15.0.1300.359.
      • 15.0.1300.359
        • SQL Server 2019
  2. Edition
    • Current edition is: [Enterprise Evaluation Edition].
  3. DmpClient
    • Failed to get DmpClient. [HRESULT=0x8007007F]
  4. Service Account
    • Windows service “Microsoft SQL Server Distributed Replay Client” has started under service account “NT Service\SQL Server Distributed Replay Client”.
  5. Controller
    • Controller name is “LAB”.
  6. Registered
    • Registered with controller “LAB”.

Summary

Please grant your Distributed Replay Controller and Client Accounts the following component services privileges :-

  1. Component :- DReplayController
    • Launch and Activation” Permission
      • Local Launch
      • Remote Launch
      • Local Activation
      • Remote Activation
    • Access Permission
      • Local Access
      • Remote Access

 

 

 

Application Window, Does Not Fit on Screen

Background

A couple of posts ago spoke about not been able to adjust an application’s window.

Post

Here is the post :-

Smart System Menu
Link

 

Application Window

Original

Here is the original Application Window :-

app.Change.Before.20190624.0108PM.cropped.PNG

 

Remediation

Outline

  1. Launch Control Panel
  2. Select the “Display” applet
  3. The “Customize your Display” window appears
    • Review the “Multiple displays” entry
      • We had to change ours from “Duplicate these displays
      • to “Show Only on 2

Images

Image – Customize Your Display

Image – Customize Your Displays – Multiple Displays

Image – Customize Your Displays – Multiple Displays – “Duplicate these Displays”

settings.display.DuplicateTheseDisplays.01.20190624.0155PM.PNG

Image – Customize Your Displays – Multiple Displays – “Show Only On 2”

settings.display.20190624.0114PM.PNG

Application Window

Post Changes

Here is the Application Window post changing the Display Setting.

app.Change.After.20190624.0121PM.cropped.PNG

Smart System Menu

Background

Have an application that is not allowing me to resize it’s window.

Sought out tools to help.

Smart System Menu

The most accessible tool I found is the one from Alexander.

The tool’s name is Smart System Menu.

Artifact

The compiled app is here.

artifact.package.20190621

It is open source and it is available here.

 

Download

Downloaded the compiled binary.

Extract

The binary is compressed.

Please un-compress.

artifact.package.extract.20190621.0541PM

Execute

Please execute SmartSystemMenu.exe.

Once started, it runs in the background and accessible via the System Tray.

Usage

The system menu in each application is enhanced.

The enhancements is that we now have :-

  1. Resize Menu Entry
    • Specific Sizes
      • 640×480
      • 800×600
    • Manual
  2. Alignment

Images

Microsoft Windows – Word pad

usage.wordpad.01.20190621.0545PM.PNG

Summary

If you end up with an Application that is not easy to move around on the desktop, please consider Windows Screen sizing tools.

Unfortunately, it did not help with our targeted application.

The developer had chosen to not allow the window to be resized.

HP Array Controller Utility CLI – Usage – 01

Background

Let us quickly cover a few commands that can be issued within the HP Array Controller Utility CLI.

Initiate

Let us initiate “HP Array Controller Utility CLI”.

Desktop

Start Menu

HPArrayConfigurationUtility.CLI.01.20190611.0355PM.PNG

CLI Properties

HPArrayConfigurationUtility.CLI.App.01.20190611.0357PM.PNG

Path & App Name

“C:\Program Files (x86)\Compaq\Hpacucli\Bin\hpacucli.exe”

 

Commands

Outline

  1. Controller
    • Show Controller Status
  2. Disks
    • Physical Disk
      • Show information for all Physical Disks
      • Show information for specific Physical Disk
    • Logical Disk
      • Show information for all Logical Disks
      • Show information for specific Logical disk

Tasks

Controller

Show Controller Status

Syntax

controller all show status

Output

Explanation
  1. Smart Array
    • Smart Array P410i
      • Slot 0

 

Disks

Physical Disks

Show Physical Disks Status for all Discs
Syntax

controller slot=0 pd all show

Output

Explanation
  1. Shows information for each physical disks
    • Port
    • Box
    • Bay
    • Drive Type
      • SAS
    • Drive Size
      • 900 GB
    • Status
      • OK

 

Show Physical Disks Status for Specific Disk
Sample

controller slot=0 pd 3C:1:5 show

Output

Explanation
  1. Shows information for targeted physical disks
    • Port
    • Box
    • Bay
    • Interface Type
      • SAS
    • Drive Size
      • 900 GB
    • Rotational Speed
      • 10000
    • Firmware Revision
    • Model
      • Model: HP EG000300JWFVB
    • Physical Count
      • 2
    • Physical Transfer Rate
      • 6.0Gbps, Unknown

 

Logical Disks

Show Logical Disks Status for all Discs
Syntax

controller slot=0 ld all show

Output

Explanation
  1. Shows information for each array
    • Array
      • Logical Drive
        • Size
        • RAID Level
          • RAID 5
          • RAID 1
        • Status
          • OK
Show Logical Disks Status for targeted Disc
Syntax

controller slot=0 ld 4 show

Output

Explanation
  1. Shows information for targeted Logical Drive
    • Size
    • Fault Tolerance
      • RAID 5
    • Status
      • OK
    • Caching
      • Enabled
    • Mount Points
      • Drive F:
    • Drive Type

References

  1. HP
    • Hewlett Packard Enterprise Support Center
      • Hpacucli Utility for Linux – All Commands Guide
        Link
  2. The Geek Stuff
    • hpacucli Command Examples for Linux on HP Servers
      Link
  3. PHUOCTAI HUYNH
    • HP SERVER DISK HEALTH CHECK
      Link