<?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>Forem: arash ezazi</title>
    <description>The latest articles on Forem by arash ezazi (@arash_ezazy_f69fb13acdd37).</description>
    <link>https://forem.com/arash_ezazy_f69fb13acdd37</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%2F2647616%2Ffccd27d3-5a88-47be-aa3b-9c329010c4eb.jpg</url>
      <title>Forem: arash ezazi</title>
      <link>https://forem.com/arash_ezazy_f69fb13acdd37</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/arash_ezazy_f69fb13acdd37"/>
    <language>en</language>
    <item>
      <title>MinIO Alternatives (Open Source, On-Prem, Real-World Credible): SeaweedFS, Garage, RustFS, and Ceph RGW (Rook)</title>
      <dc:creator>arash ezazi</dc:creator>
      <pubDate>Fri, 26 Dec 2025 10:24:59 +0000</pubDate>
      <link>https://forem.com/arash_ezazy_f69fb13acdd37/minio-alternatives-open-source-on-prem-real-world-credible-seaweedfs-garage-rustfs-and-ceph-36om</link>
      <guid>https://forem.com/arash_ezazy_f69fb13acdd37/minio-alternatives-open-source-on-prem-real-world-credible-seaweedfs-garage-rustfs-and-ceph-36om</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt; &lt;br&gt;
