Category Archives: Scripts

Proper end-to-end syslog logging with Apache httpd

Table of content Context Objectives Folder structures and relevant files Configurations /etc/httpd/conf.d/httpd_base_module.conf /etc/httpd/conf.d/ /opt/fcrouzat/syslog/ /etc/rsyslog.d/zz-10-httpd.conf Remote logging: /etc/rsyslog.d/zz-09-remote-httpd.conf Caveats Conclusions Context For an unknown reason, Apache httpd only supports syslog since 2.4 and only for error logs. On top of that, default log format is very poor and (to me) doesn’t mean anything. Add these [...]

[Updated 2015-03-10] How to work with root shells in a PCI-DSS 10.2.2 compliant environment

Table of content Context and objectives PCI-DSS 10.2.2 How it limits your productivity Solutions PAM Bash PROMPT_COMMAND Concepts How it works Examples of output Context and objectives If you ever worked as a system administrator in a Linux PCI-DSS environment, you know it’s sometimes (often) difficult to administrate your servers from command-line because of PCI-DSS [...]

Simple HTTP file sharing in bash

Just a little bash function inspired by a post[1], that allows to quickly share file(s) over the network using a one-shot HTTP request. It only requires nc to bind the listening socket. function share() { ! type -a nc &>/dev/null && { echo "This machine doesn’t have ‘nc’" >/dev/stderr ; return 1 ; } [[ [...]