Skip to content

Instantly share code, notes, and snippets.

@dmcardlenl
dmcardlenl / gist:6ee9abb3436c97b3e3c5569d2c040f6d
Last active November 14, 2023 21:19
generate jks/pkcs12 cert from private key and csr request and csr response - various utils and steps.
This needs to be updated to include at least 2 SANs.
Common Name: f.q.h.n
Organization: Your Corp
Organization Unit: IT
City or Locality: NY
Docker container rebuild failes
Adding roles to host
So, built manually and see what's wrong
apt install libxxf86vm1 and libgtk2.0-dev to get the GUI installer to work.
update-rc.d -n is not liked, so shift the arg or something:
https://blogs.sap.com/2018/07/21/how-to-install-sap-hana-express-edition-2.0-on-ubuntu-18.04-bionic-beaver/
hdbnsutil createSecureStore segvs. I think it could be glibc difference between deb 11 and 12.
TBC.
@dmcardlenl
dmcardlenl / gist:0a6e26747dc15ac6edfa604aa274ba54
Created August 13, 2023 11:48
Add exported Windows OS to Proxmox
Export disk (both volumes C: and UEFI) to .VHDX using Mark Russinovich's export vhdx utility
Turn off Win Bitlocker during export if necesssary
Create new Proxmvox VM
qm disk import <ID> <filename.vhdx> <name of storage> (e.g. local or local-lvm etc.)
Do standard proxmox admin to make sure CD isn't boot device etc.
boot
Windows should say checking devices or some such.
@dmcardlenl
dmcardlenl / gist:6ae2e00f1481f76f08fceceed8ca1a5e
Created June 9, 2023 11:04
Add Trusted Certs to sapcli.pse for hdbsql etc. to work with SSL/TLS encryption
Add Root CAs to sapcli.pse for hdbsql
-------------------------------------
sapgenpse -p sapcli.pse "CN=mynode.mycorp.corp"
sapgenpse seclogin -chpin -p sapcli.pse to remove PIN if needed
sapgenpse maintain_pk -p sapcli.pse -a Root_cert.pem
sapgenpse import_own_cert -p sapcli.pse -c Signed_Response_file_you_got_signed_after_CSR_was_shown_after_first_command_above.pem
Done.
sapgenpse get_my_name -p sapcli.pse
@dmcardlenl
dmcardlenl / gist:04da358296d0b16f5120cb60c91326a9
Last active May 22, 2023 23:18
SSL private key and cert and sign and import using SET PSE SQL
Generate PSE with SANs
Create empty PSE with own self-signed CN and lots of SANs:
Create CSR for CA for PSE
Import signed CSR response resulting in PSE with private key and cert and chain.
Export PSE to .p12:
sapgenpse export_p12 -p SAPSSLS.pse -z 123456 -C 0 pse_database.p12
@dmcardlenl
dmcardlenl / gist:1c3e5c6a5a10d7fecec1c72489204f69
Last active April 4, 2023 14:31
SAP SSL Cert add replace rotate Pseudo-code for playbook
Automated Cert renewal
For each landscape
For each SID
For each instance
CD to sec dir
Export SECUDIR
For each PSE
Sapgenpse <PSE> <action> <cert>
Where action is:
1) import trusted (root) cert
@dmcardlenl
dmcardlenl / gist:86fdd3d049a03ddc6100b4d2c2cb41eb
Created February 23, 2022 17:22
HANA - show users and email address
SELECT USER_NAME, VALUE, SUBSTR_AFTER (VALUE,'@') FROM user_parameters where PARAMETER = 'EMAIL ADDRESS' order by SUBSTR_AFTER (VALUE,'@');
@dmcardlenl
dmcardlenl / gist:6f3e7c4191ad0b8835c573d022b0fbe1
Created February 23, 2022 17:17
HANA - not logged on in N days script - (stolen, sorry, what do the kids call it these days, forked, from someone else)
Select USER_NAME ,
VALID_FROM,
TO_VARCHAR((VALID_UNTIL),'DD mon YYYY') as VALID_UNTIL,
LAST_SUCCESSFUL_CONNECT,
INVALID_CONNECT_ATTEMPTS as ATTEMPTS,
PASSWORD_CHANGE_NEEDED,
case
when USER_DEACTIVATED = 'TRUE' then
'Deactivated user'
else