Choosing the right tool for your storage layer is one of the most consequential decisions in modern infrastructure. If your data footprint is large—or moving that data is expensive, slow, or operationally risky—it’s often better to pause and validate assumptions early. Rushed storage decisions can create outcomes that are not only costly and time-consuming, but sometimes genuinely hard to reverse. On the other hand, if you have multiple migration paths, you’ve assessed risks realistically, and you have rollback options if one approach fails, then a structured comparison can help you make a more informed decision. The most important principle is simple: do not decide based on feature lists alone. Decide based on your workload, your failure model, and your operational constraints—and confirm with a PoC.&lt;br&gt;
&lt;strong&gt;Criteria of This Article&lt;/strong&gt; &lt;br&gt;
This article focuses on MinIO alternatives that are open source, deployable on-premise, and credible in real-world scenarios rather than just demos or marketing narratives. The options covered are SeaweedFS, Garage, RustFS, and Ceph Object Gateway (RGW) deployed on Kubernetes via Rook. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn9zcon03bd8g5bta81zf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn9zcon03bd8g5bta81zf.png" alt=" " width="800" height="424"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Option One: SeaweedFS&lt;/strong&gt; &lt;br&gt;
SeaweedFS is a distributed storage system designed to handle both small and large files, and it is often framed closer to a distributed filesystem plus object gateway approach than a pure “S3-first” product. At a high level, it combines a volume/blob layer with additional services (such as filer and gateways) to support multiple access methods, including S3 and file-oriented interfaces. In practice, SeaweedFS can be a strong fit when your workload is file-heavy or multi-access-pattern and you want architectural flexibility. It is commonly discussed as valuable for very large datasets and for workloads where colder data dominates, such as archives, backups, or large media libraries with low access frequency. The trade-off is that operational complexity can be higher than MinIO depending on how you deploy it, because the system is modular and many workflows are CLI and configuration driven rather than UI-driven. UI maturity is generally weaker than MinIO Console, so if your team prefers UI-first day-2 operations, you should plan for that gap. Authentication and IAM-like expectations are an area where the safest stance is to assume you must validate the exact auth flow you need in your environment, including the behavior of access keys and any OIDC-style integration you intend to rely on. For durability, SeaweedFS is often framed as replication-oriented for hot data, with erasure coding as a strategy you can apply for warm or cold tiers, but that typically requires deliberate lifecycle and tiering design rather than a simple toggle. Performance is also highly workload-dependent; community reports vary, so the only reliable conclusion is to benchmark your own workload with your object sizes, concurrency profile, metadata intensity, and failure scenarios. Overall, SeaweedFS can shine in file-heavy contexts and large-scale datasets, but you should expect less polished UI and more operational design effort than MinIO. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmbs33qxhvjg6mcp6b32i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmbs33qxhvjg6mcp6b32i.png" alt=" " width="800" height="282"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Option Two: Garage&lt;/strong&gt; &lt;br&gt;
Garage is a lightweight Rust-based object storage system designed with reliability and geo-distributed replication as a core focus. It frequently comes up in self-hosted discussions because it aims to be self-contained and resilient across multiple zones or sites, often on relatively modest hardware, with replication serving as the primary resilience model. The most important constraint to internalize is S3 feature completeness: Garage is unusually explicit about which parts of the S3 API it supports and which are incomplete, which is great for transparency, but it also means you should plan for the possibility that a workflow depending on advanced S3 capabilities may not work as-is. If your environment depends on specific tooling and S3 edge behaviors—such as backup tooling with strict API requirements, lifecycle policies, versioning nuances, or policy/ACL expectations—Garage should be treated as “PoC required” rather than “assume it will be compatible.” In IAM/OIDC terms, Garage is not generally positioned as an integrated IAM/OIDC console-first experience, so if you need external identity integration you will often end up building it around Garage via proxies or gateways. The same minimalism applies to UI expectations; Garage is commonly operated CLI-first, which some teams prefer, but UI-driven operations teams should plan for that operational style. Performance insights are mostly community-driven rather than benchmark-driven, and one repeatedly practical lesson is that metadata performance matters disproportionately; if metadata lands on low-IOPS storage, behavior can degrade in unpleasant ways, while placing metadata on SSD/high-IOPS storage can significantly improve stability and throughput. In summary, Garage can be a strong fit for multi-site and geo-distributed deployments when you value resilience and operational simplicity, but it demands careful validation of S3 completeness and disciplined storage choices for metadata. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz6eclqh4k2d2hji2ahsn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz6eclqh4k2d2hji2ahsn.png" alt=" " width="800" height="424"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh2judl6ms9tnpehsrlfg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh2judl6ms9tnpehsrlfg.png" alt=" " width="800" height="424"&gt;&lt;/a&gt;&lt;br&gt;
*&lt;em&gt;Option Three: RustFS RustFS *&lt;/em&gt;&lt;br&gt;
is an open-source, S3-compatible distributed object storage system written in Rust, positioning itself around performance, simplicity, and security. It has attracted significant attention, but like any newer entrant, it should be evaluated with a production mindset that includes a real PoC, monitoring, and an explicit rollback plan. In its own documentation, RustFS presents a high-level architectural framing that distinguishes centralized-metadata and decentralized-metadata approaches and positions itself as decentralized and scalable, often alongside MinIO in that category. RustFS uses the Apache-2.0 license, which can be lower-friction for many organizations compared to copyleft licenses, particularly when internal distribution, embedding, or modifications are considerations. Operationally, one practical advantage RustFS claims over more minimal systems is a management console/dashboard, which can matter a lot for day-2 operations if your team expects visibility and routine actions through a UI. Performance is where RustFS messaging can be attractive, but it must be handled responsibly: project-published throughput figures should be treated as project-reported benchmark claims tied to specific test conditions, not as guaranteed outcomes. The only correct approach is to benchmark your own workload with realistic object distributions, concurrency, network conditions, and actual storage media (NVMe versus HDD, and the real IOPS budget). The overall picture is that RustFS may be appealing if you want an Apache-2.0, performance-oriented S3 store with a stronger UI story than minimal alternatives, but it requires more PoC discipline and version-specific validation to avoid surprises. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frxzfuwkrxawk7nucndq1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frxzfuwkrxawk7nucndq1.png" alt=" " width="752" height="457"&gt;&lt;/a&gt;&lt;br&gt;
*&lt;em&gt;Option Four: Ceph RGW on Kubernetes via Rook Ceph Object Gateway (RGW) &lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
is the object storage interface for Ceph, providing an S3-compatible REST API backed by Ceph’s storage cluster. When deployed on Kubernetes via Rook, RGW becomes especially compelling if you already operate Ceph or want a unified storage platform covering block, file, and object under one umbrella. RGW tends to be viewed as “enterprise-like” not because it is simple, but because it sits in a mature and widely deployed ecosystem with deep durability and operational concepts. That maturity comes with real trade-offs: compared to single-purpose object stores, Ceph is heavier operationally, has more moving parts, and benefits strongly from solid monitoring, capacity planning, and failure drills. Rook helps by providing Kubernetes-native deployment patterns and CRDs for Ceph components, including object stores and related workflows. If your team can afford the operational footprint, RGW is often the choice that maximizes ecosystem depth and long-term flexibility, especially when object storage is not an isolated component but part of a broader storage strategy.&lt;br&gt;
**What to Validate in a Real PoC&lt;br&gt;
A credible decision requires a measurable PoC. Define your workload concretely by testing realistic object sizes and access patterns, not just a single synthetic benchmark. At minimum, validate small-object behavior, medium objects, and large objects, because metadata and multipart behavior can dominate real performance. Test read-heavy, write-heavy, and mixed workloads, and include metadata-heavy operations such as listing and delete patterns if your applications do them. Run concurrency levels that reflect production clients, and treat latency sensitivity as a first-class requirement if your applications have tight timeouts or synchronous request patterns. Compatibility must be tested against your actual toolchain and “non-negotiable” S3 expectations, including backup tools, lifecycle rules, versioning, replication requirements, encryption expectations, and multipart uploads. Just as importantly, run failure and recovery drills: take nodes down, simulate zone loss, introduce network instability, and observe behavior while the system is rebalancing or recovering, because many systems look fine until recovery pressure reveals weak points. Finally, validate day-2 operations explicitly, including provisioning, secret and key rotation, observability (metrics/logs/alerts), upgrade procedures, and time-to-recover targets under realistic failure events. &lt;/p&gt;

