<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>grzech.webio.pl</title><link>http://grzech.webio.pl/</link><description>.. kolejny blog w sieci (gł&amp;#243;wnie na własne potrzeby)</description><generator>Graffiti CMS 1.2 (build 1.2.0.2308)</generator><lastBuildDate>Thu, 13 Jul 2017 08:22:00 GMT</lastBuildDate><item><title>Listowanie i kasowanie certyfikatów powiązanych z hostami</title><link>http://grzech.webio.pl/windows/linia-polecen/listowanie-i-kasowanie-certyfikat-243-w-powi-zanych-z-hostami/</link><pubDate>Thu, 13 Jul 2017 08:22:00 GMT</pubDate><guid isPermaLink="true">http://grzech.webio.pl/windows/linia-polecen/listowanie-i-kasowanie-certyfikat-243-w-powi-zanych-z-hostami/</guid><dc:creator>GrZeCh</dc:creator><slash:comments>0</slash:comments><category domain="http://grzech.webio.pl/windows/linia-polecen/">Linia poleceń</category><description>netsh http show sslcert

netsh http delete sslcert ipport=ADRES-IP/HOST:443</description></item><item><title>Czyszczenie logu NTFS z "System Reserved Partition"</title><link>http://grzech.webio.pl/windows/linia-polecen/czyszczenie-logu-ntfs-z-quot-system-reserved-partition-quot/</link><pubDate>Mon, 26 Jun 2017 20:16:35 GMT</pubDate><guid isPermaLink="true">http://grzech.webio.pl/windows/linia-polecen/czyszczenie-logu-ntfs-z-quot-system-reserved-partition-quot/</guid><dc:creator>GrZeCh</dc:creator><slash:comments>0</slash:comments><category domain="http://grzech.webio.pl/windows/linia-polecen/">Linia poleceń</category><description>fsutil usn deletejournal /N /D X:

Źródło: https://answers.microsoft.com/en-us/windows/forum/windows_7-performance/system-partition-nearly-full-how-can-i-find-out/d344e28c-8471-4ae4-99c1-cbf6ff55386b</description></item><item><title>Migracja kluczy do zarządzania konfiguracją IISa</title><link>http://grzech.webio.pl/windows/iis/migracja-kluczy-do-zarz-dzania-konfiguracj-iisa/</link><pubDate>Fri, 23 Jun 2017 10:44:00 GMT</pubDate><guid isPermaLink="true">http://grzech.webio.pl/windows/iis/migracja-kluczy-do-zarz-dzania-konfiguracj-iisa/</guid><dc:creator>GrZeCh</dc:creator><slash:comments>0</slash:comments><category domain="http://grzech.webio.pl/windows/iis/">IIS</category><description>C:\Windows\Microsoft.NET\Framework64\v4.0.30319

Export:
aspnet_regiis -px "iisConfigurationKey" "C:\iisConfigurationKey.xml" -pri
Import:
aspnet_regiis -pi "iisConfigurationKey" "C:\iisConfigurationKey.xml"

Export:
aspnet_regiis -px "iisWasKey" "C:\iisWasKey.xml" -pri

Import:
aspnet_regiis -pi "iisWasKey" "C:\iisWasKey.xml"

</description></item><item><title>Naprawa klucza prywatnego dla certyfikatu w Windowsie</title><link>http://grzech.webio.pl/windows/iis/naprawa-klucza-prywatnego-dla-certyfikatu-w-windowsie/</link><pubDate>Mon, 27 Jun 2016 09:49:00 GMT</pubDate><guid isPermaLink="true">http://grzech.webio.pl/windows/iis/naprawa-klucza-prywatnego-dla-certyfikatu-w-windowsie/</guid><dc:creator>GrZeCh</dc:creator><slash:comments>0</slash:comments><category domain="http://grzech.webio.pl/windows/iis/">IIS</category><description>‎certutil -repairstore my "KLUCZ Z DETAILS CERTYFIKATU"</description></item><item><title>Migracja VM między hostami ESXi</title><link>http://grzech.webio.pl/wirtualizacja/vmware-esxi/migracja-vm-mi-dzy-hostami-esxi/</link><pubDate>Wed, 27 Apr 2016 19:47:25 GMT</pubDate><guid isPermaLink="true">http://grzech.webio.pl/wirtualizacja/vmware-esxi/migracja-vm-mi-dzy-hostami-esxi/</guid><dc:creator>GrZeCh</dc:creator><slash:comments>0</slash:comments><category domain="http://grzech.webio.pl/wirtualizacja/vmware-esxi/">VMware ESXi</category><description>ovftool.exe -ds=[DATASTORE_NAME_ON_TARGET] vi://HOST/VMNAME vi://HOST2

