How to Install and Configure Linux NTP Server and Client NTP is a protocol that allows computers to synchronize time over networks for an accurate time

Install ntp

The ntp package contains utilities and daemons that will synchronize your computer’s time to Coordinated Universal Time (UTC) via the NTP protocol and NTP servers. The ntp packageincludes ntpdate (a program for retrieving the date and time from remote machines via a network) and ntpd (a daemon which continuously adjusts system time). Install the ntp package:

# yum install ntp

How do I configure an NTP Client?

Simply open /etc/ntp.conf file, enter:

# vi /etc/ntp.conf

Make sure the following line exists:

server ntp.server.com

Configure an NTP Server

If you have lots of server and desktop system, configure your own NTP server. Your NTP server contacts a central NTP server,provided by your ISP or a public time
server located at ntp.org, to obtain accurate time data. The server then allows other machines on your network to request the time data. Our sample setup:

192.168.1.5 ==> CentOS / Fedora / RHEL NTPD Server.
202.54.1.5 ==> ISP remote NTP server.
192.168.1.0/24 ==> NTP clients including desktop systems.

First, install and enable ntpd on 192.168.1.5:

# yum install ntp
# chkconfig ntpd on

Now open /etc/ntp.conf:

# vi /etc/ntp.conf

Make sure the following line exits:

restrict default ignore

Above will deny all access to any machine, server or client. However, you need to specifically authorized policy settings. Set it as follows:

restrict 202.54.1.5 mask 255.255.255.245 nomodify notrap noquery
server 202.54.1.5

Replace 202.54.1.5 and mask with actual remote ISP or ntp.org NTP server IP. Save and close the file.

Configure NTP clients to access your NTP Server

Now, you need to allow legitimate NTP clients to access the Server. For example, allow 192.168.1.0/24 network to synchronize to this server located at 192.168.1.5. Open /etc/ntp.conf and add policy as follows:

# Hosts on local network are less restricted.
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

Update your firewall settings, open /etc/sysconfig/iptables.

# vi /etc/sysconfig/iptables

Add the following line, before the final LOG and DROP lines for the RH-Firewall-1-INPUT chain:

-A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state --state NEW -p udp --dport 123 -j ACCEPT

Save and close the file. Finally, start ntpd:

# service ntpd start
# service iptables restart
# netstat -tulpn

Usefull Command for check NTP

1) Check if the date (year, month, day, hour, minute, second) is allign

# date

2) List active peers server

# ntpq -nc peers

3) edit ntp.conf

# vi /etc/ntp.conf

4) restart NTPd Deamon

# /etc/init.d/ntpd restart

5) Force update

# ntpdate -u ntp.server.com (ir IP)

How To Fix Scsiport.sys Blue Screen Errors (BSOD) Converting P2V a Windows 2000 error KMODE_EXCEPTION_NOT_HANDLED – scsiport.sys

What Is Scsiport.sys?

Scsiport.sys is a type of SYS file associated with Microsoft Office System Beta 2 Kit 2003 developed by Microsoft for the Windows Operating System. The latest known version of Scsiport.sys is 1.0.0.0, which was produced for Windows. This SYS file carries a popularity rating of 1 stars and a security rating of “UNKNOWN”.

What Are SYS Files?

SYS files such as scsiport.sys are third-party (eg. Microsoft) device drivers or critical system files that come as part of the Windows operating system. Most SYS files allow internal PC hardware or attached hardware, such as a printer, to communicate with third-party software programs (eg. web browsers, word processors, Microsoft Office System Beta 2 Kit 2003) and the operating system (eg. Windows).

Other SYS files are critical system files called “kernel mode device drivers” which are used to power the Windows operating system. Files such as “CONFIG.SYS” contain configuration settings and specify what device drivers should be loaded by the operating system. Without driver files such as scsiport.sys, you wouldn’t be able to do simple tasks such as printing a document.

Why Do I Have SYS Errors?

SYS file errors are typically caused by faulty hardware or corrupt device driver files. Because of the importance of Scsiport.sys in the functionality of Microsoft Office System Beta 2 Kit 2003 and other Windows functions, any corruption or damage to this file can create critical system errors in the form of a “blue screen of death” (BSOD). Please see “Causes of Scsiport.sys Errors” below for more information.

When Do SYS Errors Occur?

SYS errors, such as those associated with scsiport.sys, most often occur during computer startup, program startup, or while trying to use a specific function in your program (eg. printing).

Common Scsiport.sys Error Messages

