Note
The following steps have been successfully tested with Ubuntu guests of:
24.04LTS22.04LTS18.04LTS16.04LTS
Tip
Microsoft active directory servers by default provide LDAP connections over unencrypted connections (boo!).
The steps below will create a new self signed certificate appropriate for use with and thus enabling LDAPS for an AD server. Of course the "self-signed" portion of this guide can be swapped out with a real vendor purchased certificate if required.
Steps have been tested successfully with Windows Server 2012R2, but should work with Windows Server 2008 without modification. Requires a working OpenSSL install (ideally Linux/OSX) and (obviously) a Windows Active Directory server.
In my opinion this is the best way for executing external commands from PowerShell with arguments in a safe manner - via the use of an array to hold the arguments.
Consider this one a PowerShell gem to keep in the toolbox.
Note
The example below makes use of EchoArgs.exe - a small utility that simply echoes back arguments passed to it. Utility is part of the PowerShell Community Extensions, or the exe alone can be downloaded at https://ss64.com/ps/EchoArgs.exe.
A PowerShell script which provides the following:
$SourcePath files to target share ($TargetServer / $TargetShare) recursively../remotecopy.ps1 `
-SourcePath "." `
Well, not so much a quirk - but an interesting anti-pattern I found in some (poor quality) PowerShell. Documenting the "how and why" so I can refer to it again if needed!
~/.kodi/userdata/Database/MyVideosXX.db, where XX is the version number. You will most likely want the highest number available for edit.$ sudo apt-get install libsqlite3-dev sqlite3
$ sqlite3 MyVideosXX.dbPython parser class for CloudTrail event archives, previously dumped to an S3 bucket. Class provides an iterator which will:
Parser contained in cloudtrailparser.py, with timezone.py used as a simple datetime.tzinfo concrete class implement to provide UTC timezone.
Or to put it another way...
Does this certificate I have actually work with this private key I have?
Where server.crt is your certificate and server.key is your private key:
$ certMod=$(openssl x509 -text -noout -modulus -in server.crt | grep "Modulus=") && \
keyMod=$(openssl rsa -text -noout -modulus -in server.key | grep "Modulus=") && \
[[ $certMod == $keyMod ]] && echo "Equal"| #!/usr/bin/env python | |
| from datetime import datetime | |
| import timezone | |
| def main(): | |
| my_time = datetime( | |
| year = 2016, | |
| month = 1, |