# Linux Server - Install Rocky 9.4

## <span style="font-family: 'Verdana',sans-serif;">Summary</span>

Instructions on the install and configuration of a Linux server for Kiwiplan.


### <span style="font-family: 'Verdana',sans-serif;">Details</span>

#### <span style="font-family: 'Verdana',sans-serif;">Prerequisites</span>

VMware, KVM, Hyper-V machine to host the installation

You will need to use the following command when you vi your files as you cut and paste:

Once in vi you have to hit the colon and then type “set paste”

```shell
:set paste
```

This will not mess with the paste you put in.

### <span style="font-family: 'Verdana',sans-serif;">Instructions</span><span style="font-family: 'Verdana',sans-serif;"> </span>

### <span style="font-family: 'Verdana',sans-serif;">Preparing the OS</span>

This is to install the OS on a VmWare

### VMWare Setup using GUI

Boot ISO

<span style="mso-no-proof: yes;">![](https://docs.sflservicesllc.com/uploads/images/gallery/2025-08/embedded-image-ythjdsh2.png)</span>

Select “Install RedHat Linux”

<span style="mso-no-proof: yes;">![](https://docs.sflservicesllc.com/uploads/images/gallery/2025-08/embedded-image-ixk5gkhn.png)</span>

Select Language

[![image.png](https://docs.sflservicesllc.com/uploads/images/gallery/2025-08/scaled-1680-/image.png)](https://docs.sflservicesllc.com/uploads/images/gallery/2025-08/image.png)

Then Select “Network &amp; Hostname” from install menu.

![](https://docs.sflservicesllc.com/uploads/images/gallery/2025-08/embedded-image-7pfgwncd.png)

Set hostname and hit apply

Click Configure and set the IP

Click on IPv6 Settings and disable it

![](https://docs.sflservicesllc.com/uploads/images/gallery/2024-09/embedded-image-2bgknu9x.png)

![](https://docs.sflservicesllc.com/uploads/images/gallery/2025-08/embedded-image-gkx0prlk.png)

![](https://docs.sflservicesllc.com/uploads/images/gallery/2025-08/embedded-image-4bzv2hwo.png)

Select “Installation Destination”

![](https://docs.sflservicesllc.com/uploads/images/gallery/2025-08/embedded-image-6mwxchjm.png)

Make sure you select custom to configure the drives and click done

![](https://docs.sflservicesllc.com/uploads/images/gallery/2025-08/embedded-image-h6wvmp85.png)

Click on the blue link to auto configure them

![](https://docs.sflservicesllc.com/uploads/images/gallery/2025-08/embedded-image-hctttiyw.png)

Make sure the /home drive is highlighted and click the “-“ minus sign to remove that drive

![](https://docs.sflservicesllc.com/uploads/images/gallery/2025-08/embedded-image-jdxs1qd4.png)

Add the pink value of the space available after the delete of the home folder.

Enter “350 GiB” (total of drive space you created for the VM), this will recalculate the size of the drive and then hit “Done”.

![](https://docs.sflservicesllc.com/uploads/images/gallery/2024-09/embedded-image-no2h8bta.png)

Hit “Accept Changes”

Click on the “Root Password” and click “Allow root SSH login with password” and then click “Done”

![](https://docs.sflservicesllc.com/uploads/images/gallery/2025-08/embedded-image-t3amylb8.png)

Click “Software Selection” and select “Minimal Install”

[![b0f5e82c-e0e8-4040-b9d0-1b2d7f8860a7.png](https://docs.sflservicesllc.com/uploads/images/gallery/2025-08/scaled-1680-/b0f5e82c-e0e8-4040-b9d0-1b2d7f8860a7.png)](https://docs.sflservicesllc.com/uploads/images/gallery/2025-08/b0f5e82c-e0e8-4040-b9d0-1b2d7f8860a7.png)

![](https://docs.sflservicesllc.com/uploads/images/gallery/2025-08/embedded-image-z45mrlhm.png)

Click “Begin Installation”

![](https://docs.sflservicesllc.com/uploads/images/gallery/2025-08/embedded-image-qdniizgl.png)

When finished click on “Reboot System”


### Network Text GUI

Login with root

NOTE: Run # nmtui **Only if you did not do the GUI version**

![](https://docs.sflservicesllc.com/uploads/images/gallery/2024-09/embedded-image-i82xhbvl.png)

Select Edit connection

![](https://docs.sflservicesllc.com/uploads/images/gallery/2024-09/embedded-image-tfcolava.png)

Select interface and hit enter

![](https://docs.sflservicesllc.com/uploads/images/gallery/2024-09/embedded-image-rcsmwabt.png)

Use arrows to navigate

IPV4 change to manual and select show, fill in the information

IPV6 Change to disabled, press OK

Start setup Instructions for RedHat Linux


### Connect to the Server

Use a SSH connection to the server the remaining of the commands in order to cut and pates them in instead of using the VM interface.

### <span style="font-family: 'Verdana',sans-serif;">Commands to run</span>

This will show all command that need to be ran to update within the OS to start the configuration.

All the command are within each box

#### Update the System

After install update system packages for the needed configuration.

```shell
dnf upgrade -y
```

<span lang="ES-MX" style="mso-ansi-language: ES-MX;">Disable SeLinux</span>

```shell
setenforce 0
sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
```

File is located here if you wish to edit manually

```shell
vi /etc/sysconfig/selinux
```

<span lang="ES-MX" style="mso-ansi-language: ES-MX;"> </span>Disable firewall

```shell
systemctl disable firewalld.service
```

Epel Release

```bash
dnf install epel-release -y
```

After Epel installation rerun the upgrade to update if any are needed

```shell
dnf upgrade -y
```


## Install core software

### Install Packages

#### Add the needed packages

Install required system packages

```shell
dnf install bind-utils bzip2 cups cifs-utils enscript ftp gdb ghostscript java-1.8.0-openjdk-headless java-11-openjdk-headless krb5-workstation ksh lftp lrzsz lsof libnsl lzop mariadb-server mlocate mutt ncompress net-tools net-snmp net-snmp-utils net-tools nfs-utils nmap nvme-cli openldap-clients openssh-clients psmisc realmd rsync samba-client strace sysstat tcpdump telnet telnet-server tmux unix2dos vim vim-enhanced vsftpd wget xfsdump vsftpd htop mc rsyslog rsyslog-doc postfix dbus-daemon s-nail dovecot cyrus-sasl cyrus-sasl-lib cyrus-sasl-plain tree figlet toilet coreutils -y
```

If you are running on a virtual machine run the following

```shell
dnf install open-vm-tools -y
sysctl vm.swappiness=10
```

Install vim color for scripting

```shell
dnf install git -y
git clone https://github.com/flazz/vim-colorschemes ~/.vim/
cp ~/.vim/colors/desert.vim /etc/vimrc.local
```


### Configure Installed Packages

#### Configure the packages

Enable Telnet run the following to enable and start the packages

```shell
systemctl enable restart telnet.socket
systemctl enable telnet.socket
```

Enable Time Synchronization run the the following and add your domain time server

```shell
vi /etc/chrony.conf
```

Add your server below the following and make sure you change the domain name from **sflservicesllc.com**

```shell
# These servers were defined in the installation:
#server _gateway iburst
server domain.sflserviesllc.com iburst
```

Enable Time Synchronization

```shell
systemctl enable --now chronyd
```

Note: Time-zone changes are made with the<span class="st"> command</span>

```shell
timedatectl
```

<span style="mso-bidi-font-weight: bold;">Enable FTP run the following </span>

```shell
vi /etc/vsftpd/vsftpd.conf
```

<span style="mso-bidi-font-family: 'Courier New';">Make the following changes within the file</span>

```shell
sudo sed -i 's/^anonymous_enable=.*/anonymous_enable=NO/' /etc/vsftpd/vsftpd.conf
sudo sed -i 's/^local_umask=.*/local_umask=002/' /etc/vsftpd/vsftpd.conf
sudo sed -i 's/^#ascii_upload_enable=.*/ascii_upload_enable=YES/' /etc/vsftpd/vsftpd.conf
sudo sed -i 's/^#ascii_download_enable=.*/ascii_download_enable=YES/' /etc/vsftpd/vsftpd.conf
```

Start and Enable FTP for transfer in and out for us or other vendors

```shell
systemctl enable --now vsftpd.service
```

If you have a remote logging server setup then edit the following command

```shell
vi /etc/rsyslog.conf
```

Then add the following at the end of the file but make sure you update the IP address and replace the XXX's

```shell
*.* @192.168.XXX.XXX:514   # use @ for UDP Protocal
*.* @@192.168.XXX.XXX:514   # use @@ for TCP Protocal
```

Enable Rsyslog to enable logging locally and remotely

```shell
systemctl enable --now rsyslog
```

Configure Postfix for Email run the following

```shell
vi /etc/postfix/main.cf
```

<span lang="FR-CA" style="mso-bidi-font-family: 'Courier New'; mso-ansi-language: FR-CA;">Update the following with your email server</span>

```shell
relayhost = [ENTER IP or SMTP SERVER] or [sflservicesllc-com.mail.protection.outlook.com]:25
```

<span lang="FR-CA" style="mso-bidi-font-family: 'Courier New'; mso-ansi-language: FR-CA;">Optional if you want to hardcode a domain name run the following</span>

```shell
vi /etc/postfix/main.cf
```

<span lang="FR-CA" style="mso-bidi-font-family: 'Courier New'; mso-ansi-language: FR-CA;">Update the following with a remote or local email server and make sure you change the domain name from **sflservicesllc.com**</span>

```shell
myhostname = sflservicesllc.com

mydomain = sflservicesllc.com

mydestination =

relayhost = [ENTER IP or SMTP SERVER] or [sflservicesllc-com.mail.protection.outlook.com]:25
```

 <span lang="FR-CA" style="mso-bidi-font-family: 'Courier New'; mso-ansi-language: FR-CA;">Optional f you do not have a email remote/local server</span>

```shell
vi /etc/postfix/main.cf
```

Update the following for no email server and make sure you change the domain name from **sflservicesllc.com**

```
myhostname = sflservicesllc.com

mydomain = sflservicesllc.com

mail_spool_directory = /var/mail

mynetworks = 127.0.0.0/8, 168.100.189.0/28
```

Enable Postfix

```shell
systemctl enable --now postfix
```

Test your config this way

```shell
echo "Install of Linux Rocks $HOSTNAME" | sendmail steve.ling@sflservicesllc.com
```

<span lang="FR-CA" style="mso-ansi-language: FR-CA;">Locale add-ons to make sure that ANSI applications display correctly so e</span><span lang="FR-CA" style="mso-bidi-font-family: 'Courier New'; mso-ansi-language: FR-CA;">dit the following and replace all of the values with the following</span>

<span lang="FR-CA" style="mso-bidi-font-family: 'Courier New'; mso-ansi-language: FR-CA;">Edit the following:</span>

```shell
vi /etc/locale.conf
```

Change the following:

```shell
LANG="en_US"
SUPPORTED="en_GB:en_GB-.UTF-8:en_US:en_US.UTF-8:de_DE:de_DE.UTF-8"
SYSFONT="latarcyrheb-sun16"
```

<p class="callout info">Once added the locals exit and telnet back into the server to take the update</p>

### Bash colors and Prompt

Bash for root for color edit the following

Dependent on

```bash
dnf install figlet toilet -y
```

Creating Aliases

```bash
sudo cat > /etc/profile.d/custom-aliases.sh << EOF
# Common interactive aliases for all users

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias vi='vim'
alias tailf='tail -f'
EOF
```

Server Warning

```bash
sudo tee /etc/profile.d/custom-prod-warning.sh > /dev/null << 'EOF'
# Colorful PRODUCTION warning banner for interactive logins

if [[ -n "$PS1" && -t 0 && -t 1 ]]; then  # Interactive terminal with stdin/stdout
    RED='\033[1;31m'   # Bold red
    YELLOW='\033[1;33m' # Bold yellow
    NC='\033[0m'       # No color

    echo
    if command -v figlet >/dev/null 2>&1; then
        figlet -f big "PRODUCTION" | while IFS= read -r line; do
            printf '%b%s%b\n' "$RED" "$line" "$NC"
        done
        figlet -f big "SERVER" | while IFS= read -r line; do
            printf '%b%s%b\n' "$RED" "$line" "$NC"
        done
    else
        echo -e "${RED}***** PRODUCTION SERVER!! *****${NC}"
    fi

    echo
    echo -e "${YELLOW} *** EXTREME CAUTION REQUIRED ***${NC}"
    echo -e "${RED}This is a LIVE PRODUCTION system.${NC}"
    echo -e "${RED}Unauthorized access is strictly prohibited.${NC}"
    echo -e "${RED}All activity is logged and monitored.${NC}"
    echo -e "${YELLOW}Think twice before running commands!${NC}"
    echo

    # Pause briefly to ensure user sees the warning
    read -t 5 -p "Press Enter to continue (auto-continue in 5 seconds)... " || true
    echo
fi
EOF
```

Creating Colorful Prompts

```bash
sudo tee /etc/profile.d/custom-prompt-and-colors.sh > /dev/null << 'EOF'
# Custom LS_COLORS and improved multi-line colored prompt

# Vibrant LS_COLORS (directories bold blue on gray, etc.)
LS_COLORS='rs=0:di=01;44:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:'
export LS_COLORS

# Color and style variables (cached tput calls for speed)
RESET=$(tput sgr0)
BOLD=$(tput bold)
BG_GRAY=$(tput setab 8)
FG_RED=$(tput setaf 1)
FG_MAGENTA=$(tput setaf 5)
FG_GREEN=$(tput setaf 2)
FG_CYAN=$(tput setaf 6)

# Multi-line prompt
PS1="\n${BOLD}${BG_GRAY}${FG_RED}\\u${FG_MAGENTA}@${FG_RED}\`hostname\`${FG_GREEN} : \`uname\` : ${FG_CYAN}\\d \\t : \${PLANTID:+\$PLANTID }\n${FG_CYAN}[\\w]${RESET}${BOLD} \\\$ ${RESET}"
export PS1
EOF
```


### <span class="st">Database Install and Configuration</span>

### Configure MariaDB

<p class="callout info">Optional: To add the MariadB repo to get the latest revision other then the one that is included in the RedHat</p>

Install the new Repo for MariaDB

```bash
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
```

This is the location of

```bash
vi /etc/yum.repos.d/MariaDB.repo
```

You have to change the yellow below to get the desired version

<table border="1" id="bkmrk-%5Bmariadb%5Dname-%3D-mari" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 99.881%;"></col></colgroup><tbody><tr><td>\[mariadb\]  
name = MariaDB  
baseurl = https://rpm.mariadb.org/<span style="color: rgb(241, 196, 15);">10.6</span>/rhel/$releasever/$basearch  
gpgkey= https://rpm.mariadb.org/RPM-GPG-KEY-MariaDB  
gpgcheck=1</td></tr></tbody></table>

<p class="callout info">Done with Optional</p>

Run the following

```shell
systemctl edit mariadb.service
```

Then add the following to the file in between these lines

```shell
### Editing /etc/systemd/system/mariadb.service.d/override.conf
### Anything between here and the comment below will become the new contents of the file

[Service]
LimitNOFILE=32768

### Lines below this comment will be discarded
```

Run the following

```shell
vi /etc/my.cnf.d/client.cnf
```

Add the following below the **\[client\]** section

```shell
socket=/var/lib/mysql/mysql.sock
```

Run the following

```shell
vi /etc/my.cnf.d/mariadb-server.cnf
```

<p class="callout info">If you used the optional above use the following link</p>

```bash
vi /etc/my.cnf.d/server.cnf
```

<p class="callout info">Done with Optional</p>

Add the following below the **\[mysqld\]** section and you will have to use the **:set paste** command or it will not paste correctly

```shell
#Custom
performance_schema = ON
tmpdir = /run/mariadb
thread_cache_size = 4
table_open_cache = 16384
table_definition_cache = 8384
sql_mode = ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

query_cache_type = 0
query_cache_size = 0
query_cache_limit = 128M
query_cache_strip_comments = 1

tmp_table_size = 512M
max_heap_table_size = 512M

max_connections = 512
max_allowed_packet = 24M
sort_buffer_size = 24M
join_buffer_size = 48M

innodb_buffer_pool_size = 4G
innodb_buffer_pool_instances = 4
innodb_use_native_aio = 1
innodb_flush_log_at_trx_commit = 0
innodb_file_per_table
innodb_log_file_size = 512M

#Optional configuration for transaction loggin
log_bin = /var/log/mariadb/mariadb.log
expire_logs_days = 2
```

Reload the changes

```shell
systemctl daemon-reload
```

Enable and start MySQL/MariaDB on boot

```shell
systemctl enable --now mariadb.service
echo > /etc/logrotate.d/mariadb
```

Run the following

```shell
mysql
```

Then execute the following statements also make sure to<span style="mso-spacerun: yes;"> </span>(**<u>change passwords as needed XXXXXXXXXX but NOT the users names</u>**)

```shell
CREATE USER 'kiwisql'@'%' IDENTIFIED BY '800486kiwi';
GRANT all ON *.* TO 'kiwisql'@'%' WITH GRANT OPTION;
CREATE USER 'kiwisql'@'localhost' IDENTIFIED BY '800486kiwi';
GRANT all ON *.* TO 'kiwisql'@'localhost' WITH GRANT OPTION;
CREATE USER 'kiwilive'@'localhost' IDENTIFIED BY '5541500kiwi';
GRANT all ON *.* TO 'kiwilive'@'localhost';
CREATE USER 'remuser'@'localhost' IDENTIFIED BY '5541500kiwi';
GRANT all ON *.* TO 'remuser'@'localhost' WITH GRANT OPTION;
CREATE USER 'reports'@'%' IDENTIFIED BY 'readonly';
GRANT SHOW DATABASES, SELECT, EXECUTE, PROCESS, SHOW VIEW  ON *.* TO 'reports'@'%';
FLUSH PRIVILEGES;
Quit
```


### Build skeleton for the Kiwiplan Environment

### Command to Run

Setup the user environment

Remember to change the **remuser** &amp; **esp** password

ESP username password is the global password store in ESP to let it connect and is *<span style="text-decoration: underline;">unfortunately </span>*visible to an admin user but please make sure to (**<u>change passwords as needed XXXXXXXXXX but NOT the users names</u>**)

```
groupadd kiwiplan
mkdir /opt/kiwi
ln -s /opt/kiwi/ /KIWI
mkdir /opt/kiwi/{home,rev}
mkdir /opt/kiwi/rev/{map,mes}
useradd -g kiwiplan -G wheel -d /KIWI/home/remuser/ remuser
echo NewDssP@$$RemRhel193 | passwd --stdin remuser
useradd -g kiwiplan -d /KIWI/home/esp/ esp
echo esp2map | passwd --stdin esp
chown -R remuser:kiwiplan /opt/kiwi
mkdir /etc/kiwiplan
chown remuser:kiwiplan /etc/kiwiplan
```


### <span class="st"><span lang="FR-CA" style="mso-ansi-language: FR-CA; mso-bidi-font-weight: bold;">Systemd Socket Implementation For KIDD</span></span>

### <span lang="FR-CA" style="mso-ansi-language: FR-CA;">Configure kidd.stocket</span>

Remember your **:set paste** command

Create a socket file and the following

```shell
vi /lib/systemd/system/kidd.socket
```

Then add the following

```shell
[Unit]
Description=KIDD
[Socket]
ListenStream=2326
Accept=yes

[Install]
WantedBy=sockets.target
```

Create a service file by editing the following

```shell
vi /lib/systemd/system/kidd@.service
```

Then add the following

```shell
[Unit]
Description=Kidd Server
[Service]
ExecStart=/KIWI/rev/current/progs/kidd -a -p -F 1
User=root
Group=root
StandardInput=socket
StandardOutput=socket

# Resource configuration
LimitNOFILE=8192
LimitNPROC=4096

# MaxConnections=nnn - The maximum number of connections to simultaneously run services instances for
#  when Accept=true is set. nnn should be sized accordingly for the implementation.
MaxConnections=200

# The maximum number of connections for a service per source IP address. 
# This is very similar to the MaxConnections= directive above. Disabled by default.
MaxConnectionsPerSource=80
```

Start the service and enable on reboot

```shell
systemctl start kidd.socket
systemctl enable kidd.socket
```

This will only work once you have the Kiwiplan environment configured/installed

### <span class="st"><span style="mso-bidi-font-weight: bold;">VUE Installation Configurations</span></span>

### <span class="st"><span style="mso-bidi-font-weight: bold;">Adjust system limits for VUE products</span></span>

<span class="st">Edit the following</span>

```shell
vi /etc/security/limits.d/20-nproc.conf
```

<span class="st">Add the following </span>

```shell
@kiwiplan soft nproc 32768
```

<span class="st">Edit the following </span>

```shell
vi /etc/security/limits.conf
```

<span class="st">Then add the following before the **\#End of file**</span>

```shell
@kiwiplan - nofile 32768
```


### Installing MsSQL Tool

#### Configure MsSQL tools

Install the repo for the MsSQL service/connection

```shell
curl https://packages.microsoft.com/config/rhel/9/prod.repo > /etc/yum.repos.d/msprod.repo
```

This will only work once you have the Kiwiplan environment configured/installed

Install the packages make sure you answer/type **YES** to all

```shell
dnf remove mssql-tools unixODBC-utf16-devel
dnf install mssql-tools unixODBC-devel -y
```

### <span class="st"><span style="mso-bidi-font-weight: bold;">Activate Directory Setup</span></span>

#### <span class="st">Using SSSD</span>

Install the following packages

```shell
yum install sssd sssd-tools realmd samba-common-tools oddjob oddjob-mkhomedir adcli samba -y
```

Run this just in-case your domain is still using RC4

```shell
update-crypto-policies --set DEFAULT:AD-SUPPORT
```

#### Configure KRB5

<span style="mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;">Edit the following file and make sure the following is added/changed</span>

```shell
vi /etc/krb5.conf
```

Add or changed the following below

<table border="1" id="bkmrk-%23-to-opt-out-of-the-" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 99.881%;"></col></colgroup><tbody><tr><td>\# To opt out of the system crypto-policies configuration of krb5, remove the  
\# symlink at /etc/krb5.conf.d/crypto-policies which will not be recreated.  
includedir /etc/krb5.conf.d/

\[logging\]  
 default = FILE:/var/log/krb5libs.log  
 kdc = FILE:/var/log/krb5kdc.log  
 admin\_server = FILE:/var/log/kadmind.log

\[libdefaults\]  
 dns\_lookup\_realm = <span data-darkreader-inline-color="" style="color: rgb(241, 196, 15);">true</span>  
 ticket\_lifetime = 24h  
 renew\_lifetime = 7d  
 forwardable = true  
 rdns = <span data-darkreader-inline-color="" style="color: rgb(241, 196, 15);">true</span>  
 pkinit\_anchors = FILE:/etc/pki/tls/certs/ca-bundle.crt  
 spake\_preauth\_groups = edwards25519

<span data-darkreader-inline-color="" style="color: rgb(241, 196, 15);"> dns\_canonicalize\_hostname = fallback</span>

<span data-darkreader-inline-color="" style="color: rgb(241, 196, 15);"> qualify\_shortname = ""</span>

 default\_realm =<span style="color: rgb(241, 196, 15);"> <span data-darkreader-inline-color="">ONLING.COM</span></span>  
 default\_ccache\_name = KEYRING:persistent:%{uid}  
 <span data-darkreader-inline-color="" style="color: rgb(241, 196, 15);">udp\_preference\_limit = 0</span>

\[realms\]  
 <span style="color: rgb(241, 196, 15);">ONLING.COM</span> = {  
 kdc = <span style="color: rgb(241, 196, 15);"><span data-darkreader-inline-color="">domain\_controller.</span><span data-darkreader-inline-color="">onling.com</span></span>  
 admin\_server = <span style="color: rgb(241, 196, 15);"><span data-darkreader-inline-color="">domain\_controller.</span><span data-darkreader-inline-color="">onling.com</span></span>  
 }

\[domain\_realm\]  
<span data-darkreader-inline-color="" style="color: rgb(241, 196, 15);"> .onling.com = ONLING.COM</span>  
<span data-darkreader-inline-color="" style="color: rgb(241, 196, 15);"> onling.com = ONLING.COM</span>

</td></tr></tbody></table>

#### Join the server to the domain

<span style="mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;">Configurating the SSSD (in <span style="color: rgb(241, 196, 15);">yellow </span>update to site specific) (in <span style="color: rgb(45, 194, 107);">green </span>needs to be capitalized)</span>

<span style="mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;">You must have the access to add to the AD server or the server has to be add first before you run the following command.</span>

<p class="callout warning"><span style="mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;">For the join you may need to specify the -OU's for the specific location</span></p>

<table border="1" id="bkmrk-realm-discover-onlin" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 99.881%;"></col></colgroup><tbody><tr><td><span lang="FR-CA">\# realm discover <span data-darkreader-inline-color="" style="color: rgb(241, 196, 15);">onling.com</span></span>

\# realm join -U [<span data-darkreader-inline-color="" style="color: rgb(241, 196, 15);">administrator</span><span style="color: rgb(45, 194, 107);">@</span><span data-darkreader-inline-color="" style="color: rgb(45, 194, 107);">ONLING.COM</span>](mailto:administrator@ONLING.COM)<span style="color: rgb(45, 194, 107);"> </span>--verbose <span data-darkreader-inline-color="" style="color: rgb(241, 196, 15);">domain\_controller.onling.com</span>

\# authselect select sssd with-mkhomedir

\# authselect apply-changes</td></tr></tbody></table>

Copy from below and make changes

```shell
realm discover onling.com
realm join -U administrator@ONLING.COM --verbose domain_controller.onling.com
authselect select sssd with-mkhomedir
authselect apply-changes
```


#### <span style="mso-fareast-font-family: 'Times New Roman';">Update SSSD config</span>

Once joined then you can change or add the following parameters

```shell
vi /etc/sssd/sssd.conf
```

<table border="1" id="bkmrk-%C2%A0-%5Bsssd%5D-domains-%3D-o" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 99.881%;"></col></colgroup><tbody><tr><td>\[sssd\]

domains = onling.com

config\_file\_version = 2

services = nss, pam

\[domain/onling.com\]

default\_shell = /bin/bash

ad\_server = sfl-dom-001.onling.com

krb5\_store\_password\_if\_offline = True

cache\_credentials = True

krb5\_realm = ONLING.COM

realmd\_tags = manages-system joined-with-adcli

id\_provider = ad

fallback\_homedir = <span data-darkreader-inline-color="" style="color: rgb(241, 196, 15);">/home/%d/%u</span>

ad\_domain = onling.com

use\_fully\_qualified\_names = <span data-darkreader-inline-color="" style="color: rgb(241, 196, 15);">false</span>

ldap\_id\_mapping = True

access\_provider = ad

<span data-darkreader-inline-color="" style="color: rgb(241, 196, 15);">override\_gid = 1000</span>  
<span data-darkreader-inline-color="" style="color: rgb(241, 196, 15);">ad\_gpo\_ignore\_unreadable = true</span>  
<span data-darkreader-inline-color="" style="color: rgb(241, 196, 15);">ad\_gpo\_access\_control = disabled</span>  
<span data-darkreader-inline-color="" style="color: rgb(241, 196, 15);">timeout = 300</span>

</td></tr></tbody></table>

Restarting SSSD

```shell
systemctl stop sssd; sss_cache -E; systemctl start sssd
```

### Optional SSSD configurations

#### <span style="mso-fareast-font-family: 'Times New Roman';">Defaults to no Shell Access, allows short usernames</span>

<span style="mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;">Optional (Group allow)</span><span style="mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"> additional parameters and changes</span>

<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" id="bkmrk-simple_allow_groups-" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt;"><tbody><tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes;"><td style="width: 561.1pt; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top" width="748"><span style="mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;">simple\_allow\_groups = sssd-users </span>

<span style="mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;">OR</span>

<span style="mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;">simple\_allow\_groups = <span style="mso-spacerun: yes;"> </span>gg-C3193???-KiwiTS\_access</span>

</td></tr></tbody></table>

#### Add users to SSSD

Optional grant shell access and force primary group to kiwiplan, change john.doe to the username

```shell
sss_override user-add john.doe -g $(getent group kiwiplan | cut -d: -f3) -s /bin/bash -h /KIWI/home/john.doe
```