<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Bidhan Khatri</title>
    <description>The latest articles on DEV Community by Bidhan Khatri (@bidhanahdib).</description>
    <link>https://dev.to/bidhanahdib</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F319732%2F9c9d5446-8b00-4a86-91ec-412f6894229f.jpg</url>
      <title>DEV Community: Bidhan Khatri</title>
      <link>https://dev.to/bidhanahdib</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bidhanahdib"/>
    <language>en</language>
    <item>
      <title>Inside Linux TCP: From Handshake to Reset or Close</title>
      <dc:creator>Bidhan Khatri</dc:creator>
      <pubDate>Mon, 05 Jan 2026 17:28:49 +0000</pubDate>
      <link>https://dev.to/bidhanahdib/inside-linux-tcp-from-handshake-to-reset-or-close-2co8</link>
      <guid>https://dev.to/bidhanahdib/inside-linux-tcp-from-handshake-to-reset-or-close-2co8</guid>
      <description>&lt;p&gt;TCP is the backbone of network communication in Linux systems. It’s a connection-oriented protocol that ensures reliable data exchange between a sender and a receiver over a network. Operating at Layer 4 (the Transport Layer) of the OSI model, TCP guarantees that data is delivered in the correct order and without loss.&lt;/p&gt;

&lt;p&gt;Understanding TCP is not just theoretical. It’s critical for real-world troubleshooting. For example, when an application fails to connect, or data transfer stalls, knowing how TCP establishes, maintains, and closes connections helps you pinpoint issues like dropped packets, RSTs, or handshake failures. This insight can save hours when diagnosing network problems, firewall misconfigurations, or application-level errors.&lt;/p&gt;

&lt;p&gt;In this post, we’ll explore real-world Linux scenarios using tools such as ncat, ss, and tcpdump to observe TCP connections from start to finish, from SYN to FIN or RST. By understanding the basic concepts of TCP, troubleshooting becomes much faster and more effective.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://bidhankhatri.com.np/system/inside-linux-tcp/" rel="noopener noreferrer"&gt;https://bidhankhatri.com.np/system/inside-linux-tcp/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>security</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>RabbitMQ Monitoring: Pushing Queue Metrics to Elasticsearch with Python script</title>
      <dc:creator>Bidhan Khatri</dc:creator>
      <pubDate>Mon, 15 Dec 2025 17:28:09 +0000</pubDate>
      <link>https://dev.to/bidhanahdib/rabbitmq-monitoring-pushing-queue-metrics-to-elasticsearch-with-python-script-5n9</link>
      <guid>https://dev.to/bidhanahdib/rabbitmq-monitoring-pushing-queue-metrics-to-elasticsearch-with-python-script-5n9</guid>
      <description>&lt;p&gt;Monitoring RabbitMQ queues is critical for maintaining the health and performance of the RabbitMQ distributed system. This post is about a Python script that will collect the RabbitMQ queue metrics through it’s API and send them to an Elasticsearch in a data stream. I wrote the script so that I can keep the record of consumers nodes history for the queues.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://bidhankhatri.com.np/system/rabbitmq-queue-monitoring-with-python-script/" rel="noopener noreferrer"&gt;https://bidhankhatri.com.np/system/rabbitmq-queue-monitoring-with-python-script/&lt;/a&gt; &lt;/p&gt;

</description>
      <category>devops</category>
      <category>python</category>
      <category>monitoring</category>
      <category>programming</category>
    </item>
    <item>
      <title>Implementing Mutual TLS (mTLS) Authentication with OpenSSL: A Step-by-Step Guide</title>
      <dc:creator>Bidhan Khatri</dc:creator>
      <pubDate>Wed, 14 May 2025 18:52:42 +0000</pubDate>
      <link>https://dev.to/bidhanahdib/implementing-mutual-tls-mtls-authentication-with-openssl-a-step-by-step-guide-353j</link>
      <guid>https://dev.to/bidhanahdib/implementing-mutual-tls-mtls-authentication-with-openssl-a-step-by-step-guide-353j</guid>
      <description>&lt;p&gt;This article explores mutual Transport Layer Security (mTLS) authentication and how OpenSSL can facilitate its implementation. Also known as client-server authentication, mTLS is a robust security mechanism that requires both the client and server to present valid digital certificates before establishing a secure connection. This additional layer of authentication ensures that only trusted entities can access protected resources.&lt;/p&gt;