</description>
      <category>minio</category>
      <category>ceph</category>
      <category>seaweedfs</category>
      <category>garage</category>
    </item>
    <item>
      <title>nsswitch.conf</title>
      <dc:creator>arash ezazi</dc:creator>
      <pubDate>Sun, 19 Jan 2025 22:04:34 +0000</pubDate>
      <link>https://forem.com/arash_ezazy_f69fb13acdd37/nsswitchconf-517f</link>
      <guid>https://forem.com/arash_ezazy_f69fb13acdd37/nsswitchconf-517f</guid>
      <description>&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  The Importance of nsswitch.conf in Linux
&lt;/h2&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;&lt;code&gt;/etc/nsswitch.conf&lt;/code&gt;&lt;/strong&gt; file plays a critical role in Linux systems by defining how the system resolves various types of information, such as users, groups, hosts, or services. This file specifies the order and method by which these lookups are performed, enabling administrators to control how the system interacts with different data sources.&lt;/p&gt;

&lt;p&gt;Have you ever configured tools like &lt;strong&gt;FreeIPA&lt;/strong&gt; or &lt;strong&gt;OpenLDAP&lt;/strong&gt; to manage users and permissions on your Linux systems? Or have you ever needed to lock down access to specific hosts on your servers? This is where the importance of &lt;strong&gt;&lt;code&gt;nsswitch.conf&lt;/code&gt;&lt;/strong&gt; becomes evident. This file allows you to control how lookups are performed for data sources like &lt;strong&gt;ldap&lt;/strong&gt;, &lt;strong&gt;dns&lt;/strong&gt;, &lt;strong&gt;files&lt;/strong&gt;, and more.&lt;/p&gt;

