Posted by jpluimers on 2016/10/27
Sometimes you forget one crucial step…
When adding Apache vhosts on OpenSuSE and each vhost has it’s own set of log-files, then they will not be logrotated by default.
So you have to edit the configuration.
I’ve done it by copying the default apache2 logrotate configuration file for each vhost like this:
/etc/logrotate.d # cp apache2 apache2.vhost.##hostname##
Here ##hostname## is the name of the vhost.
Then I edited each file and replaced the generic log file names with the specific ones for each vhost.
There are only a few vhosts on my system so the manual job wasn’t so bad, but with a great number of vhosts you’d probably want to make this a template process beyond this:
# $1 is the vhost name
cat /etc/logrotate.d/apache2 | sed -r "s#/var/log/apache2/#/var/log/apache2/$1-#g" > /etc/logrotate.d/apache2.vhost.$1
git add /etc/logrotate.d/apache2.vhost.$1
This will then show in
logrotate (which will output both to
stdout, hence the
2>&1 redirect) would do on the next invocation:
logrotate -d /etc/logrotate.conf 2>&1 | less
Posted in *nix, *nix-tools, Apache2, Development, Linux, logrotate, openSuSE, Power User, Scripting, Software Development, SuSE Linux, Tumbleweed | Leave a Comment »
Posted by jpluimers on 2016/10/26
TL;DR: OpenSuSE Tumbleweed – after installing from ISO, be sure to disable/remove the ISO repo.
A while ago I had a weird thing on my OpenSuSE Tumbleweed system while upgrading (yes,
zypper dist-upgrade is the recommended way to update Tumbleweed): it would complain in this way
zypper dup indicates
python3-urllib3-1.16-1.1.noarch requires python(abi) = 3.5:
# zypper dup
Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command.
Loading repository data...
Reading installed packages...
Computing distribution upgrade...
Problem: python3-urllib3-1.16-1.1.noarch requires python(abi) = 3.5, but this requirement cannot be provided
Solution 1: Following actions will be done:
deinstallation of python3-urllib3-1.15.1-2.1.noarch
deinstallation of python3-wheel-0.29.0-2.1.noarch
deinstallation of speedtest-cli-0.3.2-4.3.noarch
deinstallation of python3-six-1.10.0-4.1.noarch
deinstallation of python3-pycparser-2.14-2.1.noarch
deinstallation of python3-pyasn1-0.1.9-2.1.noarch
deinstallation of python3-pyOpenSSL-16.0.0-3.1.noarch
deinstallation of python3-idna-2.1-1.1.noarch
deinstallation of python3-chardet-2.3.0-1.4.noarch
Solution 2: keep obsolete python-cupshelpers-1.5.7-7.2.noarch
Solution 3: break python3-urllib3-1.16-1.1.noarch by ignoring some of its dependencies
Choose from above solutions by number or cancel [1/2/3/c] (c):
What eventually – with help from the excellent help by DimStar on the #openSUSE-factory IRC channel – led to the solution was the part
Solution 2: keep obsolete python-cupshelpers-1.5.7-7.2.noarch.
But first let’s look at the installed versions and repos:
Read the rest of this entry »
Posted in *nix, Development, Linux, openSuSE, Power User, Scripting, Software Development, SuSE Linux, Tumbleweed | Leave a Comment »
Posted by jpluimers on 2016/10/25
I’m using Linux (centos) machine, I already connected to the other system using ssh. Now my question is how can I copy files from one system to another system?
Source: How to copy files from one machine to another using ssh – Unix & Linux Stack Exchange
Nice question, uh? In my opinion the best answer is “Use
scp to avoid going through hoops with complex configurations to re-use your existing ssh connection” like this:
To copy a file from
A while logged into
scp /path/to/file username@a:/path/to/destination
To copy a file from
A while logged into
scp username@b:/path/to/file /path/to/destination
Source: DopeGhoti answering How to copy files from one machine to another using ssh – Unix & Linux Stack Exchange
Instead the question is marked duplicate of SSH easily copy file to local system – Unix & Linux Stack Exchange where (contrary to the ‘easily’ part of the question) go through hoops and loops with all kinds of fancy ssh settings and port forwards.
Posted in Software Development, Development, Power User, *nix, Scripting, Communications Development, Internet protocol suite, TCP, bash, *nix-tools, SSH | Leave a Comment »
Posted by jpluimers on 2016/10/21
There is a nasty (Dirty COW: CVE-2016-5195) Linux kernel bug with zero-day exploits floating around
OpenSuSE updates will be available soon (likely this weekend); from the #openSUSE-factory IRC channel :
wiert: any E.T.A. for CVE-2016-5195 in the various releases?
_Marcus_: 13.1 and 42.1 i just released. 13.2 submission i am still awaiting, so release likely tomorrow
wiert: How about Tumbleweed?
DimStar: for TW, I have it in staging and will try to squeeze it into the 1021 snapshot
so unlike something really bad happened, it should be shipping tomorrow or Sunday
via: How To Patch and Protect Linux Kernel Zero Day Local Privilege Escalation Vulnerability CVE-2016-5195 [ 21/Oct/2016 ] [WayBack]
Progress can be tracked at https://bugzilla.suse.com/show_bug.cgi?id=CVE-2016-5195 (via simotek a.k.a. Simon Lees at IRC). Hopefully 13.2 will get released on Monday.
Edit: 13.2 didn’t make it on monday. Progress can be found via https://build.opensuse.org/project/maintenance_incidents/openSUSE:Maintenance (slow loading page!) and is at https://build.opensuse.org/project/show/openSUSE:Maintenance:5752
More exploits at https://github.com/dirtycow/dirtycow.github.io/wiki/PoCs
# zypper addrepo http://download.opensuse.org/repositories/openSUSE:/Maintenance:/5752/openSUSE_13.2_Update/openSUSE:Maintenance:5752.repo
# zypper patch
This works fine in await of the formal update process and me testing it resulted in the release of the kernel to the official 13.2 update, but note you still have to reboot after the update even though the process doesn’t tell you that:
wiert: @_Marcus_ “klopt als een zwerende vinger” or in English: works splendid. install and test log at https://gist.github.com/jpluimers/42694ab1df04ea1bc8433ae021f9ef7e
wiert: @_Marcus_ thanks about teaching me about `zypper patch`. Need to run for the fundraising event now.
_Marcus_: wiert: thanks :)
wiert: @_Marcus_ no problem. Given the work you guys (and gals?) do it’s a small thing with the added bonus of contributing to my motto “life is about learning new things every day”.
_Marcus_: after your feedback i have now released the kenel ;)
wiert: @_Marcus_ great, looking forward to the actual update later. Thanks a lot!
wiert: @_Marcus_ I’ve updated the gist: 13.2 plus official dirty-COW update needs reboot, but the update process doesn’t list about reboot. Didn’t get the full zypper output, but I after updating I did a before/after reboot comparison of the behaviour. Results in https://gist.github.com/jpluimers/42694ab1df04ea1bc8433ae021f9ef7e#file-testing-official-update-before-reboot-then-reboot-retest-txt
Posted in *nix, openSuSE, Power User, SuSE Linux, Tumbleweed | Leave a Comment »
Posted by jpluimers on 2016/10/20
The unix shell is hard, but boy, sometimes it can work like magic, for instance piping two testssl.sh commands into one gist:
retinambpro1tb:testssl.sh jeroenp$ ( ./testssl.sh --version ; ./testssl.sh --local ) | gist -d "testsll version and local ciphers for Mac OS X Darwin binarries supporting zlib"
The source of this magic was this AskUbuntu answer: How to merge and pipe results from two different commands to single command? – Ask Ubuntu
via: openssl.Darwin.x86_64 lacks zlib support · Issue #164 · drwetter/testssl.sh
Posted in *nix, *nix-tools, bash, bash, Development, Power User, Scripting, Software Development, Uncategorized | Leave a Comment »