Linux machine encrypt and decrypt a password string

 

1)For encrypt use below command: for the password" Ranjith" 

echo Ranjith | openssl enc -aes-256-cbc -a -salt -pass pass:tecmint


[root@ranjith]# echo Ranjith | openssl enc -aes-256-cbc -a -salt -pass pass:tecmint

U2FsdGVkX1/lvI5yT7l7fPeg/thWbJN76DlM++FltEKqWUzJKGSjo


2)To decrypt the above encrypted string use:

echo <> | openssl enc -aes-256-cbc -a -d -salt -pass pass:tecmint

[root@ranjith]# echo U2FsdGVkX1/lvI5yT7l7fPeg/thWbJN76DlM++FltEKqWUzJKGSjo | openssl enc -aes-256-cbc -a -d -salt -pass pass:tecmint
Ranjith


Linux Stop Firewall and disable permanently

 In Linux we can stop firewalld service by below commands:


$ systemctl status firewalld
$ systemctl stop firewalld




To Disable permanently:


$ chkconfig firewalld off

Restart vCenter server services

 


To Stop vCenter server service:


service-control --stop --all


To Start vCenter server service:


service-control --start --all

Windows server 2016/2019/2022 sync with NTP server

 Steps to follow:


1.Check Existing config - w32tm /query /status

C:\Users\Administrator>w32tm /query /status

Leap Indicator: 0(no warning)

Stratum: 1 (primary reference - syncd by radio clock)

Precision: -23 (119.209ns per tick)

Root Delay: 0.0000000s

Root Dispersion: 10.0000000s

ReferenceId: (source name:  "")

Last Successful Sync Time: 11/11/2022 

Source: Local CMOS Clock


2.Stop Windows Time service - net stop w32time

C:\Users\Administrator>net stop w32time

The Windows Time service is stopping.

The Windows Time service was stopped successfully.


3.Sync with NTP server - w32tm /config /manualpeerlist:<NTP Server NAPE/IP> /syncfromflags:MANUAL

C:\Users\Administrator>w32tm /config /manualpeerlist:ntp.test.net /syncfromflags:MANUAL

The command completed successfully.

4.Start the windows Time service -  net start w32time

C:\Users\Administrator>net start w32time

The Windows Time service is starting.

The Windows Time service was started successfully.


5.Resync the new time - w32tm /resync

C:\Users\Administrator>w32tm /resync

Sending resync command to local computer

The computer did not resync because no time data was available.







Linux Verify TLS version used

 Commnd to verify TLS version on linux


openssl ciphers -v | awk '{print $2}' | sort | uniq

[root@ranjith2 ~]# openssl ciphers -v | awk '{print $2}' | sort | uniq
SSLv3
TLSv1.2
[root@ranjith2 ~]#

Connect-VIServer fails There was no endpoint listening

 Error:

connect-VIserver :         Connect-VIServer                Could not resolve the requested VC server.

Additional Information: There was no endpoint listening at https://<IP>/sdk that could accept the message.

This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

At line:1 char:1

+ connect-VIserver


Solution:

Disable the proxy setting and try connect.

Set-PowerCLIConfiguration -ProxyPolicy NoProxy -Confirm

Install-Module VMware-PowerCLI fails 'VMware.VimAutomation.Sdk.cat' is not valid

 Error:

Install-Module VMware.PowerCLI -Scope CurrentUser

PackageManagement\Install-Package : The module 'VMware.VimAutomation.Sdk' cannot be installed or updated because the

authenticode signature of the file 'VMware.VimAutomation.Sdk.cat' is not valid.

At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21

+ ...          $null = PackageManagement\Install-Package @PSBoundParameters

+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package],


Solution:

Run below command to install module

install-module vmware.powercli -scope AllUsers -force -SkipPublisherCheck -AllowClobber



How to increase ESXi webclient login user application timeout

 To increase the default 15min timeout to 2hr Login to the esxi webclient on the right top corner ->Click the User login tab Select "...