Resetting the Root Password in CentOS 8

  • Restart the server and press the e button in the GRUB start menu to edit the startup entry.
  • Add the following parameters at the end of the line starting with linux ($root)/:

rd.break enforcing=0

  • The line should now look something like this:

linux ($root)/vmlinuz-4.18.0-80.11.2.el8_0.x86_64 root=/dev/mapper/centos-root\ ro crashkernel=auto resume=/dev/mapper/centos-swap rd.lvm.lv=centos/root rd.l\ vm.lv=centos/swap rd.break enforcing=0

The parameter rd.break causes the boot process to be interrupted before control is passed from initramfs to systemd. This allows the initramfs prompt to be used for command input, and the parameter enforcing=0 puts SELinux in permissive mode. This saves the later – and possibly very time-consuming – relabeling of the file system, which would be necessary if SELinux were switched off.

  • Press Ctrl+x to boot the system with the changed parameters, and the switch_root prompt of initramfs will be displayed.
  • Since the filesystem under /sysroot/ is mounted with read-only permissions, you must first remount it with write permissions:

switch_root:/# mount -o remount,rw /sysroot

  • Now switch to a chroot environment:

switch_root:/# chroot /sysroot

The prompt changes to sh-4.4#.

  • Now you can change the password via passwd:

sh-4.4# passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

touch /.autorelabel

  • To leave the chroot environment, type the following command:

exit

  • Reboot the server. To do this, enter the following command:

reboot

 

 

credssp error solution

Follow the steps below to resolve this error.

  1. Windows+R Click the keys
  2. gpedit.msc type and click the OK button.
  3. Click to Administrative Templates and click to System

  4. Click to Credentials Delegation

  5. Click to Encryption Oracle Remediation

  6. Click to Enabled and Protection Level select to Vulnerable

How to Install .NET Framework 3.5 on Windows Server 2012 R2

Most modern Windows applications require .NET Framework to work properly. The roles and features setup wizard Server Manager in Windows Server 2012 R2 allows to install two different versions of .NET Framework at a time – 3.5 and 4.5. The installation of .NET Framework 4.5 doesn’t usually cause any problems – it’s very simple, however, you can’t say exactly the same about the installation of .NET Framework 3.5.

 

 

Actually, when trying to install .NET Framework 3.5 in Windows Server 2012 R2 with the standard settings, the following error message appears: «Installation of one of more roles, role services or features failed. The source files could not be found…».

 

 

The reason behind this behavior is that .NET Framework 3.5 binary files are not a part of the local cache of the binary files that are saved on the server’s system disk when the operating system is being installed. This is done under the concept of Features on Demand in Windows Server 2012 to reduce the amount of disk space occupied by the OS for its own needs.

Check if .NET Framework 3.5 is in the local repository using the Powershell command:

Get-WindowsFeature *Framework*

As you can see, the required component is deleted (Install State: Removed).

 

By default, when you install NET Framework 3.5 through Server Manager, the system tries to obtain the necessary files from the Windows Update website over the Internet (not from the local WSUS server), and if the server does not have Internet access, the installation fails. The user needs to specify the path to the OS distribution from which the missing component could be installed.

 

To install .NET Framework 3.5 manually, click Specify an alternative source path to enter an alternative path to a folder containing the installation disk of Windows Server 2012 R2.

 

Tip. The installation disk must contain the same version of OS that you have installed (the same edition, language, and updates are important). If the installer does not find the required files in the specified folder, see the solution below.

As the path, you can specify either a local folder (in our example it is D:\source\sxs, where D:\ is a letter of the local DVD drive with a Windows Server distribution), or a network folder.

 

 

By clicking OK, the system will find .NET Framework 3.5 binaries and install the component.

 

 

The same operation can be performed from the command prompt by running the following command as an administrator:

dism /online /enable-feature /featurename:NetFX3 /all /Source:d:\sources\sxs /LimitAccess

/Online means that you need to upgrade your current OS, and not the wim image

/enable-feature/featurename: NetFX3/all means that it is necessary to install .NET Framework 3.5 with all its features

/Source is the path to the directory with Windows distribution, which contains the necessary components

/LimitAccess prevents accessing Windows Update

 

 

The same operation in PowerShell for installing .Net 3.5 looks like this:

Add-WindowsFeature NET-Framework-Core -Source d:\sources\sxs

Path to the original Windows distribution can be set in the system on a regular basis using:

  • the registry parameter RepairContentServerSource that is located in the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Servicing branch
  • or a group policy Specify settings for optional component installation and component repair (the policychanges this setting in the registry)

 

 

Note. The group policy Specify settings for optional component installation and component repair is in the following section GPO: Computer Configuration -> Administrative Templates -> System. The policy should be enabled and the path to the directory with the OS distribution should be specified (Alternative source file path). To prevent the server from trying to update online, check the box Never attempt to download payload from Windows Update.

 

To verify that the .NET Framework 3.5 is installed, go to the C:\Windows\Microsoft.NET\Framework64 directory and make sure that v3.5 folder appeared.

 

 

If the .NET Framework 3.5.1 installation methods described above did not help you, try the following solutions.

After installing some updates, the version (build) of Windows Server 2012 R2 in the system may cease to correspond to the image of the OS stored in your distribution image. In this case, the installer, when comparing the version of the Windows kernel, refuses to install the deprecated version of the component. In this case, as a rule, when you install the .NET Framework through dism, the following error occurs: 0x800f081f. The source files could not be found

 

 

To fix the problem try to install .Net online through from Microsoft servers:

 

  • Save the current Windows Update settings to the reg file (key HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate)
  • Delete this key and restart the WU service: net stop wuauserv & net start wuauserv
  • Run the .Net5 online installation: DISM /Online /Enable-Feature /FeatureName:NetFx3 /All
  • After the installation is complete, return the WU settings by importing the reg file and restart the WindowsUpdate service again

 

Tip. In the future, you can use folder C:\Windows\winsxs from this server to install .Net FrameWork 3.5 on other servers with the same version of the OS. Copy the C:\Windows\winsxs folder to the desired server in the C:\tmp\winsxs directory and install the component with the command:
dism /online /enable-feature /featurename:NetFX3 /all /Source:C:\tmp\winsxs /LimitAccess

 

In addition, if you installed a Language Packs on the server, before you install the .NET Framework 3.5.1, you must uninstall it using the lpksetup command.

 

Also check that there are installed patches for NET 3.5 Framework in the list of installed system updates (in theory they should not have been installed if the NetFX3 component is not installed).

 

 

Uninstall this updates and after the reboot, try installing .NET 3.5.

CentOS 7 – Failed to set MokListRT: Invalid Parameter

CentOS 7, a bug related to the latest update was detected.

After updating CentOS 7, when rebooting, it gives the following error and the server shuts down.

Failed to set MokListRT: Invalid Parameter
Something as gone seriously wrong: import_mok_state() failed:
Invalid Parameter


Workaround #1 : on existing machine, before updating, be sure to exclude shim* and mokutil* (so that it can stay at version shim-x64-12-2.el7.x86_64

  • echo 'exclude=shim*,mokutil*' >> /etc/yum.conf
  • yum update

Workaround #2 : if you have already updated and also rebooted, you have to use a live media to

  • mount /boot/efi
  • cd /boot/efi/EFI/centos
  • cp grubx64.efi shimx64.efi
  • umount
  • reboot