&lt;p&gt;We will set up mutual TLS (mTLS) using two intermediate CAs—one for server certificates and another for client certificates—both signed by the same root CA.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://bidhankhatri.com.np/system/implementing-mutal-tls-authentication-with-openssl/" rel="noopener noreferrer"&gt;https://bidhankhatri.com.np/system/implementing-mutal-tls-authentication-with-openssl/&lt;/a&gt; &lt;/p&gt;

</description>
      <category>certification</category>
      <category>devops</category>
      <category>webdev</category>
      <category>linux</category>
    </item>
    <item>
      <title>Scalable CI/CD with Jenkins and Docker Cloud Agents</title>
      <dc:creator>Bidhan Khatri</dc:creator>
      <pubDate>Wed, 14 May 2025 18:50:13 +0000</pubDate>
      <link>https://dev.to/bidhanahdib/scalable-cicd-with-jenkins-and-docker-cloud-agents-2com</link>
      <guid>https://dev.to/bidhanahdib/scalable-cicd-with-jenkins-and-docker-cloud-agents-2com</guid>
      <description>&lt;p&gt;A Jenkins cloud agent using Docker refers to dynamically provisioning Jenkins build agents (also called slaves or nodes) in Docker containers—typically on demand—rather than using pre-provisioned static nodes. This allows Jenkins to scale efficiently and cleanly by creating isolated environments for each build. Today, I will show you how to configure Docker cloud on Jenkins.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://bidhankhatri.com.np/system/jenkins-and-docker-cloud-agents/" rel="noopener noreferrer"&gt;https://bidhankhatri.com.np/system/jenkins-and-docker-cloud-agents/&lt;/a&gt; &lt;/p&gt;

</description>
      <category>docker</category>
      <category>jenkins</category>
      <category>devops</category>
      <category>cicd</category>
    </item>
    <item>
      <title>Unassigned shards in Elasticsearch 7 and 8</title>
      <dc:creator>Bidhan Khatri</dc:creator>
      <pubDate>Fri, 28 Jun 2024 16:46:03 +0000</pubDate>
      <link>https://dev.to/bidhanahdib/unassigned-shards-in-elasticsearch-7-and-8-2jlh</link>
      <guid>https://dev.to/bidhanahdib/unassigned-shards-in-elasticsearch-7-and-8-2jlh</guid>
      <description>&lt;p&gt;There are multiple reasons why shards might get unassigned, ranging from misconfigured allocation settings to lack of disk space.&lt;/p&gt;

&lt;p&gt;To reassign all unassigned shards in Elasticsearch, you can use the following steps:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://bidhankhatri.com.np/system/unassigned-shards-in-elasticsearch/"&gt;https://bidhankhatri.com.np/system/unassigned-shards-in-elasticsearch/&lt;/a&gt; &lt;/p&gt;

</description>
      <category>elasticsearch</category>
      <category>devops</category>
      <category>beginners</category>
      <category>automation</category>
    </item>
    <item>
      <title>Percona XtraDB Multi-Master Replication cluster setup between 3 nodes</title>
      <dc:creator>Bidhan Khatri</dc:creator>
      <pubDate>Sun, 02 Jun 2024 03:03:28 +0000</pubDate>
      <link>https://dev.to/bidhanahdib/percona-xtradb-multi-master-replication-cluster-setup-between-3-nodes-45lb</link>
      <guid>https://dev.to/bidhanahdib/percona-xtradb-multi-master-replication-cluster-setup-between-3-nodes-45lb</guid>
      <description>&lt;p&gt;This guide describes the steps to establish a Percona XtraDB Cluster v8.0 among three Ubuntu 22.04 nodes.&lt;/p&gt;

&lt;p&gt;Install Percona XtraDB Cluster on all hosts that you are planning to use as cluster nodes and ensure you have root access to the MySQL server on each node. In this setup, Multi-Master replication is implemented.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://bidhankhatri.com.np/system/percona-xtradb-multi-master-replication-cluster-setup-between-3-nodes/"&gt;https://bidhankhatri.com.np/system/percona-xtradb-multi-master-replication-cluster-setup-between-3-nodes/&lt;/a&gt; &lt;/p&gt;

