Sunday, May 17, 2020

Failed to Start Virtual Machine in VMWare Workstation Player

I upgraded VMWare Workstation Player to 15.5.2 on a Windows 10 host. It failed to start any virtual machines after the upgrade. The error message is

VMware Player and Device/Credential Guard are not compatible. VMware
Player can be run after disabling Device/Credential Guard. Please visit
http://www.vmware.com/go/turnoff_CG_Dg for more details. 
 

I followed the instruction to make sure that the Device Guide was disabled. Since I have a Windows Pro, to disable Device Guard, I run the Local Group Policy Editor

mmc gpedit.msc


However, the problem remains. It turned out an additional step was need, that was to run the following command as the system adiministrator and reboot the Windows host,

bcdedit /set hypervisorlaunchtype off 

Wednesday, May 13, 2020

Configuring Windows LAN Manager Authentication Level

Windows LAN Manager authentication level can cause interoperability issues between Windows servers and Samba clients, between Windows clients and Samba servers, and sometimes between Samba servers and clients, and Windows servers and clients.

On Windows, the authentication level is in the Windows Registry at

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\LmCompatibilityLevel




There are two methods to change the authentication level. Regardless on which edition of Windows, one can always directly edit the Windows Registry. The value of the LmCompatibilityLevel can be 0, 1, 2, 3, 4, and 5 on Windows 10. According to the official Windows 10 documentation, the meaning of the 6 levels are as follows,



SettingDescription Registry security level
Send LM & NTLM responses Client devices use LM and NTLM authentication, and they never use NTLMv2 session security. Domain controllers accept LM, NTLM, and NTLMv2 authentication. 0
Send LM & NTLM – use NTLMv2 session security if negotiated Client devices use LM and NTLM authentication, and they use NTLMv2 session security if the server supports it. Domain controllers accept LM, NTLM, and NTLMv2 authentication. 1
Send NTLM response only Client devices use NTLMv1 authentication, and they use NTLMv2 session security if the server supports it. Domain controllers accept LM, NTLM, and NTLMv2 authentication. 2
Send NTLMv2 response only Client devices use NTLMv2 authentication, and they use NTLMv2 session security if the server supports it. Domain controllers accept LM, NTLM, and NTLMv2 authentication. 3
Send NTLMv2 response only. Refuse LM Client devices use NTLMv2 authentication, and they use NTLMv2 session security if the server supports it. Domain controllers refuse to accept LM authentication, and they will accept only NTLM and NTLMv2 authentication. 4
Send NTLMv2 response only. Refuse LM & NTLM Client devices use NTLMv2 authentication, and they use NTLMv2 session security if the server supports it. Domain controllers refuse to accept LM and NTLM authentication, and they will accept only NTLMv2 authentication. 5


LmCompatibilityLevel 1 provides the highest level of compatibility, but isn't recommended is it permits dated and less secure LM and NTMLv1.

On a Windows Professional edition system, we can also use the Local Group Policy Editor. In an elevated Windows Command Prompt window, i.e., a Windows Command Prompt window ran as the system administrator, open the Local Group Policy Editor by the following command,

mmc gpedit.msc

Then, locate the option via the following navigation sequence,
  1. (In the Left Navigation Pan) Computer Configuration
  2. (In the Left Navigation Pan)Windows Settings
  3. (In the Left Navigation Pan)Security Settings
  4. (In the Left Navigation Pan)Local Policies
  5. (In the Left Navigation Pan)Security Options
  6. (In the Right Policy Option Pan) Network security: LAN Manager authentication level
Double-click on the option, and select one of the 6 options that corresponds to the 6 LmCompatibilityLevel values.



Alternatively, one may directly open the Local Security policies by the command,

mmc secpol.msc

With this, there would be a shorter navigation sequence,
  1. (In the Left Navigation Pan)Local Policies
  2. (In the Left Navigation Pan)Security Options
  3. (In the Right Policy Option Pan) Network security: LAN Manager authentication level

Friday, May 8, 2020

Running a Windows Command Line Job in Background

If we want to run a Windows command line task in background, like UNIX's "&" do, we can do the following from the Windows command line,

