Quantcast
Channel: Sébastien Wains on scriptogr.am
Browsing index pages (29 articles)

Image may be NSFW.
Clik here to view.

Verify expiration date for a local x509 certificate

Use this command:openssl x509 -noout -in /etc/pki/tls/certs/client.crt -datesOutput would be:notBefore=Feb 20 16:20:08 2015 GMT notAfter=Feb 20 16:20:08 2016 GMT

View Article


Image may be NSFW.
Clik here to view.

Switching back from Chrome/Chromium to Firefox and a global rant about Google

I've used Chrome (and Chromium, depending on the platform, from now on I'll refer to it as Chrome) pretty much since it went out of beta.I started to get annoyed with the last few versions though.It...

View Article


Image may be NSFW.
Clik here to view.

Postfix routing and rewriting of addresses based on LDAP attributes

Note: This has been tested on RHEL6 and Postfix 2.6.6 from RHEL repositories and version 2.10 from postfix.org. RHEL6 version contains a nasty bug, I recommend you use Postfix.org RPMS.We want to route...

View Article

Image may be NSFW.
Clik here to view.

Adding a disk to a Synology Hybrid RAID (SHR) (with no data protection) to...

I bought a Synology DS214j a couple of months ago.I bought only one 2TB disk in the first place. My plan was to buy a second disk a couple of months later so I would have a RAID1 array made of two...

View Article

Image may be NSFW.
Clik here to view.

Samba integrated to Active Directory on RHEL7

Tested with Active Directory 2003 and RHEL 7.0For RHEL 6.0 see hereI consider that the server is correctly set up, its hostname should be set accordingly to the Active Directory domain. It should also...

View Article


Image may be NSFW.
Clik here to view.

Migrating from Wordpress to Scriptogr.am

I just migrated this blog from Wordpress to Scriptogr.am.Mainly because this blog isn't so much active anymore, those SQL IOPS were useless for something that had become so static (I disabled the...

View Article

Image may be NSFW.
Clik here to view.

Bash: loop until a connection is successful

I use Terminator as my terminal app, and use the "watch for activity" feature a lot. With the following command, I'd get notified as soon as the connection is opened.while ! nc -vz localhost 3306; do...

View Article

Image may be NSFW.
Clik here to view.

Pipe tcpdump trafic into Wireshark from a remote server

This command will allow you to pipe trafic generated by tcpdump on a remote machine into Wireshark running on your local machine:ssh root@dest tcpdump -U -s0 -w - 'tcp port 389' | wireshark -k -i -

View Article


Image may be NSFW.
Clik here to view.

Android Automagic: enable or disable motion detection on Dlink webcams

This has been tested on DCS-930L and DCS-5020L<?xml version='1.0' encoding='UTF-8' standalone='yes' ?><data version="1.25.0"><trigger...

View Article


Image may be NSFW.
Clik here to view.

PreserveFQDN and EscapeControlCharactersOnReceive with rsyslog

In legacy versions of rsyslog, if you want to use the option PreserveFQDN, you have to set the option before anything else, or it wouldn't work.If you are having issues sending logs from nxlog on...

View Article

Image may be NSFW.
Clik here to view.

Bash set builtin : pipefail

> false > echo $? 1 > true > echo $? 0 > false | true > echo $? 0 > set -o pipefail > false | true > echo $? 1

View Article

Image may be NSFW.
Clik here to view.

Outbound Postfix with SASL Authentication against LDAP (Dovecot)

I recently had to set up an outbound Postfix server with SASL authentication against LDAP. I’m a huge fan of Dovecot, so I did go with it instead of Cyrus which was a pain to set up a few years back....

View Article

Image may be NSFW.
Clik here to view.

Get notified when a change occurs on the filesystem

I can never seem to remember the correct command inotifywait -e modify -m -r /home/dir

View Article


Image may be NSFW.
Clik here to view.

Evaluating Ansible

I’m currently actively working on Salt, I actually have a dozen production servers at work, running critical services through it. I commit new things into the production branch every couple of days....

View Article

Image may be NSFW.
Clik here to view.

Tomcat 6 webapp authentication against AD

Tested on RHEL6 Add the following in /etc/tomcat6/server.xml (before the ending host tag) : <Realm className="org.apache.catalina.realm.JNDIRealm" debug="99"...

View Article


Image may be NSFW.
Clik here to view.

VLAN trunking with Cisco Catalyst 2950 + WAP4410N

VLAN 10 is WORK VLAN 20 is HOME VLAN 30 is GUEST On the 2950, configure the port to the WAP4410N as trunk : switch#conf t switch(config)#interface fastEthernet 0/12 switch(config-if)#description...

View Article

Image may be NSFW.
Clik here to view.

Debian installation over PXE and dnsmasq

The DHCP/TFTP server holds the IP 10.10.0.2 All commands as root : mkdir -p /srv/tftp cd /srv/tftp wget...

View Article


Image may be NSFW.
Clik here to view.

Repurposing a Barracuda Spam & Virus Firewall

I got my hands on a out of warranty/subscription/whatever Barracuda unit. This unit is a Spam & Firewall 400 model from 2009 or something. Basically it’s regular computer hardware in a 1U rack,...

View Article

Image may be NSFW.
Clik here to view.

mod_proxy_balancer on RHEL6

Tested on RHEL 6. This is the simplest setup possible, for my own reference. I may come up with a Salt state in the future. Reference : http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html...

View Article

Image may be NSFW.
Clik here to view.

Salt Stack, a (serious) alternative to Puppet

I couldn’t write it better : see http://www.lecloud.net/post/29325359938/salt-to-the-rescue So basically, Salt is a configuration management system (à la Puppet) and allows remote execution (à la...

View Article
Browsing index pages (29 articles)


Latest Images