How to reset Ubuntu password

1. Reboot your computer. Hold shift to bring up the grub screen (if it doesn’t appear automatically).

u1

2. Press E at the grub prompt to edit the grub screen.

u2

3. On the linux line change “ro” to “rw init=/bin/bash”

4. Press Crtl+X pr F10

5. It will restart as root. Change password “passwd <username>”

6. Restart server. (the grub command will reset itself)

SQL Server (Not Synchronizing) Monitor

If it happened on the Primary DB server and DB cannot be accessed. Restart secondary first then primary. See if the Not synchronizing changed to Not synchronizing / in recovery. After there, its a waiting process.

It may change to revert / in recovery or synchronized depending on DB and DB log size.

Checking synchronization state

SELECT @@servername as SQLName,db_name(database_id) as DBName,synchronization_state_desc,database_state_desc
from sys.dm_hadr_database_replica_states where is_local=1

Checking performance counter for redone, undone, recovering queue.

SELECT instance_name, [object_name],
[counter_name],
[cntr_value] FROM sys.dm_os_performance_counters WHERE [object_name] LIKE ‘%Database Replica%’

Read more

Playing with SSL pfx file

Conversion to a combined PEM file

To convert a PFX file to a PEM file that contains both the certificate and private key, the following command needs to be used:
# openssl pkcs12 -in filename.pfx -out cert.pem -nodes

Conversion to separate PEM files

We can extract the private key form a PFX to a PEM file with this command:
# openssl pkcs12 -in filename.pfx -nocerts -out key.pem

Exporting the certificate only:
# openssl pkcs12 -in filename.pfx -clcerts -nokeys -out cert.pem (or .crt)

Removing the password from the extracted private key:
# openssl rsa -in key.pem -out server.key