How to create .pfx file from certificate and private key?
How to create .pfx file from certificate and private key?
1. Open web page -
2. Select Type of Current Certificate
Your certificate should be issued in Standard PEM format. Common PEM extensions include .cer, .crt, and .pem. Make sure Type of Current Certificate is set to “Standard PEM”.
3. Select Type to Convert To
Select “PFX/PKCS#12” as the Type to Convert To.
4. Upload Certificate
Locate Certificate File to Convert and click the Choose File button to upload your certificate. This file should be the certificate that is issued to your web server domain.
5. Upload Private Key
Locate Private Key File and click the Choose File button to upload the file.
6. Upload Chain Certificate Files
Locate Chain Certificate File and click Choose File to upload the CA intermediate certificate. The appropriate certificate depends on what brand of SSL you have, so please make sure you have the correct intermediate certificate before you upload your file.
8. PFX Password
Create a new password for your PFX file. You will need to remember this password when you install the PFX file on your system.
9. Convert Certificate
Once you have uploaded the certificate and key files, click the Convert Certificate button to complete the process and download your new PFX file.
Postgresql – Possible backup corruption using pg_dump only with compress parameter
Postgresql – Possible backup corruption using pg_dump only with compress parameter
the command can be used to backup the database in postgresql
pg_dump -Z 1 db_name > backup
where -Z - compression level
db_name - database name
backup - backup file name
Restoring: psql -U username -d dbname < filename.sql -- For Postgres versions 9.0 or earlier psql -U username -d dbname -1 -f filename.sql or pg_restore -U username -d dbname -1 filename.dump Postgresql – How to pg_restore In your pg_dump, specify the -F t flag. This tells pg_dump to create the backup in tar format
make backup with commang:
pg_dump -U postgres -h /tmp -Ft -b -C mydb > file_db.tar
When I want to restore from backup, i give error.
pg_restore -U postgres -d template1 -v -C < file_db.tar
Users and logins in MSSQL
Users and logins in MSSQL
Login - grants access to the server
User grants a login access to the database List users in SQL Server database
Query
select sp.name as login,
sp.type_desc as login_type,
sl.password_hash,
sp.create_date,
sp.modify_date,
case when sp.is_disabled = 1 then 'Disabled'
else 'Enabled' end as status
from sys.server_principals sp
left join sys.sql_logins sl
on sp.principal_id = sl.principal_id
where sp.type not in ('G', 'R')
order by sp.name;
Columns
- login - user name
- login_type - principal type:
- SQL_LOGIN - SQL login
- WINDOWS_LOGIN - Windows login
- CERTIFICATE_MAPPED_LOGIN - Login mapped to a certificate
- ASYMMETRIC_KEY_MAPPED_LOGIN - Login mapped to an asymmetric key
- password_hash - for SQL logins hashed password with SHA-512
- create_date - date the login was added
- modify_date - date the login was last updated
- status - status of the login
- Enabled
- Disabled
Rows
- One row represents one user in the database
- Scope of rows: all users in the database
- Ordered by user name
Query
select name as username,
create_date,
modify_date,
type_desc as type,
authentication_type_desc as authentication_type
from sys.database_principals
where type not in ('A', 'G', 'R', 'X')
and sid is not null
and name != 'guest'
order by username;
Columns
- username - user name
- create_date - date the account was added
- modify_date - date the account was last updated
- type_desc - principal type:
- CERTIFICATE_MAPPED_USER - User mapped to a certificate
- EXTERNAL_USER - External user from Azure Active Directory
- ASYMMETRIC_KEY_MAPPED_USER - User mapped to an asymmetric key
- SQL_USER - SQL user
- WINDOWS_USER - Windows user
- authentication_type - type of user authentication
- NONE : No authentication
- INSTANCE : Instance authentication
- DATABASE : Database authentication
- WINDOWS : Windows Authentication
Rows
- One row represents one user in the database
- Scope of rows: all users in the database
- Ordered by user name
Change SQL Server Password Using SQL Script
Change SQL Server Password Using SQL Script
- Open the SQL Server Management Studio.
- Open a New Query.
-
Copy, paste, and execute the following:
GO ALTER LOGIN [sa] WITH DEFAULT_DATABASE=[master] GO USE [master] GO ALTER LOGIN [sa] WITH PASSWORD=N'NewPassword' MUST_CHANGE GO
where NewPassword is the password you wish to use for the sa account.
Página 21 de 58
