Skip to content

Commit c0fd746

Browse files
committed
Kerberos tutorial: update installation instructions
1 parent 1c40ff5 commit c0fd746

1 file changed

Lines changed: 39 additions & 50 deletions

File tree

  • content/installation/user/user_install_kerberos

content/installation/user/user_install_kerberos/index.md

Lines changed: 39 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -23,58 +23,14 @@ Hence, we can use the protocol to have an OS independent solution for authentica
2323

2424
For debian/ubuntu users (make sure you belong to the `sudo` group):
2525

26+
```bash
27+
sudo apt-get install krb5-user
28+
sudo apt-get install openssl # if not yet available on your system (it probably is)
2629
```
27-
sudo apt-get install krb5-user libpam-krb5 libpam-ccreds auth-client-config
28-
sudo apt-get install openssl
29-
```
30-
31-
These libraries will be used later on. The following section is for interaction with MS SQL databases.
32-
33-
Modern Linux distributions use PAM to handle the authentication tasks of applications (services) on the system (PAM stands for _Pluggable Authentication Modules_, see `man PAM`). However we do not need that here.
34-
The above installation may have led to inserting a line into PAM configuration file `/etc/pam.d/common-auth`. The line looks like this (note the defining part `pam_krb5.so`):
35-
36-
```
37-
auth [success=4 default=ignore] pam_krb5.so minimum_uid=1000
38-
```
39-
40-
This line makes every application that needs authentication on the system (like sudo, screensaver unlock, update manager, ...) first try the Kerberos connection to authenticate.
41-
This is overkill as we don't want to use Kerberos that way, and it can significantly slow down all other system authentications.
42-
Therefore, you should _comment out_ the above line in `/etc/pam.d/common-auth`.
43-
44-
### MS SQL Server tools
45-
46-
As most of the databases at INBO are SQL Server, an appropriate driver and the command line toolset is required to fully support database connections to SQL Server.
47-
48-
#### ODBC driver
49-
50-
Download and install the [Microsoft ODBC Driver for SQL Server](https://www.microsoft.com/en-us/download/details.aspx?id=53339). The installation instructions for different Linux flavours can be downloaded together with the ODBC driver. For `Ubuntu 16.04` (and most distributions based on it), following instructions apply:
5130

52-
```
53-
sudo su
54-
apt-get install curl
55-
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
56-
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssqlrelease.list
57-
exit
58-
sudo apt-get update
59-
sudo ACCEPT_EULA=Y apt-get install msodbcsql=13.1.4.0-1
60-
sudo apt-get install unixodbc-dev
61-
```
62-
63-
#### mssql-tools
64-
65-
Install the MS SQL tools as well:
66-
67-
* **sqlcmd**: Command-line query utility.
68-
* **bcp**: Bulk import-export utility.
31+
During installation, you may be asked for extra configuration input.
32+
To answer that, see next section: [Configure Kerberos client](#configure-kerberos-client).
6933

70-
The instructions for different platforms are explained [here](https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools). In order to test the SQL connection later in this tutorial, add `/opt/mssql-tools/bin/` to your PATH environment variable.
71-
72-
You could also decide to go for the binaries: download [the debian package of mssql-tools](https://apt-mo.trafficmanager.net/repos/mssql-ubuntu-xenial-release/pool/main/m/mssql-tools/mssql-tools_14.0.1.246-1_amd64.deb) and install with:
73-
74-
```
75-
sudo apt-get install libgss3
76-
sudo dpkg -i mssql-tools_14.0.1.246-1_amd64.deb
77-
```
7834

7935
### Configure Kerberos client
8036

@@ -126,7 +82,40 @@ sudo apt-get install ntp
12682
```
12783
After installation, check if the following two files do exist:
12884
* `/etc/ntp.conf`
129-
* `/etc/ntp.conf.dhcp` (empty file, just amke sure there is a file)
85+
* `/etc/ntp.conf.dhcp` (empty file, just make sure there is a file)
86+
87+
### MS SQL Server ODBC driver and tools
88+
89+
As most of the databases at INBO are SQL Server, an appropriate driver and the command line toolset is required to fully support database connections to SQL Server.
90+
91+
Apart from the ODBC driver, we will also install following tools:
92+
93+
* **sqlcmd**: Command-line query utility.
94+
* **bcp**: Bulk import-export utility.
95+
96+
For Linux, follow [these installation instructions](https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server).[^installnotes]
97+
98+
Also follow the 'optional' instructions, as these will install the tools.
99+
100+
Hence, for Ubuntu 20.04 or Linux Mint 20 you would do:
101+
102+
```bash
103+
sudo su
104+
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
105+
#Ubuntu 20.04
106+
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
107+
exit
108+
sudo apt-get update
109+
sudo ACCEPT_EULA=Y apt-get install msodbcsql17 mssql-tools
110+
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
111+
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
112+
source ~/.bashrc
113+
sudo apt-get install unixodbc-dev
114+
```
115+
116+
[^installnotes]: You can also find the debian packages of Microsoft ODBC Driver for SQL Server [here](https://docs.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server).
117+
You can find separate installation instructions for `sqlcmd`, `bcp` and `unixodbc-dev` [here](https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools).
118+
130119

131120
## Test installation
132121

0 commit comments

Comments
 (0)