Review root access#
Clean root user directory#
./run.py '*' cmd.run 'ls'
These are created when a developer runs
wgetcommands to e.g. test proxy settings.
Check drive usage#
ncdu is installed, change to the root directory, and run the
Find saved messages across servers:
./run.py '*' cmd.run 'find /root /home/* -maxdepth 0 -name mbox'
Find mailboxes with mail across servers:
./run.py '*' cmd.run 'find /var/mail -type f -not -size 0'
Connect to a server, for example:
curl --silent --connect-timeout 1 process.kingfisher.open-contracting.org:8255 || true ssh email@example.com
Open the mailbox:
mail -f /var/mail/root
You might see a lot of repeat messages.
Here are common commands:
number: open that message
h: show a screen of messages
z: go to the next screen
d 5-10: delete the messages 5 through 10
d *: delete all messages
q: save changes and exit
x: exit without saving changes
In most cases, all messages can be ignored and deleted. Relevant messages might include:
- Failed cron jobs
Try to correct the failure
- Failed attempts to use sudo
If the attempt is not attributable to a team member, discuss security measures
To show the packages that were automatically installed and are no longer required:
./run.py 'docs' pkg.autoremove list_only=True
It is generally safe to remove these. Run:
./run.py 'docs' pkg.autoremove purge=True
You can omit
purge=True to make it easier to restore a package.
To show the packages that were removed but not purged, run:
./run.py '*' pkg.list_pkgs removed=True
To determine the current releases, run:
./run.py '*' cmd.run 'lsb_release -a'
To check the long term support of the releases, consult the Ubuntu documentation.