</description>
      <category>database</category>
      <category>devops</category>
      <category>linux</category>
      <category>systems</category>
    </item>
    <item>
      <title>Site-to-Site VPN between Mikrotik router and Ubuntu 22.04 through strongSwan using IPsec IKEv2</title>
      <dc:creator>Bidhan Khatri</dc:creator>
      <pubDate>Sun, 02 Jun 2024 03:02:21 +0000</pubDate>
      <link>https://dev.to/bidhanahdib/site-to-site-vpn-between-mikrotik-router-and-ubuntu-2204-through-strongswan-using-ipsec-ikev2-3ola</link>
      <guid>https://dev.to/bidhanahdib/site-to-site-vpn-between-mikrotik-router-and-ubuntu-2204-through-strongswan-using-ipsec-ikev2-3ola</guid>
      <description>&lt;p&gt;We will configure a site-to-site IPsec IKEv2 tunnel between the Mikrotik Router and the StrongSwan server. This will enable secure communication between devices connected behind the Mikrotik router and the StrongSwan server.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://bidhankhatri.com.np/vpn/site-to-site-vpn-between-mikrotik-router-and-ubuntu-22.04-through-strongswan-using-ipsec-ikev2/"&gt;https://bidhankhatri.com.np/vpn/site-to-site-vpn-between-mikrotik-router-and-ubuntu-22.04-through-strongswan-using-ipsec-ikev2/&lt;/a&gt; &lt;/p&gt;

</description>
      <category>networking</category>
      <category>devops</category>
      <category>beginners</category>
      <category>linux</category>
    </item>
    <item>
      <title>Monitor HA Cluster running Pacemaker and Corosync using Prometheus and Grafana using Docker</title>
      <dc:creator>Bidhan Khatri</dc:creator>
      <pubDate>Sun, 02 Jun 2024 02:58:57 +0000</pubDate>
      <link>https://dev.to/bidhanahdib/monitor-ha-cluster-running-pacemaker-and-corosync-using-prometheus-and-grafana-using-docker-3pfp</link>
      <guid>https://dev.to/bidhanahdib/monitor-ha-cluster-running-pacemaker-and-corosync-using-prometheus-and-grafana-using-docker-3pfp</guid>
      <description>&lt;p&gt;We will use Grafana with prometheus in container to monitor High availability cluster running by Pacemaker and Corosync.&lt;/p&gt;

&lt;p&gt;Grafana dashboard which we will be using shows the details of a HA cluster running Pacemaker/Corosync. It is built on top of ha_cluster_exporter but it also requires Prometheus node_exporter to be configured on the target nodes, and it also assumes that the target nodes in each cluster are grouped via the job label.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://bidhankhatri.com.np/monitoring/monitor-ha-cluster-running-pacemakr-and-corosync/"&gt;https://bidhankhatri.com.np/monitoring/monitor-ha-cluster-running-pacemakr-and-corosync/&lt;/a&gt; &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>monitoring</category>
      <category>docker</category>
      <category>devops</category>
    </item>
    <item>
      <title>GFS2 Filesystem setup in RHEL8 with Pacemaker and Corosync</title>
      <dc:creator>Bidhan Khatri</dc:creator>
      <pubDate>Tue, 18 Jul 2023 12:19:42 +0000</pubDate>
      <link>https://dev.to/bidhanahdib/gfs2-filesystem-setup-in-rhel8-with-pacemaker-and-corosync-48g5</link>
      <guid>https://dev.to/bidhanahdib/gfs2-filesystem-setup-in-rhel8-with-pacemaker-and-corosync-48g5</guid>
      <description>&lt;p&gt;We will configure Pacemaker/Corosync to enable the sharing of a disk between two nodes through the GFS2 clustered filesystem.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://bidhankhatri.com.np/system/gfs2-filesystem-setup-in-rhel8-with-pacemaker-and-corosync/"&gt;https://bidhankhatri.com.np/system/gfs2-filesystem-setup-in-rhel8-with-pacemaker-and-corosync/&lt;/a&gt; &lt;/p&gt;

