on server a:
sudo apt-get install apt-clone
apt-clone clone foo
copy foo.tar.gz to server b
on server b:
sudo apt-get install apt-clone
sudo apt-clone restore foo.apt-clone.tar.gz
some Unix notes
on server a:
sudo apt-get install apt-clone
apt-clone clone foo
copy foo.tar.gz to server b
on server b:
sudo apt-get install apt-clone
sudo apt-clone restore foo.apt-clone.tar.gz
change /usr/share/plymouth/themes/elementary/logo.png and logo_blurred.png
a proper size is like this:
root@Vaio-VGN-UX490N:/usr/share/plymouth/themes/elementary# identify logo.png.orig
logo.png.orig PNG 536×536 536×536+0+0 8-bit sRGB 47.4KB 0.000u 0:00.000
then run: update-initramfs -u
du -sk .[^.]* | sort -n
# vi /etc/default/grub
Then add the kernel boot parameter: video=SVIDEO-1:d, so it will look like this: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=SVIDEO-1:d"
update-grubrebootAlso, to get rid of
Failed to Set MokListRT: Invalid Parameter
sudo su -
cd /boot/efi/EFI/ubuntu
cp grubx64.efi shimx64.efi
reboot
To install wifi drivers simply
sudo ubuntu-drivers autoinstall
To silence the fan
apt-get install macfanctld
edit /etc/macfanctl.conf
and make sure that you replace these lines:
temp_avg_floor: 55 #45 temp_avg_ceiling: 65 #55 temp_TC0P_floor: 55 #50 temp_TC0P_ceiling: 65 #58 temp_TG0P_floor: 55 #50 temp_TG0P_ceiling: 65 #58
Once you have edited you only have to restart macfanctl daemon just like:
service macfanctld restart
First, refresh all security info
subscription-manager refresh
yum clean all
yum repolist
yum updateinfo summary
yum updateinfo list security
yum updateinfo list available
yum updateinfo list bugzillas
yum updateinfo list security all
yum updateinfo list sec
Then you can apply only security updates
yum --security update
If you have the CVEs in a file
yum -y update `cat cves |while read c;do echo " --cve $c ";done|xargs`
reference: https://access.redhat.com/solutions/10021
yum group list hidden ids
yum group mark-install "large-systems"
yum group mark-convert "large-systems"
yum groupinstall "large-systems"
# git clone https://github.com/LionSec/katoolin.git
# cp katoolin/katoolin.py /usr/bin/katoolin
# chmod +x /usr/bin/katoolin
# kaoolin
The control panel doesn’t really disable the auto-sleep
# systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
To reenable
# systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target
Restarting-Linux-Services-With-NRPE
https://assets.nagios.com/downloads/nagiosxi/docs/Restarting-Linux-Services-With-NRPE.pdf
At each monitored server
————————
Add this line to /usr/local/nagios/etc/nrpe.cfg :
command[service_restart]=sudo service $ARG1$ restart 2>&1
And give nagios permissions to execute service
echo “nagios ALL = NOPASSWD: `which service`” > /etc/sudoers.d/nagios
At the Nagios XI server
———————–
– Test with
/usr/local/nagios/libexec/check_nrpe -H 10.25.13.34 -c service_restart -a apache2
– add these contents to /usr/local/nagios/libexec/service_restart.bash
#!/bin/bash
case “$1” in
OK)
;;
WARNING)
;;
UNKNOWN)
;;
CRITICAL)
/usr/local/nagios/libexec/check_nrpe -H “$2” -c service_restart -a “$3”
;;
esac
exit 0
– set permissions
chown apache:nagios /usr/local/nagios/libexec/service_restart.bash
chmod 775 /usr/local/nagios/libexec/service_restart.bash
-test
/usr/local/nagios/libexec/service_restart.sh CRITICAL 10.25.13.34 apache2
– Create a “command” in the core config mannager with this command line:
$USER1$/service_restart.sh $SERVICESTATE$ $HOSTADDRESS$ $_SERVICESERVICE$
Also select “misc_command” from command type
– Update a service adding the event handler
– in the misc settings add a “free variable”
_SERVICE apache2
Read:
https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/3/en/eventhandlers.html#example
http://www.techadre.com/content/nagios-event-handler-restart-remote-service
https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/3/en/objecttricks.html
for ElementaryOS
# apt install xinetd libssl-dev build-essential
# cd /tmp; wget https://assets.nagios.com/downloads/nagiosxi/agents/linux-nrpe-agent.tar.gz
# tar zxvf linux-nrpe-agent.tar.gz
# cd linux-nrpe-agent
# vi fullinstall
(after the 4th line insert a line distro=Ubuntu)
# ./fullinstall