źródło: http://blog.itsnotfound.com/2013/05/esxi-copying-a-vm-between-two-hosts/</description></item><item><title>Wyszukiwanie ciągu znaków w wielu plikach</title><link>http://grzech.webio.pl/windows/linia-polecen/wyszukiwanie-ci-gu-znak-243-w-w-wielu-plikach/</link><pubDate>Tue, 29 Sep 2015 11:16:14 GMT</pubDate><guid isPermaLink="true">http://grzech.webio.pl/windows/linia-polecen/wyszukiwanie-ci-gu-znak-243-w-w-wielu-plikach/</guid><dc:creator>GrZeCh</dc:creator><slash:comments>0</slash:comments><category domain="http://grzech.webio.pl/windows/linia-polecen/">Linia poleceń</category><description>grep -rnw "*.log" -e "szukana fraza" &gt; wynik.log</description></item><item><title>Konfiguracja połączenia SSL dla bazy MySQL</title><link>http://grzech.webio.pl/bazy-danych/mysql/konfiguracja-po-czenia-ssl-dla-bazy-mysql/</link><pubDate>Thu, 19 Mar 2015 13:38:00 GMT</pubDate><guid isPermaLink="true">http://grzech.webio.pl/bazy-danych/mysql/konfiguracja-po-czenia-ssl-dla-bazy-mysql/</guid><dc:creator>GrZeCh</dc:creator><slash:comments>0</slash:comments><category domain="http://grzech.webio.pl/bazy-danych/mysql/">MySQL</category><description>md netcert

set OPENSSL_CONF=C:\Programy\GnuWin32\share\openssl.cnf

openssl genrsa 2048 &gt; netcert\ca-key.pem

openssl req -new -x509 -nodes -days 3600 -key netcert\ca-key.pem -out netcert\ca.pem

openssl req -newkey rsa:2048 -days 3600 -nodes -keyout netcert\server-key.pem -out netcert\server-req.pem

openssl rsa -in netcert\server-key.pem -out netcert\server-key.pem

openssl x509 -req -in netcert\server-req.pem -days 3600 -CA netcert\ca.pem -CAkey netcert\ca-key.pem -set_serial 01 -out netcert\server-cert.pem

openssl req -newkey rsa:2048 -days 3600 -nodes -keyout netcert\client-key.pem -out netcert\client-req.pem

openssl rsa -in netcert\client-key.pem -out netcert\client-key.pem

openssl x509 -req -in netcert\client-req.pem -days 3600 -CA netcert\ca.pem -CAkey netcert\ca-key.pem -set_serial 01 -out netcert\client-cert.pem

openssl verify -CAfile netcert\ca.pem netcert\server-cert.pem netcert\client-cert.pem

MySQL:

[mysqld]
ssl-ca="..../ssl/ca.pem"
ssl-cert="..../ssl/server-cert.pem"
ssl-key="..../ssl/server-key.pem"

Kod PHP do sprawdzenia:

&lt;?php
$conn=mysqli_init();
echo "test";
mysqli_ssl_set($conn, "client-key.pem", NULL, NULL, NULL, NULL);
if (!mysqli_real_connect($conn, "HOST", "USER", "PASSWORD")) { die(); }
$res = mysqli_query($conn, "SHOW STATUS like 'Ssl_cipher'");
print_r(mysqli_fetch_row($res));
mysqli_close($conn);
?&gt;