The majority of scsiport.sys errors that you encounter will be “blue screen of death” errors (also know as a “BSOD” or “STOP error”) that occur in Windows XP, Vista, 7, 8, and 10:

  • “A problem has been detected and Windows has been shut down to prevent damage to your computer. The problem seems to be caused by the following file: Scsiport.sys.”
  • “:( Your PC ran into a problem and needs to restart. We’re just collecting some info, and then we’ll restart for you. If you would like to know more, you can search online later for this error: scsiport.sys.”
  • “STOP 0x0000000A: IRQL_NOT_LESS_EQUAL – scsiport.sys”
  • “STOP 0x0000001E: KMODE_EXCEPTION_NOT_HANDLED – scsiport.sys”
  • “STOP 0×00000050: PAGE_FAULT_IN_NONPAGED_AREA – scsiport.sys”

In most cases, you will experience scsiport.sys blue screen errors after you’ve installed new hardware or software. These scsiport.sys blue screens can appear during program installation, while a scsiport.sys-related software program (eg. Microsoft Office System Beta 2 Kit 2003) is running, while a Microsoft driver is being loaded, or during Windows startup or shutdown. Keeping track of when and where your STOP error occurs is a critical piece of information in troubleshooting the problem.

Causes of Scsiport.sys Errors

Scsiport.sys blue screen errors can be caused by a variety of hardware, firmware, driver, or software issues. These could be related to either Microsoft Office System Beta 2 Kit 2003 software or Microsoft hardware, but it is not necessarily the case.

More specifically, these scsiport.sys errors can be caused by:

 

  • Incorrectly configured, old, or corrupted Microsoft Office System Beta 2 Kit 2003 device drivers. (very common)
  • Corruption in Windows registry from a recent scsiport.sys-related software change (install or uninstall).
  • Virus or malware infection that has corrupted the scsiport.sys file or related Microsoft Office System Beta 2 Kit 2003 program files.
  • Hardware conflict after installing new Microsoft hardware, or hardware related to scsiport.sys.
  • Damaged or removed system files after you’ve installed software or drivers related to Microsoft Office System Beta 2 Kit 2003.
  • scsiport.sys blue screen caused by a damaged hard disk.
  • scsiport.sys STOP error due to memory (RAM) corruption.

Requirements:

  • VMware Standalone Converter version 4.0.1 (See Additional Info at the end)
  • Update Rollup 1 for Windows 2000 SP4 from our repository (KB891861)
  • Windows 2000 Sysprep tools (Q257813)
  • A Windows or Linux LiveCD. I recommend Knoppix (6.4+ – Linux) or Hiren (Windows).
    If you need to modify registry keys, use Hiren.

Procedure:

  1. Install VMware Standalone Converter version 4.0.1 on target machine
  2. Converto machine to VMware host or infrastructure;
  3. Extract sysprep tools and place them in C:\Documents and Settings\All Users\Application Data\VMware\VMware vCenter Converter Standalone\sysprep\2k
    That should be on the same machine that has VMware Converter, not the Windows 2000 server.
    * On Windows 2008, the location is C:\Users\All Users\VMware\VMware vCenter Converter Standalone\sysprep\2k (Thanks Anonymous for the tip!)
    or C:\ProgramData\VMware\VMware vCenter Converter Standalone\sysprep\2k (thanks Ben!)
  4. Either apply the update rollup to the server or extract the update rollup and replace it with the file SCSIPORT.SYS in C:\WINNT\system32\drivers. Applying the update is recommended if the system is stable.
  5. Run the Converter and deploy the agent. If you’re asked to restart, restart then start the VMware Converter service manually before running the Converter again, otherwise it’ll ask you to deploy the agent again.
  6. In Step 3: View / Edit Options, Click on the Devices pane and change the disk controller to BusLogic SCSI.
  7. Keep the number of processors as is, because if you change it, Windows 2000 won’t auto-detect new CPUs and you’ll need to update the Hardware Abstraction Layer (HAL) on it manually. See KB234558 and KB249694 for more details.
  8. In the Networks pane, deselect the option to connect at power on.
  9. In the Advanced Options pane, do not select the options to power off the source and select the option to power on the target (VM). Do install VMware tools.
    Do NOT select “configure guest preferences for the virtual machine”

 

How to Find MAC Addresse of NIC in Windows Team This article describes how to get the MAC addresses of all member Network Interface Cards (NICs)

There are lot of instances where the network communications fail when we are teaming up the incorrect network interfaces. Especially when the team members are the partitions of a virtual partition capable Converged Network Adapter (CNA), we need to make sure that we are teaming up correct partitions from different physical ports for redundancy and proper VLAN traffic. In such situations, the primary troubleshooting step related to network team’s connectivity issue is to validate the network team members.

The easiest way to ensure this is to compare the unique attributes of the partitioned interfaces with the data in the network card BIOS or out-of-band management tools (like iDRAC, ILO etc) or other baseboard management controllers. Media Access Control (MAC) addresses of the partitioned interfaces seen by the Operating System are the easiest and reliable unique identifiers in this scenario as the names for the interfaces will be different for different network cards.

The default available option to get the member NIC’s MAC address is to use the PowerShell command Get-NetAdapter <member NIC name>. For that we have to manually find the native teams in the server, their member NICs and then the MAC addresses of the member NICs.

The following short PowerShell script will automate this process and will list down the MAC addresses of the member NICs of all the native windows teams available in the server. The advantage with the below script is that it can be used on any Windows 2012 or Windows 2012 R2 servers without any modifications/inputs.

Script:

foreach ($i in ((Get-NetLbfoTeam).name))
{
Write-Host “`nTeam Name – “$i`n”Team Members: ”
Get-NetAdapter (Get-NetLbfoTeamMember -Team $i).Name | Format-Table
}

The best way is to open notepad, copy and paste this script, then save the file as ‘Save As’ > Select ‘All files’ > then name the file ‘nic.ps1’ > destination > where you want

Open Powershell, and run the file .ps1 from it:

MAC_Addresses_NIC_Team_2012
MAC_Addresses_NIC_Team_2012

Related Article: Technet Microsoft

How to Find a Lost, Missing, Hidden or Removed Network Card In a scenario where you have physically removed hardware from a machine you can no longer see it in device manager.

In a scenario where you have physically removed hardware from a machine you can no longer see it in device manager.  This does not mean that it is gone.  Evidence of that is, if for example you had a network card that had a Static IP address set and you remove the card and add a new one then try to set the IP address to the same as the old NIC you will get an error message. The error might look something like “The IP address 192.168.30.100 you have entered for this network adapter is already assigned to another adapter (Microsoft Virtual machine Bus Network Adapter #3) which is no longer present in the computer.  If the same address is assigned to both adapters and they both become active, only one of them will use this address.  This may result in incorrect system configuration”.  In Windows Server 2008 R2 and Windows 7 it actually gives you an opportunity to “remove the static IP configuration for the absent adapter”. If you say Yes, this will eliminate the IP conflict problem but does not solve the problem of the adapter still being present in the machine.  In older versions of the OS, it was even worse because every time you go into network properties it gives you an error message.  Another way this comes up is if you move a virtual machine from one host to another.  Like in the case of moving from Virtual Server 2005 R2 to Hyper-V or perhaps you are moving from one Hyper-V machine to another but you did not do an export, you just moved the VHD’s and created a new machine.

The IP address XXX.XXX.XXX.XXX you have entered for this network adapter is already assigned to another
The IP address XXX.XXX.XXX.XXX you have entered for this network adapter is already assigned to another

Getting rid of these old devices is actually very simple. Well, it is simple if you know how

Before you proceed, I recommend that you confirm that you have a good backup. I have never had a problem with this but hey, it is your server not mine.

Description

  • You need to run a command prompt so you can set an environment variable prior to opening the Device Manager This will bring up a command windowClick Start – Type the following command and then press ENTER

    cmd
  • Step 2: We have the command window open.  We now need to set the variable (that is the “set” line and then with the variable set, we need to run Device Manager.
    The file name for the Device Manager snap-in is devmgmt.msc.  The first line will not appear to do anything but it is setting the environment for next step.  The second command will actually open the Device Manager but it will be in a “special” mode which allows you to show devices that no longer exists.Type the following commands pressing ENTER after each line

    set devmgr_show_nonpresent_devices=1

    devmgmt.msc

  • Step 3: Now all we have to do is show hidden devices and you will be able to access the devices that are not present in the machine.  This will also turn a checkbox on in front of the Show Hidden Devices menu option.In this Special Device Manager Window; on the menu, click View then Show Hidden Devices
  • Step 4: Now you can just go find the adapter or device that is missing and delete it!  Expand the network adapter (or whatever category of device) and look for the device that needs to be removed.  The error message that you got should tell you the “name” of the device so you just have to go find that named device.  You may also notice while you are there that the icon for the “non-present” or missing device is slightly subdued so that will make it easier to find it if you have many devices in a category.See screen shot belowExpand the network adapter (or whatever category of device) and look for the device that needs to be removed.
    Right-Click the Device and select Uninstall
devmgr_show_nonpresent_devices
devmgr_show_nonpresent_devices

Related Article: VMware KB  | Microsoft Blog Technet

Linux Corner: Yum Errors while downloading installers epel-release Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

What is yum?

YUM stands for Yellowdog Updater, Modified. Like all other program’s in Linux, YUM is also an open source tool.

It was initially used in Duke University, for managing package installation on their Red Hat based system’s. These day’s its been widely used by almost all Red Hat based system’s. In fact its the default program installer and package management tool these days.

If you are interested in visiting the official home page of YUM, then i would recommend, visiting the below link of Duke university.

http://linux.duke.edu/projects/yum/

In particular yum is a software package manager that installs, updates, and removes packages on RPM-based systems. It automatically computes dependencies and figures out what things should occur to install packages. yum makes it easier to maintain groups of machines without having to manually update each one using rpm.

Features include:

  • Support for multiple repositories
  • Simple configuration
  • Dependency calculation
  • Fast operation
  • RPM-consistent behavior
  • Package group support, including multiple-repository groups
  • Simple interface

yum uses an online repository by default, but you can also configure it to use a local repository of packages.

Linux Corner of Today

Trying to update or install packages with YUM, the procedure doesn’t work, with the following error

Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

You have some possibilities to solve the problem:

  1. Update ca-certificates package. Before that, just disable all repos with https that are failing. For example if you need to disable only epel repo:
    yum --disablerepo=epel -y update  ca-certificates
  2. Editing both /etc/yum.repos.d/epel.repo and /etc/yum.repos.d/epel-testing.repo files, commenting all entries starting with mirrorlist=... and uncomenting all the entries starting with baseurl=....