</description>
      <category>cloud</category>
      <category>webdev</category>
      <category>devops</category>
      <category>systems</category>
    </item>
    <item>
      <title>SAML Authentication for AWS OpenSearch with Okta and Role mapping</title>
      <dc:creator>Bidhan Khatri</dc:creator>
      <pubDate>Tue, 23 May 2023 08:07:35 +0000</pubDate>
      <link>https://dev.to/bidhanahdib/saml-authentication-for-aws-opensearch-with-okta-and-role-mapping-1loe</link>
      <guid>https://dev.to/bidhanahdib/saml-authentication-for-aws-opensearch-with-okta-and-role-mapping-1loe</guid>
      <description>&lt;p&gt;We are going to set up &lt;b&gt;IdP-initiated&lt;/b&gt; (Okta) SAML authentication for AWS OpenSearch. We will create two Okta groups: &lt;span&gt;&lt;code&gt;"opensearch-admin"&lt;/code&gt;&lt;/span&gt; and &lt;span&gt;"&lt;code&gt;opensearch-user&lt;/code&gt;,"&lt;/span&gt; and define different roles for OpenSearch.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://bidhankhatri.com.np/cloud/saml-authentication-for-aws-opensearch-with-okta-and-role-mapping/"&gt;https://bidhankhatri.com.np/cloud/saml-authentication-for-aws-opensearch-with-okta-and-role-mapping/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>webdev</category>
      <category>devops</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Adding custom attributes in Active Directory</title>
      <dc:creator>Bidhan Khatri</dc:creator>
      <pubDate>Mon, 25 Jan 2021 02:18:20 +0000</pubDate>
      <link>https://dev.to/bidhanahdib/adding-custom-attributes-in-active-directory-4g8d</link>
      <guid>https://dev.to/bidhanahdib/adding-custom-attributes-in-active-directory-4g8d</guid>
      <description>&lt;p&gt;Schema is an Active Directory component, that defines Active Directory database structure. The schema consists of Object Class and Object Attributes. In this article, we will discuss how to modify the Active Directory Schema attribute. &lt;/p&gt;

&lt;p&gt;In the Active Directory schema, it is allowed to add custom attributes. In organizations, there are situations where this option is useful. It is most of the time related to application integration requirements with active directory infrastructure. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Schema&lt;/strong&gt;&lt;br&gt;
The schema is the blueprint for data storage in Active Directory. Each object in Active Directory is an instance of a class in the schema. A user object, for example, exists as an instance of the user class. Attributes define the pieces of information that a class, and thus an instance of that class, can hold. Syntaxes define the type of data that can be placed into an attribute. As an example, if an attribute is defined with a syntax of Boolean, it can store True or False as its value, or it can be null. A null value has an implementation-specific meaning; it could mean True or False depending on the application using the value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;X.500 and OID Namespace&lt;/strong&gt;&lt;br&gt;
Active Directory is based on LDAP, which was originally based on the X.500 standard created by the ISO (International Organization for Standardization) and ITU (International Telecommunications Union) organizations in 1988. &lt;br&gt;
The X.500 standard specifies that individual object classes in an organization can be uniquely defined using a special identifying process. The process has to be able to take into account the fact that classes can inherit from one another, as well as the potential need for any organization in the world to define and export a class of their own design.&lt;br&gt;
To that end, the X.500 standard defined an Object Identifier (OID) to uniquely identify every schema object. This OID is composed of two parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The first part indicates the unique path to the branch holding the object in the X.500 tree-like structure. &lt;/li&gt;
&lt;li&gt;The second part uniquely indicates the object in that branch.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;OID notation uses integers for each branch and object, as in the following example OID for an object:&lt;br&gt;
&lt;strong&gt;&lt;em&gt;1.3.6.1.4.1.3385.12.497&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
This uniquely references object 497 in branch &lt;strong&gt;&lt;em&gt;1.3.6.1.4.1.3385.12.&lt;/em&gt;&lt;/strong&gt; The &lt;strong&gt;&lt;em&gt;1.3.6.1.4.1.3385.12&lt;/em&gt;&lt;/strong&gt; branch is contained in a branch whose OID is &lt;strong&gt;&lt;em&gt;1.3.6.1.4.1.3385&lt;/em&gt;&lt;/strong&gt;, and so on.&lt;/p&gt;

