THE VIDEO

THE SYNOPSIS

In this video, we will configure SQL Server on Linux to use Active Directory and enable Windows authentication, whether you’re connecting from Windows or Linux.

THE COMMANDS

Following are the command line operations I used throughout the video.

sudo apt install -y resolvconf vim


sudo vi /etc/resolvconf/resolv.conf.d/head
# File contents:
search CSMORE.INFO INFO
nameserver 172.20.144.42


sudo systemctl enable --now resolvconf.service
sudo systemctl restart systemd-resolved.service


ping csmore
ping csmore.info


sudo apt install -y krb5-user realmd software-properties-common python3-software-properties packagekit
sudo apt-get install -y adcli libpam-sss libnss-sss sssd sssd-tools


sudo hostname SQLVM0.CSMORE.INFO


sudo realm join CSMORE.INFO -U 'Administrator@CSMORE.INFO' -v


wget https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/a/adutil/adutil_1.0.014_amd64.deb
sudo dpkg -i adutil_1.0.014_amd64.deb


sudo adutil --accept-eula


wget http://http.us.debian.org/debian/pool/main/o/openldap/libldap-2.4-2_2.4.47+dfsg-3+deb10u7_amd64.deb
sudo dpkg -i libldap-2.4-2_2.4.47+dfsg-3+deb10u7_amd64.deb


sudo adutil --accept-eula


# The following section runs as root.
sudo su -
kinit Administrator@CSMORE.INFO
adutil spn addauto -n sqlsvc -s MSSQLSvc -H SQLVM0.csmore.info -p 1433 --accept-eula

/opt/mssql/bin/mssql-conf setup-ad-keytab /var/opt/mssql/secrets/mssql.keytab sqlsvc
klist -kte /var/opt/mssql/secrets/mssql.keytab

/opt/mssql/bin/mssql-conf validate-ad-config /var/opt/mssql/secrets/mssql.keytab

/opt/mssql/bin/mssql-conf set network.kerberoskeytabfile /var/opt/mssql/secrets/mssql.keytab
/opt/mssql/bin/mssql-conf set network.privilegedadaccount sqlsvc

systemctl restart mssql-server
systemctl status mssql-server

exit

# The following section runs as a normal user.
cd ~/Downloads


sudo dpkg -i azuredatastudio-linux-1.47.0.debi 


kinit LinuxUser@CSMORE.INFO

LINKS AND ADDITIONAL INFORMATION

All of these videos are on behalf of Catallaxy Services, LLC, my consulting company where I help customers on problems all across the data platform space.

One thought on “Video: Active Directory and SQL Server on Linux

Leave a comment