&lt;p&gt;However, neglecting proper configuration of this file can lead to serious security risks. For instance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adding an untrusted &lt;strong&gt;LDAP&lt;/strong&gt; source might allow attackers to gain &lt;strong&gt;root&lt;/strong&gt; access to your system.&lt;/li&gt;
&lt;li&gt;Misconfiguring &lt;strong&gt;mdns&lt;/strong&gt; can cause services to connect to malicious or unintended destinations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this article, we will explore the structure of the &lt;strong&gt;&lt;code&gt;nsswitch.conf&lt;/code&gt;&lt;/strong&gt; file, its critical parameters, and how to properly configure it. For a deeper understanding of how DNS lookups work in Linux, you can refer to &lt;a href="https://zwischenzugs.com/2018/06/08/anatomy-of-a-linux-dns-lookup-part-i/" rel="noopener noreferrer"&gt;Anatomy of a Linux DNS Lookup - Part I&lt;/a&gt; and &lt;a href="https://zwischenzugs.com/2018/06/18/anatomy-of-a-linux-dns-lookup-part-ii/" rel="noopener noreferrer"&gt;Part II&lt;/a&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Structure of &lt;code&gt;nsswitch.conf&lt;/code&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;&lt;code&gt;nsswitch.conf&lt;/code&gt;&lt;/strong&gt; file consists of lines defining a &lt;strong&gt;database&lt;/strong&gt; and its associated lookup sources. Each line follows this general format:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;database&amp;gt;: &amp;lt;source&amp;gt; [&amp;lt;option&amp;gt;] ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;&amp;lt;database&amp;gt;&lt;/code&gt;&lt;/strong&gt;: Specifies the type of information being resolved (e.g., users, groups, hosts).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;&amp;lt;source&amp;gt;&lt;/code&gt;&lt;/strong&gt;: Indicates the source or service used for lookups (e.g., &lt;code&gt;files&lt;/code&gt;, &lt;code&gt;ldap&lt;/code&gt;, &lt;code&gt;dns&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;&amp;lt;option&amp;gt;&lt;/code&gt;&lt;/strong&gt;: Provides additional behavior or conditions for lookups (e.g., &lt;code&gt;[NOTFOUND=return]&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can also refer to Oracle’s documentation on &lt;a href="https://docs.oracle.com/cd/E19683-01/806-4077/6jd6blbbb/index.html" rel="noopener noreferrer"&gt;Name Service Switch&lt;/a&gt; for a broader understanding of this system.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Key Sources in &lt;code&gt;nsswitch.conf&lt;/code&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;1. &lt;code&gt;files&lt;/code&gt;&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The &lt;strong&gt;&lt;code&gt;files&lt;/code&gt;&lt;/strong&gt; source uses local files to retrieve information. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User and group data is retrieved from &lt;strong&gt;&lt;code&gt;/etc/passwd&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;/etc/group&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Hostnames are resolved using &lt;strong&gt;&lt;code&gt;/etc/hosts&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is the fastest and most secure option and is often listed first in most configurations.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;2. &lt;code&gt;dns&lt;/code&gt;&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The &lt;strong&gt;&lt;code&gt;dns&lt;/code&gt;&lt;/strong&gt; source queries DNS servers to resolve hostnames into IP addresses. This is commonly used in the &lt;strong&gt;&lt;code&gt;hosts&lt;/code&gt;&lt;/strong&gt; database.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;hosts: files dns
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tells the system to first check &lt;strong&gt;&lt;code&gt;/etc/hosts&lt;/code&gt;&lt;/strong&gt; and, if the hostname isn’t found, query the DNS server.&lt;/p&gt;

&lt;p&gt;The details of how DNS resolution works, including its interaction with tools like &lt;code&gt;getaddrinfo&lt;/code&gt; and &lt;code&gt;resolv.conf&lt;/code&gt;, are extensively covered in &lt;a href="https://zwischenzugs.com/2018/06/08/anatomy-of-a-linux-dns-lookup-part-i/" rel="noopener noreferrer"&gt;Anatomy of a Linux DNS Lookup - Part I&lt;/a&gt; and &lt;a href="https://zwischenzugs.com/2018/06/18/anatomy-of-a-linux-dns-lookup-part-ii/" rel="noopener noreferrer"&gt;Part II&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;3. &lt;code&gt;ldap&lt;/code&gt;&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The &lt;strong&gt;&lt;code&gt;ldap&lt;/code&gt;&lt;/strong&gt; source queries an LDAP server to retrieve user, group, or other data. It’s commonly used in networked environments to manage users centrally.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;passwd: files ldap
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This configuration instructs the system to first look for user data in &lt;strong&gt;&lt;code&gt;/etc/passwd&lt;/code&gt;&lt;/strong&gt; and then query the LDAP server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security Note:&lt;/strong&gt; Misconfiguring or adding an untrusted LDAP server can allow attackers to inject privileged users into the system.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;4. &lt;code&gt;nis&lt;/code&gt; and &lt;code&gt;nisplus&lt;/code&gt;&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The &lt;strong&gt;&lt;code&gt;nis&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;nisplus&lt;/code&gt;&lt;/strong&gt; sources retrieve information using the Network Information Service (NIS) or its enhanced version, NIS+. These are often used in older networking environments.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;netgroup: nis
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This instructs the system to retrieve network group information from NIS.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;5. &lt;code&gt;mdns&lt;/code&gt; and &lt;code&gt;mdns4_minimal&lt;/code&gt;&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The &lt;strong&gt;&lt;code&gt;mdns&lt;/code&gt;&lt;/strong&gt; source enables Multicast DNS (mDNS), used to resolve hostnames on local networks without requiring a central DNS server.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;hosts: files mdns4_minimal [NOTFOUND=return] dns
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;mdns4_minimal&lt;/code&gt;&lt;/strong&gt; resolves IPv4 addresses using mDNS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;[NOTFOUND=return]&lt;/code&gt;&lt;/strong&gt; stops further lookups if no record is found, improving efficiency and security.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;6. &lt;code&gt;db&lt;/code&gt;&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The &lt;strong&gt;&lt;code&gt;db&lt;/code&gt;&lt;/strong&gt; source retrieves data from local databases in &lt;strong&gt;Berkeley DB&lt;/strong&gt; format. This is used for databases like &lt;code&gt;protocols&lt;/code&gt; and &lt;code&gt;services&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;services: db files
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This instructs the system to first query the &lt;strong&gt;&lt;code&gt;services.db&lt;/code&gt;&lt;/strong&gt; file and then fall back to &lt;strong&gt;&lt;code&gt;/etc/services&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;7. &lt;code&gt;compat&lt;/code&gt;&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The &lt;strong&gt;&lt;code&gt;compat&lt;/code&gt;&lt;/strong&gt; source provides backward compatibility for older NIS systems, combining local file data with NIS queries.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;8. &lt;code&gt;hesiod&lt;/code&gt;&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The &lt;strong&gt;&lt;code&gt;hesiod&lt;/code&gt;&lt;/strong&gt; source retrieves data from DNS for user and group information. It is rarely used in modern systems.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Options in &lt;code&gt;nsswitch.conf&lt;/code&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;[NOTFOUND=return]&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;This option instructs the system to stop querying other sources if a lookup fails to find the requested data.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;hosts: files mdns4_minimal [NOTFOUND=return] dns
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, if &lt;strong&gt;&lt;code&gt;mdns4_minimal&lt;/code&gt;&lt;/strong&gt; cannot resolve the hostname, the system stops looking and does not query DNS.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Example &lt;code&gt;nsswitch.conf&lt;/code&gt; Configuration&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Below is a typical configuration for &lt;strong&gt;&lt;code&gt;nsswitch.conf&lt;/code&gt;&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;passwd:         files systemd
group:          files systemd
shadow:         files
gshadow:        files

hosts:          files mdns4_minimal [NOTFOUND=return] dns mymachines
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;passwd&lt;/code&gt;, &lt;code&gt;group&lt;/code&gt;, &lt;code&gt;shadow&lt;/code&gt;, &lt;code&gt;gshadow&lt;/code&gt;:&lt;/strong&gt; User and group data is retrieved first from local files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;hosts&lt;/code&gt;:&lt;/strong&gt; Hostnames are resolved using &lt;strong&gt;&lt;code&gt;/etc/hosts&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;mdns4_minimal&lt;/strong&gt;, and then DNS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;protocols&lt;/code&gt;, &lt;code&gt;services&lt;/code&gt;, &lt;code&gt;ethers&lt;/code&gt;, &lt;code&gt;rpc&lt;/code&gt;:&lt;/strong&gt; Network information is retrieved from Berkeley DB files and local text files.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;&lt;code&gt;nsswitch.conf&lt;/code&gt;&lt;/strong&gt; file is one of the most important configuration files in Linux. It controls how the system resolves critical information and can significantly impact security and performance. Misconfigurations in this file can lead to severe issues, such as unauthorized access or misrouting of services. By understanding the available sources and their behaviors, administrators can configure their systems to be both efficient and secure.&lt;/p&gt;

&lt;p&gt;For further reading on DNS resolution and the intricacies of how Linux handles lookups, check out &lt;a href="https://zwischenzugs.com/2018/06/08/anatomy-of-a-linux-dns-lookup-part-i/" rel="noopener noreferrer"&gt;Anatomy of a Linux DNS Lookup - Part I&lt;/a&gt; and &lt;a href="https://zwischenzugs.com/2018/06/18/anatomy-of-a-linux-dns-lookup-part-ii/" rel="noopener noreferrer"&gt;Part II&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.oracle.com/cd/E88353_01/html/E37852/nsswitch.conf-5.html" rel="noopener noreferrer"&gt;https://docs.oracle.com/cd/E88353_01/html/E37852/nsswitch.conf-5.html&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>dns</category>
      <category>security</category>
      <category>ldap</category>
    </item>
  </channel>
</rss>
