Search found 783 matches

by LHammonds
Fri May 01, 2020 6:45 am
Forum: Tutorials
Topic: How to Install and Configure an Ubuntu Server 20.04 LTS
Replies: 24
Views: 18240

Migrating Users from one server to another

Migrating users/groups from one server to another WARNING: These migration commands are thoroughly tested by me...just jotting down these research notes for future testing. Commands to run on old server Copy accounts to passwd.mig using awk to filter out system accounts (i.e. only copy user account...
by LHammonds
Fri May 01, 2020 6:44 am
Forum: Tutorials
Topic: How to Install and Configure an Ubuntu Server 20.04 LTS
Replies: 24
Views: 18240

Partition-Level Restores

Restore Partitions Using SystemRescueCD and FSArchiver Partitions cannot be mounted when restoring to them. If services can be stopped that use files on a specific partition, it can be unmounted and restored. However, the root partition can never be restored while the server is online so these inst...
by LHammonds
Fri May 01, 2020 6:43 am
Forum: Tutorials
Topic: How to Install and Configure an Ubuntu Server 20.04 LTS
Replies: 24
Views: 18240

Partition-Level Backups

Backup Partitions Using LVM Snapshots and FSArchiver This method will allow online backup of the server at the partition level. It is designed to run via crontab schedule but can also be run manually. This should be considered a full backup which means you will probably need to rely on other method...
by LHammonds
Fri May 01, 2020 6:41 am
Forum: Tutorials
Topic: How to Install and Configure an Ubuntu Server 20.04 LTS
Replies: 24
Views: 18240

File Sharing via Windows Shares

Configure Windows Server as a Remote Mount Point If you have a Windows 2008/2012 server that serves as your offsite backup repository, this section describes how to configure and mount the remote server for storage use. Part of the backup process involves copying the backup files to an offsite stor...
by LHammonds
Fri May 01, 2020 6:40 am
Forum: Tutorials
Topic: How to Install and Configure an Ubuntu Server 20.04 LTS
Replies: 24
Views: 18240

File Sharing via NFS (Linux to Linux)

NFS Mount (Sharing among Linux) If you want to share files between Linux servers, you can use NFS. Here is how you can do that. On the machine that will host the files to be shared: Install the required software: sudo apt install nfs-kernel-server Configure a folder to be shared: sudo touch /etc/ex...
by LHammonds
Fri May 01, 2020 6:39 am
Forum: Tutorials
Topic: How to Install and Configure an Ubuntu Server 20.04 LTS
Replies: 24
Views: 18240

File Sharing via Samba

Configure Ubuntu for File Sharing This file sharing section is optional but can be handy if you need to swap files between the Linux server and a Windows machine. This documentation will utilize this share for passing pre-configured files (configs, scripts, etc.) to make it faster/easier during ins...
by LHammonds
Fri May 01, 2020 6:39 am
Forum: Tutorials
Topic: How to Install and Configure an Ubuntu Server 20.04 LTS
Replies: 24
Views: 18240

Security - Messages

SUDO Warning Message Enable the default warning message whenever "sudo" is used. Edit sudoers file by typing: sudo EDITOR=vim visudo Add the following line near the other defaults (instead of "always" you can use "once" too): Defaults lecture=always To make sure the syntax of the edited file is not...
by LHammonds
Fri May 01, 2020 6:38 am
Forum: Tutorials
Topic: How to Install and Configure an Ubuntu Server 20.04 LTS
Replies: 24
Views: 18240

Security - SSH Public and Private Keys

SSH Public and Private Keys If you have more than one Ubuntu server, you probably will want to setup a trusted SSH authentication between the two servers so you can securely and automatically transfer files between them with commands such as scp or sftp. NOTE: You probably have the root account loc...
by LHammonds
Fri May 01, 2020 6:37 am
Forum: Tutorials
Topic: How to Install and Configure an Ubuntu Server 20.04 LTS
Replies: 24
Views: 18240

Security - Fail2Ban

Fail2Ban Fail2Ban is an intrusion prevention system that can be used to protect servers from different kinds of attacks. Fail2ban scans log files for various services, such as SSH, FTP, SMTP, Apache and block the IP address that makes too many password failures. Install Fail2Ban sudo apt install fa...
by LHammonds
Fri May 01, 2020 6:36 am
Forum: Tutorials
Topic: How to Install and Configure an Ubuntu Server 20.04 LTS
Replies: 24
Views: 18240

Security - Firewall

Firewall Linux uses IPTables as its firewall but learning the ins and outs of the syntax can be daunting. Luckily for us, Ubuntu has a front-end for it called Uncomplicated Firewall (UFW for short). If you are not using IPv6 (most networks are still just using IPv4), you can comment out the IPv6 se...
by LHammonds
Fri May 01, 2020 6:35 am
Forum: Tutorials
Topic: How to Install and Configure an Ubuntu Server 20.04 LTS
Replies: 24
Views: 18240

Scripts - Operator Menu

Operator Menu To make my servers easier to administer within my group (who are not all *NIX guys), I made an operator script that can be used to manipulate the server. The main features I wanted to make easier for other members of the IT group are: 1. Update the operating system (manually) 2. Disk ...
by LHammonds
Fri May 01, 2020 6:34 am
Forum: Tutorials
Topic: How to Install and Configure an Ubuntu Server 20.04 LTS
Replies: 24
Views: 18240

Scripts - Check Storage

Check Storage Space In favor of managing by exception, this script that can be scheduled to run daily to check the file systems to see if they are getting close to filling up and will automatically expand them a little bit and give you an email notice. Everything is done at the megabyte level. If y...
by LHammonds
Fri May 01, 2020 6:29 am
Forum: Tutorials
Topic: How to Install and Configure an Ubuntu Server 20.04 LTS
Replies: 24
Views: 18240

Scripts - APT Upgrade

APT Upgrade This script that can be scheduled to run daily to check for OS/software updates in the repositories and then install them if available. NOTE: This script will assume the answer is yes to any question the package manager asks with exception to modified configuration files. If you modify ...
by LHammonds
Wed Apr 22, 2020 8:55 am
Forum: Miscellaneous
Topic: COVID-19 Pandemic Log of events
Replies: 0
Views: 4200

COVID-19 Pandemic Log of events

EDIT: I no longer check these numbers because they are artificially inflated to aid in fear-mongering. Johns Hopkins University 2019-12-31 Wuhan China reports dozens of cases of pneumonia which is later classified as novel coronavirus. 2020-01-21 First case in Washington, USA confirmed positive for...
by LHammonds
Wed Apr 22, 2020 8:17 am
Forum: Tutorials
Topic: How to move vmdk in ESXi/VMware
Replies: 2
Views: 2969

pacs-move.sh

Create the script file/location: mkdir /var/scripts touch /var/scripts/pacs-move.sh chmod 755 /var/scripts/pacs-move.sh Copy and paste the contents of the script below into /var/scripts/pacs-move.sh NOTE: The SourceName and TargetName are the names of the VMs which are also the names of the folders ...
by LHammonds
Wed Apr 22, 2020 7:58 am
Forum: Tutorials
Topic: How to move vmdk in ESXi/VMware
Replies: 2
Views: 2969

Procedure

Here are the steps I came up with to follow once the migration was to start. Here are the example data referenced in these steps and code: Source server: OLD-PACS Target server: NEW-PACS Drive being moved - E: Disable local backup job(s) for OLD-PACS. Make sure E: does not exist on target server. Ma...
by LHammonds
Wed Apr 22, 2020 7:45 am
Forum: Tutorials
Topic: How to move vmdk in ESXi/VMware
Replies: 2
Views: 2969

How to move vmdk in ESXi/VMware

A project came up where I needed to detach a 10 terrabyte drive from a Windows 2008 server and attach it to a Windows 2012 server in VMware. I came up with a solution, tested it and documented it here in case I need to do this again in the future. It is important to know the difference between a "co...
by LHammonds
Thu Apr 09, 2020 5:37 pm
Forum: Tutorials
Topic: How to Install and Configure an Ubuntu Server 20.04 LTS
Replies: 24
Views: 18240

Operator Scripts

Operator Scripts I like scripts to be as generic as possible when copying among multiple servers. I push the service start/stop specifics into their own scripts which can be unique to each server depending on what services need to be stopped/started. On a MySQL/MariaDB server, the scripts that star...
by LHammonds
Thu Apr 09, 2020 5:35 pm
Forum: Tutorials
Topic: How to Install and Configure an Ubuntu Server 20.04 LTS
Replies: 24
Views: 18240

Installing Ubuntu Server - Scheduling

Crontab Schedule The crontab schedule can be edited directly by typing "crontab -e" but that can be a bit dangerous. It would be safer to edit a file and then load that file into the schedule. This will allow backups of the schedule to be made. If there is ever a problem with the schedule, it can b...
by LHammonds
Thu Apr 09, 2020 5:33 pm
Forum: Tutorials
Topic: How to Install and Configure an Ubuntu Server 20.04 LTS
Replies: 24
Views: 18240

Scripting

Scripting Many of the sections below utilize BASH scripts as part of the solution/automation. To speed up installation for myself and others, the commands below will download and extract the base set of scripts I use as a foundation for all my servers. You can download all of them at once or skip t...