SOP: SODE Ubuntu Server Setup
Ubuntu Server Setup SOP
Note: General Nutanix and Active Directory skills are assumed and not spelled out step by step.
- Create a VM from template UBUNTU_Template_24_04_2 or newer
- Power on VM and access via local administrator profile
-
Update Apps
- sudo apt update
- sudo apt upgrade
-
Change name to FQDN
- $ sudo hostnamectl set-hostname ubuntudesk1.corp.globomantics.local
- $ hostnamectl
-
Update hosts name
- Sudo nano /etc/hosts
- Make sure one loopback line is correct
- sudo systemctl restart systemd-resolved
-
To change IP address and DNS
- Sudo nano /etc/netplan/….yaml - to modify IP settings
- (Probably 50-cloud-init.yaml)
- sudo netplan apply
- sudo grep -l -R "x.x.x.x old IP address" /etc/*
- Often shows;
- /etc/cloud/cloud.cfg.d/90-installer-network.cfg
- /etc/netplan/50-cloud-init.yaml
- sudo nano to any .cfg files found in prior step
-
Configure DNS
- Sudo nano /etc/systemd/resolved.conf
- DNS=x.x.x.x
- FallbackDNS=x.x.x.x
- sudo reboot
-
Join Ubuntu server to AD
-
Discover Domain and add server
- Create /etc/krb5.conf and add following;
[libdefaults]
rdns =false
- sudo realm discover factory.oatly.local
- sudo realm join -v -U admteolT1 FACTORY.OATLY.LOCAL –computer-ou=’OU=Linux,DC=FACTORY,DC=OATLY,DC=LOCAL’
- (Note: two dashes in front of “computer-ou”)
- realm list
-
Add site ad_site to sudo nano /etc/sssd/sssd.conf
- Example:
- [domain/yourdomain.local]
- ad_site = Your-AD-Site-Name
[domain/factory.oatly.local]
default_shell = /bin/bash
krb5_store_password_if_offline = True
cache_credentials = True
krb5_realm = FACTORY.OATLY.LOCAL
realmd_tags = manages-system joined-with-adcli
id_provider = ad
fallback_homedir = /home/%u@%d
ad_domain = factory.oatly.local
use_fully_qualified_names = True
ldap_id_mapping = True
access_provider = ad
ad_site = OATNLPRD
ad_gpo_ignore_unreadable = True
- sudo systemctl restart sssd
- service systemd-resolved restart
- Resolvectl status
- sudo systemctl status sssd
-
Setup Homepage
- sudo pam-auth-update --enable mkhomedir
-
Enable Admins
- sudo visudo -f /etc/sudoers.d/DomainAdmins
{blank line}
%Domain\ Legacy\ Computer\ Admins@FACTORY.OATLY.LOCAL ALL=(ALL:ALL) ALL
NOTE: spaces after backslashes
- sudo reboot
- Go into Active Directory and move server to proper OU