Skip to main content

Posts

Renewing Expired Samba DC Certificate

When It's first installed, Samba4 autogenerates self-signed certificate files(ca.pem, cert.pem, and key.pem). These files will be expired 700 days after creation. With the following procedure, the certificate can be renewed.
Recent posts

How to connect SQLite database using Python?

To connect to an SQLite database from Python, you can use the sqlite3 module, which is part of the Python Standard Library. To create a connection to an SQLite database, you can use the connect() method of the sqlite3 module, passing it the path to the database file. Here is an example:

How to connect Mariadb database using Python?

To connect to a MariaDB database from Python, you will need to install the mysql-connector-python package, which is a MariaDB Connector that implements the Python Database API v2.0 (PEP 249). Once you have that installed, you can use the following steps to connect to a MariaDB database from your Python code:

How to connect Oracle database using Python?

To connect to an Oracle database using Python, you need to use the cx_Oracle module. This module provides a Python interface for connecting to an Oracle database and manipulating the data within it. To use the cx_Oracle module, you will first need to install it on your system. You can do this using the following command: