Born2beRoot
This School 21 project is about System Administration (Linux), managing Virtual machines, etc.
# Different things to know
# Links
# Notes
Maybe config file for everything? Also, it’s more convenient to work with the server through SSH than from VirtualBox.
To use netstat
, install net-tools
.
# Step-by-step thingies I’ve done
- SSH
- Commented
AcceptEnv LANG LC_
in/etc/ssh/sshd_config
because of this - Installed
sudo
,ufw
, apparmor profiles - Configured UFW
- Configured AppArmor (enforced
/etc/apparmor.d/*
) - Configured
sudo
sudo crontab -e
, addedmonitoring.sh
to execute every 10 minutes- Installed
libpam-pwquality
,libpam-cracklib
, added rules for passwords in/etc/pam.d/common-password
- Edited
/etc/login.defs
(works only for NEW users):
|
|
# To-do
- Disable SSH as root (remove
PermitRootLogin yes
from/etc/ssh/sshd_config
) - I think I should disable DHCP
- Set up correct sudo policy
# Things to know
# To learn
awk
magic- What is a mount point?
- Seems to be just a root folder for a partition
- Difference between a disk partition and a volume
- Sometimes they’re used interchangeably, but a partition is a disk thingie that is written in
GUID
partition table (for example), and a volume can be logical, e.g. occupy multiple partitions and other stuff. See on Wikipedia.
- Sometimes they’re used interchangeably, but a partition is a disk thingie that is written in
# Useful commands
du -h /somestorage
to show disk spacelsblk (-o name,size,fstype)
to show deviceshostnamectl
- info about hostnamehostnamectl set-hostname newhostname
- change hostname. Located at/etc/hostname
. Don’t forget to change/etc/hosts
or restart the machine.hostname newhostname
- changes hostname, but only for this boot session.