Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Active Directory Utility for SQL Server (ADUTIL) now officially supported with RHEL 9

July 16, 2024
Vivien Wang Arne Arnold Amit Khandelwal (Microsoft)
Related topics:
ContainersDatabasesLinux
Related products:
Microsoft SQL Server on Red Hat Enterprise LinuxRed Hat Enterprise Linux

Share:

    As of June 2024, Active Directory Utility for SQL Server (ADUTIL) is now officially supported with RHEL 9. SQL Server 2022 has as of July 2024 been officially certified with RHEL 9, and is now Generally Available on Red Hat Ecosystem Catalog.

    The adutil tool is a command-line interface (CLI) utility for configuring and managing Windows Active Directory domains for SQL Server on Linux and containers, without switching between Windows and Linux machines to manage Active Directory. This tool was developed to ensure that users get the most out of authentication, user management, and keytab configuration in a more integrated setting.

    Does this all sound good to you? Let's dive in and find out how exactly we can set up adutil on Red Hat Enterprise Linux (RHEL) 9. 

    Prepping and installing

    You will need to join your host machine to the domain as a prerequisite—see Join SQL Server on Linux to Active Directory on how to get this all set up.

    Then, to install adutil on RHEL 9, you’ll need to execute the following commands to add the RHEL 9 Prod repository:

    sudo curl -o /etc/yum.repos.d/msprod.repo https://packages.microsoft.com/config/rhel/9/prod.repo 
    ## Now you are ready to install adutil using the command: 
    sudo ACCEPT_EULA=Y yum install -y adutil 
    ## you can check the adutil version using the command and ensure the version is 1.1.138 
    adutil --version

    Use cases for adutil

    Here are some of the typical activities that adutil is used for when configuring or administering Active Directory authentication for SQL Server on Linux and containers.

    Creating an account in Active Directory:

    adutil user create --name sqluser --distname CN=sqluser,CN=Users,DC=CONTOSO,DC=COM

    Creating SPNs associated with an account or service:

    adutil spn addauto -n sqluser -s MSSQLSvc -H mymachine.contoso.com -p 1433

    Creating keytabs using adutil:

    adutil keytab createauto -k /var/opt/mssql/secrets/mssql.keytab -p 1433 -H mymachine.contoso.com --password 'P@ssw0rd' -s MSSQLSvc

    To navigate to the reference manual page, you can do so using the command man adutil.

    To learn more about adutils check out Microsoft’s official documentation: Introduction to adutil - Active Directory Utility - SQL Server

    Using adutil to manage Windows Active Directory

    Let's go over some of the actions that you can perform using adutil. To see a list of top-level commands, type adutil --help. This command shows you the top-level commands that you can use to manage and interact with Active Directory:

    $ adutil --help
    adutil - A general AD utility
      Usage:
        adutil [account]
      Subcommands:
        account      Functions for generic account operations
        delegation   Functions for configuring delegation permissions
        group        Functions for group management
        keytab       Functions for keytab management
        machine      Functions for managing machine accounts
        ou           Functions for managing organizational units
        spn          Functions for service principal name (SPN) management
        user         Functions for user account management
        config       Functions for modifying adutil configuration
      Flags:
           --version       Displays the program version string.
        -h --help          Displays help with available flag, subcommand, and positional value parameters.
        -d --debug         Display additional debugging information when making LDAP/Kerberos calls.
           --accept-eula   Accepts the current EULA for adutil. This has no effect if the EULA has already been accepted.

    You can run the following help options to seek help with the next level of commands:

    $ adutil spn --help
    spn - Functions for service principal name (SPN) management
      Usage:
        spn [add]
      Subcommands:
        add       Adds the provided SPNs to an account
        addauto   Automatically generate SPNs based on SPN component inputs and add them to an account
        delete    Deletes the provided SPNs from an account
        search    Search for an SPN by name or list all SPNs in the directory
        show      Get the list of SPNs assigned to an account
      Flags:
        --version       Displays the program version string.
        -h --help          Displays help with available flag, subcommand, and positional value parameters.
        -d --debug         Display additional debugging information when making LDAP/Kerberos calls.
           --accept-eula   Accepts the current EULA for adutil. This has no effect if the EULA has already been accepted.
    $ adutil spn search --help
    search - Search for an SPN by name or list all SPNs in the directory
      Usage:
         search [name]
      Positional Variables:
        name   OPTIONAL: Name of the SPN to search for in the directory. * can be used as a wildcard
      Flags:
        --version       Displays the program version string.
        -h --help          Displays help with available flag, subcommand, and positional value parameters.
        -n --name          OPTIONAL: Name of the SPN to search for in the directory. * can be used as a wildcard
        -f --filter        OPTIONAL: Filter for the search (User,Machine,Group)
        -o --ouname        OPTIONAL: Distinguished name of OU in which SPNs should be searched. If omitted, the entire directory will be searched.
        -d --debug         Display additional debugging information when making LDAP/Kerberos calls.
           --accept-eula   Accepts the current EULA for adutil. This has no effect if the EULA has already been accepted.

    Running Ansible with adutil

    Did you know that Ansible can automate your SQL Server deployment? The Ansible-based SQL Server collection uses adutil as a tool to enable AD authentication for SQL Server on Linux. Learn more about this in Automation Hub - microsoft.sql | Ansible Automation Platform (redhat.com) and Microsoft’s official documentation: Quickstart: Deploy SQL Server on Linux using an Ansible playbook - SQL Server

    Further reading

    • Announcing the Availability of adutil for RHEL 9

    • Introducing adutil - A tool to ease configuration of AD authentication for SQL on Linux/Containers

    • Quickstart: Deploy SQL Server on Linux using an Ansible playbook  

    Related Posts

    • MySQL for developers in Red Hat OpenShift

    • Deploying a Spring Boot App with MySQL on OpenShift

    • MySQL data replication between virtual machines via SDN

    • Red Hat open source databases in beta: Adds PostgreSQL 10, MongoDB 3.6; updates MySQL 5.7

    • Using a MySQL database in your Red Hat OpenShift application

    Recent Posts

    • More Essential AI tutorials for Node.js Developers

    • How to run a fraud detection AI model on RHEL CVMs

    • How we use software provenance at Red Hat

    • Alternatives to creating bootc images from scratch

    • How to update OpenStack Services on OpenShift

    What’s up next?

    This Intermediate Linux Commands cheat sheet presents a collection of Linux commands and executables for developers and system administrators who want to move beyond the basic. Get tips on managing processes, users, and groups on Linux, as well as monitoring disk and network usage. 

    Get the cheat sheet
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue