Bulk change PHP memory_limit across all installed PHP versions

On my server, I have PHP 5.6 to 8.1 installed and use the versions for various testing purposes. To change the memory_limit across all versions as simply as possible instead of editing each file, I use the following command. find /etc/php -iname 'php.ini' -exec sed -i 's/memory_limit = .*/memory_limit = 512M/g' {} \; Continue reading →

ISPConfig3 – DNSSEC ERROR: We are low on entropy.

It seems that ISPConfig3 checks for entropy availability to be below 200 and also 400 per the following file, /usr/local/ispconfig/server/bind_plugin.inc.php. Line 93 and line 210 check for entropy availability. Line 93, inside function soa_dnssec_create(): if (file_get_contents('/proc/sys/kernel/random/entropy_avail') < 400) { $app->log('DNSSEC ERROR: We are low on entropy. Not generating new Keys for '.$domain.'. Please consider installing package haveged.', LOGLEVEL_WARN); echo Continue reading →

#ispconfig

sed replace braces with brackets keeping content inside

Took me a minute to figure this out but it works. Given the following string, I want to replace { and } with [ and ] keeping each number inside and only with a number inside the braces without space and without letters. data.txt: {1}: Today is tomorrow's yesterday. {2}: This year is next year's yesteryear. {3}: Foo {10}: Bar {100}: Baz {91919}: Qux {99119a9}: 42 sed -e 's/{\([0-9]\+\)}/[\1]/ data.txt rjk@debian:~$ sed -e 's/{\([0-9]\+\)}/[\1]/' data.txt [1]: Today is tomorrow's yesterday. [2]: Continue reading →

How to remove a systemd service

I'm not sure why systemd doesn't remove the service, but to do so you can run through the following commands. Also check /etc/init.d/[servicename] as there may be a wrapper there as well. If you know what service you're looking to remove, great. If not, you can quickly find all the systemd services enabled on your system with the following command: systemctl list-unit-files | grep enabled You can inspect the service and find any unit information for it using the following: systemctl Continue reading →

Cacti Server

Input Validation Whitelist Protection Cacti Data Input methods that call a script can be exploited in ways that a non-administrator can perform damage to either files owned by the poller account, and in cases where someone runs the Cacti poller as root, can compromise the operating system allowing attackers to exploit your infrastructure. Therefore, several versions ago, Cacti was enhanced to provide Whitelist capabilities on the these types of Data Input Methods. Though this does secure Cacti Continue reading →

#cacti