secure_ubuntu_system:initial_configuration
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
secure_ubuntu_system:initial_configuration [2016/12/07 15:20] – [Synchronize the System Clock] peter | secure_ubuntu_system:initial_configuration [2020/07/15 09:30] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 22: | Line 22: | ||
Go ahead and type **yes**, and then enter the password of the administrator, | Go ahead and type **yes**, and then enter the password of the administrator, | ||
+ | ---- | ||
===== Get root privileges (Optional) ===== | ===== Get root privileges (Optional) ===== | ||
Line 58: | Line 59: | ||
</ | </ | ||
</ | </ | ||
+ | |||
+ | ---- | ||
===== Update APT Sources ===== | ===== Update APT Sources ===== | ||
Line 131: | Line 134: | ||
</ | </ | ||
+ | <WRAP info> | ||
**NOTE**: | **NOTE**: | ||
+ | </ | ||
+ | |||
Save the file, then issue the following command: | Save the file, then issue the following command: | ||
Line 162: | Line 168: | ||
* http:// | * http:// | ||
</ | </ | ||
+ | |||
+ | ---- | ||
===== Enable Automatic Security Updates (optional) ===== | ===== Enable Automatic Security Updates (optional) ===== | ||
Line 186: | Line 194: | ||
</ | </ | ||
+ | ---- | ||
==== Customize automatic updates ==== | ==== Customize automatic updates ==== | ||
Line 209: | Line 218: | ||
</ | </ | ||
+ | ---- | ||
==== Reference ==== | ==== Reference ==== | ||
Line 215: | Line 225: | ||
+ | ---- | ||
===== Upgrading Ubuntu Server to latest LTS version (optional) ===== | ===== Upgrading Ubuntu Server to latest LTS version (optional) ===== | ||
Line 228: | Line 239: | ||
This is a good option. | This is a good option. | ||
+ | ---- | ||
==== Install the Upgrade Manager ==== | ==== Install the Upgrade Manager ==== | ||
Line 235: | Line 247: | ||
</ | </ | ||
+ | ---- | ||
==== Double-check Configuration File ==== | ==== Double-check Configuration File ==== | ||
Line 256: | Line 269: | ||
</ | </ | ||
+ | ---- | ||
==== Run the Upgrade Manager ==== | ==== Run the Upgrade Manager ==== | ||
Line 285: | Line 299: | ||
+ | ---- | ||
===== Update VIM ===== | ===== Update VIM ===== | ||
Line 298: | Line 312: | ||
To update to the full vim package, install **vim-nox**. Of course, different text editor such as joe or nano can be installed as well. | To update to the full vim package, install **vim-nox**. Of course, different text editor such as joe or nano can be installed as well. | ||
+ | |||
+ | ---- | ||
Line 318: | Line 334: | ||
</ | </ | ||
+ | ---- | ||
==== Create and Enable the Swap File ==== | ==== Create and Enable the Swap File ==== | ||
Line 363: | Line 380: | ||
|count=512k|Copy only 524288 BLOCKS input blocks. | |count=512k|Copy only 524288 BLOCKS input blocks. | ||
+ | ---- | ||
==== Prepare the swap file by creating a Linux swap area ==== | ==== Prepare the swap file by creating a Linux swap area ==== | ||
Line 376: | Line 394: | ||
no label, UUID=265d3e61-6e2b-4126-baba-6e6185e97b46 | no label, UUID=265d3e61-6e2b-4126-baba-6e6185e97b46 | ||
</ | </ | ||
+ | |||
+ | ---- | ||
==== Activate the swap file ==== | ==== Activate the swap file ==== | ||
Line 427: | Line 447: | ||
|100|The kernel will swap aggressively.| | |100|The kernel will swap aggressively.| | ||
</ | </ | ||
+ | |||
+ | ---- | ||
==== Secure SWAP ==== | ==== Secure SWAP ==== | ||
Line 440: | Line 462: | ||
+ | ---- | ||
===== Change the Default Shell ===== | ===== Change the Default Shell ===== | ||
Line 457: | Line 479: | ||
+ | ---- | ||
===== Synchronize the System Clock ===== | ===== Synchronize the System Clock ===== | ||
Line 512: | Line 534: | ||
</ | </ | ||
- | Ubuntu offers two ways of updating the time, i.e. **ntpdate** and **ntpd**. | + | <WRAP important> |
+ | **ALERT**: | ||
+ | <WRAP caution> | ||
Note that for PCI-DSS compliance, we should not be running NTP as a service, unless this specific server is going to be used as a NTP server. | Note that for PCI-DSS compliance, we should not be running NTP as a service, unless this specific server is going to be used as a NTP server. | ||
+ | </ | ||
- | If we don’t want this to run as a service, we should only use ntpdate. | + | If we don't want this to run as a service, we should only use ntpdate. |
Issue the following commands in this case: | Issue the following commands in this case: | ||
Line 576: | Line 601: | ||
**ntpdate-debian** does not need a parameter and uses the time-servers recorded within the / | **ntpdate-debian** does not need a parameter and uses the time-servers recorded within the / | ||
+ | </ | ||
+ | ---- | ||
==== Update crontab times ==== | ==== Update crontab times ==== | ||
Line 618: | Line 644: | ||
This also helps with log rotation, in that new daily logs are started at the beginning of each day instead of at 6am. | This also helps with log rotation, in that new daily logs are started at the beginning of each day instead of at 6am. | ||
- | **NOTE**: | + | <WRAP info> |
+ | **NOTE**: | ||
+ | </ | ||
+ | |||
+ | ---- | ||
====== Add Global Aliases ====== | ====== Add Global Aliases ====== | ||
Line 627: | Line 657: | ||
Global Aliases would normally be added to the **/ | Global Aliases would normally be added to the **/ | ||
+ | <WRAP info> | ||
**NOTE**: | **NOTE**: | ||
+ | </ | ||
+ | |||
To see what aliases are currently defined use the **alias** command. | To see what aliases are currently defined use the **alias** command. | ||
Line 639: | Line 672: | ||
and add the following to the file: | and add the following to the file: | ||
+ | <file bash / | ||
# Instruct bash to expand the arguments to aliases. | # Instruct bash to expand the arguments to aliases. | ||
- | |||
- | <file bash / | ||
shopt -s expand_aliases | shopt -s expand_aliases | ||
Line 882: | Line 914: | ||
</ | </ | ||
+ | ---- | ||
===== Add Global Functions ===== | ===== Add Global Functions ===== | ||
Line 891: | Line 924: | ||
Global Functions would normally be added to the **/ | Global Functions would normally be added to the **/ | ||
+ | <WRAP info> | ||
**NOTE**: | **NOTE**: | ||
+ | </ | ||
+ | |||
Issue the following command: | Issue the following command: | ||
Line 1586: | Line 1622: | ||
+ | |||
+ | ---- | ||
===== Allow colour prompts for the administrator (highly recommended) ===== | ===== Allow colour prompts for the administrator (highly recommended) ===== | ||
Line 1603: | Line 1641: | ||
This functionality is not required, but does makes it a lot easier to see what’s going on, so recommended. | This functionality is not required, but does makes it a lot easier to see what’s going on, so recommended. | ||
+ | ---- | ||
===== Restart the System ===== | ===== Restart the System ===== | ||
Line 1614: | Line 1653: | ||
...and log back in using a SSH client, such as Putty. | ...and log back in using a SSH client, such as Putty. | ||
+ | ---- | ||
===== Login using a SSH Client ===== | ===== Login using a SSH Client ===== | ||
Line 1631: | Line 1671: | ||
Go ahead and type **yes**, and then enter the password of the administrator, | Go ahead and type **yes**, and then enter the password of the administrator, | ||
+ | ---- | ||
+ | ===== Continue ===== | ||
+ | Continue to [[Secure Ubuntu System:Base Security]] | ||
secure_ubuntu_system/initial_configuration.1481124024.txt.gz · Last modified: 2020/07/15 09:30 (external edit)