&lt;p&gt;Every object and attribute within Active Directory has a unique OID (Object Identifiers). Object Identifiers (OIDs) are unique numeric values (with dotted notations) issued by Microsoft and other issuing authorities to uniquely identify objects within Active Directory. When you plan to add a custom attribute, you have to ensure that the OID that you will use is unique, to avoid any possible conflict with any other object’s OID. Conflict of OID within Active Directory can result in replication issues or in the worst case, data loss.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Planning for Schema Update&lt;/strong&gt;&lt;br&gt;
Microsoft designed Active Directory to hold the most common objects and attributes we will require. However, organizations need an additional field to store custom attributes that are not available by default in Active Directory. Hence the need for Schema Extension arises.&lt;br&gt;&lt;br&gt;
Before we plan for Schema extension, we should consider the below points: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Schema is common for the entire AD Forest, any change in Schema structure would reflect in the entire forest.&lt;/li&gt;
&lt;li&gt;Schema modification cannot be reverted; any new class or attribute that we create in the schema is a permanent addition. We can disable or redefine schema extensions, but we can never remove them completely.&lt;/li&gt;
&lt;li&gt;If there is an alternate solution available, we should always consider that. For example, we need a custom field called “Roll Number” in our Active Directory. By default, there is no attribute available called “Roll Number”, but there is an attribute called “Employee ID”. So we should consider if some existing attribute can solve the purpose and if yes we should go for that solution instead of extending schema.&lt;/li&gt;
&lt;li&gt;For a large enterprise, we should always involve all stakeholders before we extend the Schema. Also, it should be first deployed in a Test / Dev environment and should be observed for few weeks, before deploying in production.&lt;/li&gt;
&lt;li&gt;Active Directory database should be backed up before modifying Schema.&lt;/li&gt;
&lt;li&gt;Rather than directly adding a custom attribute in the existing class, we should always create an Auxiliary Class and add the attribute there. Then this Auxiliary Class can be linked to the class where the new attribute is required.&lt;/li&gt;
&lt;li&gt;We should always obtain a unique OID, using the script or directly from IANA. Also, we should carefully plan for OID branching. Improper OID branching can lead to a Replication Issue or in the worst case, data loss.&lt;/li&gt;
&lt;li&gt;The Schema can be extended only from that Domain Controller which is holding Schema Master FSMO Role. Also, it requires Schema Admin privilege to modify the Schema.&lt;/li&gt;
&lt;li&gt;During Schema extension, all Domain Controllers in the forest should be available and there should not be any Replication issue. This is because Active Directory wants to ensure that no other Domain Controller has seized the Schema Master FSMO role, and this Domain Controller (from where we are extending the Scheme is indeed the real Schema Master. So if we have any Domain Controller which is not available but still there in AD database, we may encounter a problem during Schema modification.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Please backup Active Directory Database before you proceed.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In order to create custom attributes:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are three ways to modify the schema: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Through the Active Directory Schema MMC snap-in, &lt;/li&gt;
&lt;li&gt;Using LDIF files&lt;/li&gt;
&lt;li&gt;Programmatically using ADSI or LDAP. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We will use the first method, using Active Directory Schema MMC snap-in&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Step 1:&lt;/em&gt;&lt;/strong&gt; Login to Schema Master Domain Controller, with Schema Admin privilege.&lt;br&gt;
&lt;strong&gt;&lt;em&gt;Step 2:&lt;/em&gt;&lt;/strong&gt; Register Schema Management Snap-in.&lt;br&gt;&lt;br&gt;
The Schema Management MMC snap-in is not available from the Administrative Tools menu, like the other Active Directory snap-ins. To use it, we need to first register the Dynamic Link Library (DLL) file for the snap-in by typing the following command at the command prompt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;regsvr32.exe schmmgmt.dll&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Fx1ldMLW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/v3nfa852a21xfpw7rex5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Fx1ldMLW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/v3nfa852a21xfpw7rex5.png" alt="Alt Text"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;Click OK&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Step 3:&lt;/em&gt;&lt;/strong&gt; Open the Active Directory Schema MMC&lt;br&gt;&lt;br&gt;
Now, go to MMC and open Active Directory Schema.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Win + r &amp;gt; MMC &amp;gt; File &amp;gt; Add/Remove Snap-in &amp;gt; choose  Active Directory Schema &amp;gt; Add &amp;gt; Ok&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Step 4:&lt;/em&gt;&lt;/strong&gt; Obtain Unique OID.&lt;br&gt;&lt;br&gt;
Each and every attribute in the active directory schema has a unique OID value. There is a script developed by Microsoft to generate these unique OID valves. It can be found &lt;a href="https://gallery.technet.microsoft.com/scriptcenter/Generate-an-Object-4c9be66a#content"&gt;here.&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;Download that script and execute it through Powershell.&lt;br&gt;
This script Generates an object identifier (OID) using a GUID and the OID prefix 1.2.840.113556.1.8000.2554&lt;/p&gt;

&lt;p&gt;When you run a &lt;strong&gt;"Generate-OID.ps1"&lt;/strong&gt; PowerShell script you might get the message saying &lt;strong&gt;&lt;em&gt;“Generate-OID.ps1 is not digitally signed. The script will not execute on the system.”&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
To fix it you have to run the command below to run Set-ExecutionPolicy and change the Execution Policy setting.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command sets the execution policy to bypass for only the current PowerShell session after the window is closed, the next PowerShell session will open running with the default execution policy. “Bypass” means nothing is blocked and no warnings, prompts, or messages will be displayed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hqv2y23s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/an2qiezxggoz5zlppblq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hqv2y23s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/an2qiezxggoz5zlppblq.png" alt="Alt Text"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Step5:&lt;/em&gt;&lt;/strong&gt; Add new attribute: In my case I’m adding 2 new attributes&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;secret_key=string&lt;br&gt;&lt;br&gt;
enable2FA=true/false&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ol&gt;
&lt;li&gt;Rick click on &lt;strong&gt;&lt;em&gt;“Attributes”&lt;/em&gt;&lt;/strong&gt; and click on &lt;strong&gt;&lt;em&gt;“Create Attribute”&lt;/em&gt;&lt;/strong&gt;. Click &lt;strong&gt;&lt;em&gt;“Continue”&lt;/em&gt;&lt;/strong&gt; on the warning message.&lt;/li&gt;
&lt;li&gt;Supply all the required values. Select the Syntax very carefully.&lt;/li&gt;
&lt;li&gt;If you would like to replicate this attribute to the Global Catalog, then select the option &lt;strong&gt;&lt;em&gt;“Replicate this attribute to the Global Catalog”&lt;/em&gt;&lt;/strong&gt;. This would make this attribute searchable from other domains in the same forest, but it would also put some additional load on the global catalog. So do not select this option unless it is not required.&lt;/li&gt;
&lt;li&gt;Finally, click “Apply” and “OK”. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--o9rtRSxh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/prh2i4vdkmrzkvaz48ir.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--o9rtRSxh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/prh2i4vdkmrzkvaz48ir.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common Name –&lt;/strong&gt; This is the name of the object. It is only allowed to use letters, numbers and hyphen for the CN.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;LDAP Display Name –&lt;/strong&gt; When object is referring in script, program or command line utility it need to call using the LDAP Display name instead of the Common Name. when you define the CN, it will automatically create the LDAP Display name. &lt;br&gt;&lt;br&gt;
&lt;strong&gt;X500 Object ID –&lt;/strong&gt;  Each and every attribute in active directory schema has unique OID value. There is script develop by Microsoft to generate these unique OID valves. &lt;br&gt;&lt;br&gt;
&lt;strong&gt;Syntax –&lt;/strong&gt; It define the storage representation for the object. It is only allowed to use syntaxes defined by Microsoft. One attribute can only associate with one syntax. In below I listed few common used syntaxes in attributes.    &lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Syntax&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Boolean&lt;/td&gt;
&lt;td&gt;True or False&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Unicode String&lt;/td&gt;
&lt;td&gt;A large string&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Numeric String&lt;/td&gt;
&lt;td&gt;String of digits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Integer&lt;/td&gt;
&lt;td&gt;32-bit Numeric value&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Large Integer&lt;/td&gt;
&lt;td&gt;64-bit Numeric value&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SID&lt;/td&gt;
&lt;td&gt;Security Identifier Value&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Distinguished Name&lt;/td&gt;
&lt;td&gt;String value to uniquely identify object in AD&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5d-MpyPg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cdlgfll4p1x2fama8dyh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5d-MpyPg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cdlgfll4p1x2fama8dyh.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dC3cBBJa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/073todup5qgz3s3mbamb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dC3cBBJa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/073todup5qgz3s3mbamb.png" alt="Alt Text"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;As the next step, we need to add it to the &lt;strong&gt;user class.&lt;/strong&gt; In order to do that go to &lt;strong&gt;classes container&lt;/strong&gt;, double click on &lt;strong&gt;user class&lt;/strong&gt;, and click on the attributes tab. In there by clicking the add button can browse and select the newly added attribute from the list.   &lt;/p&gt;

&lt;p&gt;Add newly created attributes &lt;strong&gt;"enable2FA"&lt;/strong&gt; and &lt;strong&gt;"secretKey"&lt;/strong&gt; to &lt;strong&gt;"User class".&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LrnsSnrg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mfti2f882a6cfsoxj4at.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LrnsSnrg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mfti2f882a6cfsoxj4at.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
Do the same for another attributes "sectetkey"&lt;/p&gt;

&lt;p&gt;Now close the &lt;strong&gt;"Active Directory Users and Computers"&lt;/strong&gt; and open again. when you look at the user account we can see the new attribute and we can add the new data to it. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wsrxDQ-m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/uewnoq0gwxk6kik6vbr8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wsrxDQ-m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/uewnoq0gwxk6kik6vbr8.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Also, check the second attribute.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KmlvSNGa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lfulsc5za13ax8ku61gw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KmlvSNGa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lfulsc5za13ax8ku61gw.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can set values for those attributes and check through PowerShell whether that value is shown or not.&lt;/p&gt;

&lt;p&gt;NOTE: If the value of your attribute is empty then that empty attribute will not be shown if you query through powershell or any application but if it has value then it will be reflected. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In PowerShell&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;Get-ADUser -Identity bdn -Properties *&lt;/span&gt;

&lt;span class="s"&gt;Get-ADUser -Identity bdn -Properties secretkey,enable2FA&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You have successfully added custom attributes to your Active Directory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;References:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://social.technet.microsoft.com/wiki/contents/articles/51121.active-directory-how-to-add-custom-attribute-to-schema.aspx"&gt;https://social.technet.microsoft.com/wiki/contents/articles/51121.active-directory-how-to-add-custom-attribute-to-schema.aspx&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.oreilly.com/library/view/active-directory-4th/9780596155179/ch04.html"&gt;https://www.oreilly.com/library/view/active-directory-4th/9780596155179/ch04.html&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.rebeladmin.com/2017/11/step-step-guide-create-custom-active-directory-attributes/#:~:text=In%20order%20to%20create%20custom,dll%20from%20the%20Domain%20Controller"&gt;https://www.rebeladmin.com/2017/11/step-step-guide-create-custom-active-directory-attributes/#:~:text=In%20order%20to%20create%20custom,dll%20from%20the%20Domain%20Controller&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://caiomsouza.medium.com/fix-for-powershell-script-not-digitally-signed-69f0ed518715"&gt;https://caiomsouza.medium.com/fix-for-powershell-script-not-digitally-signed-69f0ed518715&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gallery.technet.microsoft.com/scriptcenter/Generate-an-Object-4c9be66a#content"&gt;https://gallery.technet.microsoft.com/scriptcenter/Generate-an-Object-4c9be66a#content&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/archive/blogs/isingh/adding-custom-attributes-in-active-directory"&gt;https://docs.microsoft.com/en-us/archive/blogs/isingh/adding-custom-attributes-in-active-directory&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>devops</category>
      <category>beginners</category>
    </item>
    <item>
      <title>FreeRADIUS with the rlm_sql_oracle module</title>
      <dc:creator>Bidhan Khatri</dc:creator>
      <pubDate>Wed, 06 Jan 2021 15:43:24 +0000</pubDate>
      <link>https://dev.to/bidhanahdib/manually-building-freeradius-3-0-21-with-the-rlmsqloracle-module-9il</link>
      <guid>https://dev.to/bidhanahdib/manually-building-freeradius-3-0-21-with-the-rlmsqloracle-module-9il</guid>
      <description>&lt;p&gt;We are going to build FreeRADIUS version &lt;strong&gt;&lt;em&gt;3.0.21&lt;/em&gt;&lt;/strong&gt; with ORACLE Module &lt;strong&gt;&lt;em&gt;rlm_sql_oracle&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Download ORACLE Instant Client
&lt;/h3&gt;

&lt;p&gt;Visit ORACLE official site and download oracle instant client. For that, you may need to log in. I'm downloading &lt;strong&gt;&lt;em&gt;v12.2&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Here is the link for oracle instant client. &lt;a href="https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html"&gt;https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;mkdir /opt/oracle&lt;/span&gt;
&lt;span class="s"&gt;cp instantclient-* /opt/oracle/&lt;/span&gt;
&lt;span class="s"&gt;unzip instantclient-basic-linux.x64-12.2.0.4.0.zip&lt;/span&gt;
&lt;span class="s"&gt;unzip instantclient-sdk-linux.x64-12.2.0.4.0.zip&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add below lines to file &lt;strong&gt;.bash_profile&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;vim ~/.bash_profile&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;export ORACLE_HOME=/usr/lib/oracle/12.2/client64&lt;/span&gt;
&lt;span class="s"&gt;export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/oracle/instantclient_12_2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;source ~/.bash_profile&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now verify the environment.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;env | grep -i oracle&lt;/span&gt;

&lt;span class="s"&gt;LD_LIBRARY_PATH=/opt/oracle/instantclient_12_2:/usr/local/lib:/usr/local/lib64&lt;/span&gt;
&lt;span class="s"&gt;ORACLE_HOME=/usr/lib/oracle/12.2/client64&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a symlink for client shared library &lt;strong&gt;libclntsh.so&lt;/strong&gt;. As, while compiling FreeRADIUS look for that oracle library.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;cd /opt/oracl/instantclient_12_2&lt;/span&gt;

&lt;span class="s"&gt;ln -s libclntsh.so.12.1 libclntsh.so&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Download FreeRADIUS
&lt;/h3&gt;

&lt;p&gt;Install dependency first.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;yum install libtalloc-devel&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;wget ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-3.0.21.tar.gz&lt;/span&gt;

&lt;span class="s"&gt;tar xvf freeradius-server-3.0.21.tar.gz&lt;/span&gt;
&lt;span class="s"&gt;cd freeradius-server-3.0.21&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Compile FreeRADIUS with the below parameters.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;./configure --with-oracle-home-dir=/opt/oracle/instantclient_12_2 --with-oracle-lib-dir=/opt/oracle/instantclient_12_2 --with-oracle-include-dir=/opt/oracle/instantclient_12_2/sdk/include&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;make&lt;/span&gt;
&lt;span class="s"&gt;make install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now configure Radius with oracle module.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;vim /usr/local/etc/raddb/mods-available/sql&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;dialect = "oracle"&lt;/span&gt;
&lt;span class="s"&gt;driver = "rlm_sql_oracle"&lt;/span&gt;

&lt;span class="c1"&gt;## your db credential here.&lt;/span&gt;
&lt;span class="s"&gt;login = "wifiradius_admin"&lt;/span&gt;      
&lt;span class="s"&gt;password = "xxxxxxxx"&lt;/span&gt;


&lt;span class="s"&gt;radius_db = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=XXX.XXX.XXX.XXX)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=dbname)))"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;cd /usr/local/etc/raddb/mods-enabled&lt;/span&gt;
&lt;span class="s"&gt;ln -s ../mods-available/sql sql&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Launch FreeRADIUS in debug mode and if everything looks ok then start the service.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;radiusd X&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, you can see radius module being loaded.&lt;br&gt;&lt;br&gt;
&lt;code&gt;rlm_sql (sql): Driver rlm_sql_oracle (module rlm_sql_oracle) loaded and linked.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;systemctl start radiusd&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now your FreeRADIUS service should be running with ORACLE module. &lt;/p&gt;

</description>
      <category>linux</category>
      <category>beginners</category>
      <category>systems</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