start /B cmd /C call program [arg1 [...]]

We explain each part as follows,
  • /B is the command line option to the start command. The documentation of the command start states the following,
    • /B. Start application without creating a new window. The application has ^C handling ignored. Unless the application enables ^C processing, ^Break is the only way to interrupt the application.
  • cmd is the program to run from the command line, i.e., C:\Windows\System32\cmd.exe
  • /C is the command line option given to cmd. The manual states,
    • /C. Carries out the command specified by string and then terminates
  • call is a command to cmd, it is to "call one batch program from another." The program does not have to be batch program, and can be any executable file.
  • program is the program to be called by the call command.
  • arg1 [...] are optional one or more command line arguments given to program.
For example, if we'd like to to run a Java program HelloWorld from the command line in background, we would do,

start /B cmd /C call java HelloWord

A Unix equivalent of this command would be java HelloWorld &.

Clearing IPMI Log Entries

I saw this error message on my FreeNAS system,

IPMI SEL low space left: 0 bytes (100% used).
This can happen to any system. In my case, it is that motherboard battery somehow has low voltage and needs replacement. However, one issue is to clear the IPMI SEL log entries to make some space. The following command allows me to clear the log entries,

sudo ipmitool sel clear

Thursday, May 7, 2020

Removing Files Whose Names Start with "-"

I wanted to remove files whose names begin with "-" on a Linux system. After some searches, I found out that the following method worked.

rm -- -foo
where the file name is -foo.

Sunday, April 26, 2020

Failed to Update EclEmma Tool for Eclipse

I have the following Eclipse installed,

Eclipse IDE for Enterprise Java Developers.

Version: 2020-03 (4.15.0)
Build id: 20200313-1211

When I attempt to update Eclipse, I encountered the following error,

An error occurred while collecting items to be installed
session context was:(profile=C__Applications_eclipse_latest_eclipse, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,org.eclipse.eclemma.core,3.1.3.202003132300
No repository found containing: osgi.bundle,org.eclipse.eclemma.doc,3.1.3.202003132300
No repository found containing: osgi.bundle,org.eclipse.eclemma.ui,3.1.3.202003132300
No repository found containing: org.eclipse.update.feature,org.eclipse.eclemma.feature,3.1.3.202003132300

The solution to this problems is to update it via EclEmma's update channel at http://update.eclemma.org/. We can use the two methods to realize this solution,
  1. Update EclEmma via adding an Eclipse repository for EclEmma
    1. Click the "Help" menu
    2. Select the "Install New Software" submenu
    3. Click "Add" button to add a new repository
    4. In the popup windows, enter a name of the repository, e.g., EclEmma, and enter the URL, http://update.eclemma.org/
    5. Confirm it by clicking at the "Add" button on the popup window
  2. Update EclEmma via Eclipse Marketplace
    1. Click the "Help" menu
    2. Select the "Eclipse Marketplace" submenu
    3. Search "EclEmma" in the "Eclipse Marketplace"
    4. Eclipse should now show "EclEmma for Java Code Coverage" as "installed"
    5. Click at "installed", and then click at "update".

Friday, March 13, 2020

Setting up New Ethernet Interfaces on Debian Linux

I am running Debian Linux on Oracle VirtualBox virtual machines. The Linux system has only the command line interface, and has no GUI installed.  Below are the steps to add Ethernet interfaces to the Linux virtual machine and to get IP addresses via DHCP.
  1. Shut down  the Linux virtual machine
  2. Add and enable Ethernet interfaces to the virtual machine
  3. Boot the Linux virtual machine
  4. On the Linux virtual machine, view the Internet addresses
    
    ip address show
    
  5. Assume that we added two Ethernet adapters and the output of the command above shows that they are enp0s8 and enp0s9, we add the following lines to /etc/network/interfaces,
    
    allow-hotplug enp0s8
    iface enp0s8 inet dhcp
    
    allow-hotplug enp0s9
    iface enp0s9 inet dhcp
     
  6. Restart the networking service by running the following as root (or via sudo)
    
    systemctl restart networking
     
  7. Complete IP setting including assigning IP addresses via DHCP by running the following as root (or via sudo)
    
    dhclient