Źródło: http://dev.mysql.com/doc/refman/5.5/en/creating-ssl-certs.html oraz http://www.percona.com/blog/2013/06/22/setting-up-mysql-ssl-and-secure-connections/</description></item><item><title>Zastąpienie bazy danych w stanie "Restoring"</title><link>http://grzech.webio.pl/bazy-danych/ms-sql-server/zast-pienie-bazy-danych-w-stanie-quot-restoring-quot/</link><pubDate>Wed, 04 Mar 2015 09:17:34 GMT</pubDate><guid isPermaLink="true">http://grzech.webio.pl/bazy-danych/ms-sql-server/zast-pienie-bazy-danych-w-stanie-quot-restoring-quot/</guid><dc:creator>GrZeCh</dc:creator><slash:comments>0</slash:comments><category domain="http://grzech.webio.pl/bazy-danych/ms-sql-server/">MS SQL Server</category><description>RESTORE DATABASE MyDatabase
   FROM DISK = 'MyDatabase.bak'
   WITH REPLACE,RECOVERY

Źródło: http://stackoverflow.com/questions/520967/sql-server-database-stuck-in-restoring-state</description></item><item><title>Zabezpieczenie połączeń przy pomocy SSL</title><link>http://grzech.webio.pl/bazy-danych/ms-sql-server/zabezpieczenie-po-cze-przy-pomocy-ssl/</link><pubDate>Mon, 05 Jan 2015 13:24:00 GMT</pubDate><guid isPermaLink="true">http://grzech.webio.pl/bazy-danych/ms-sql-server/zabezpieczenie-po-cze-przy-pomocy-ssl/</guid><dc:creator>GrZeCh</dc:creator><slash:comments>0</slash:comments><category domain="http://grzech.webio.pl/bazy-danych/ms-sql-server/">MS SQL Server</category><description>Generowanie certyfikatu:

makecert -r -pe -n "CN=NAZWA" -b 01/01/2000 -e 01/01/2036 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr localMachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 -a sha1

Domyślna ścieżka dla kluczy prywatnych:
C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys

Listowanie aktywnych połączeń do serwera:
SELECT * FROM sys.dm_exec_connections

Szukanie pliku klucza prywatnego dla certyfikatu o podanym "odcisku kciuka":

FindPrivateKey My LocalMachine -t "‎NUMER" -a

Źródło: http://thesqldude.com/2011/10/22/to-ssl-or-not-to-ssl-that-is-the-question/</description></item><item><title>Trigger do blokowania usunięcia bazy danych</title><link>http://grzech.webio.pl/bazy-danych/ms-sql-server/trigger-do-blokowania-usuni-cia-bazy-danych/</link><pubDate>Thu, 23 Oct 2014 09:00:53 GMT</pubDate><guid isPermaLink="true">http://grzech.webio.pl/bazy-danych/ms-sql-server/trigger-do-blokowania-usuni-cia-bazy-danych/</guid><dc:creator>GrZeCh</dc:creator><slash:comments>0</slash:comments><category domain="http://grzech.webio.pl/bazy-danych/ms-sql-server/">MS SQL Server</category><description>SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
 
CREATE TRIGGER [ddl_trig_Prevent_Drop_Database]
ON ALL SERVER
FOR DROP_DATABASE
AS
 
--log attempt to drop database
DECLARE @db VARCHAR(209)
SET @db = (SELECT 'Database Dropped Attempted by ' +  CONVERT(nvarchar(100), ORIGINAL_LOGIN()) +
' executing command: '+ EVENTDATA().value('(/EVENT_INSTANCE/TSQLCommand/CommandText)[1]','VARCHAR(229)'))
RAISERROR(@db, 16, 1)WITH LOG
 
--prevent drop database
ROLLBACK
GO
 
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
 
--turn on trigger
ENABLE TRIGGER [ddl_trig_Prevent_Drop_Database] ON ALL SERVER

Zródło: http://blogs.msdn.com/b/chrissk/archive/2010/01/06/code-example-to-first-log-then-prevent-sql-database-from-being-deleted.aspx</description></item></channel></rss>