VIM tiny things

Published on Author gryzli

Plugins and Plugin installation perl-support-plugin Make Vim as Your Perl IDE Using perl-support.vim Plugin http://www.thegeekstuff.com/tag/vi-vim-tips-and-tricks/ This is very nice plugin, which gives you some handy shortcuts if you use frequently vim for perl editing . The installation is pretty simple:     syntastic This is very nice plugin for syntax checking of different languages. Here… Continue reading VIM tiny things

Strace buggy php script running as cgi – Strace daemon

Published on Author gryzli

Very often I need to strace a script which is not “constantly” running, and must be “catch” during it’s execution. Today I had to debug some bad behaving php script, but because php was running as CGI (mod_suphp) it was hard a task. I had 3 choices in order to successfully attach the strace to the php… Continue reading Strace buggy php script running as cgi – Strace daemon

Change user password through BASH script

Published on Author gryzli

Very often I need to automate some bulk user password change. In the following examples we have: $user as username $pass as password in plain text Currently these are the methods I use to change user passwords: chpasswd method echo “$user:$pass” | chpasswd The old passwd method echo -e “$pass\n$pass” | passwd $user   Also… Continue reading Change user password through BASH script

Mikrotik – Configuring OpenVPN Server + Linux client

Published on Author gryzli

The first thing we must assure is the following: – We have working configuration on our Mikrotik router (internet access + local network) – We have generated SSL certfificate/key pair for the OpenVPN server   Import SSL Certificates + Root CA on the router We can use FTP to upload the following files: – cacert.pem… Continue reading Mikrotik – Configuring OpenVPN Server + Linux client

Creating Root SSL Authority with OpenSSL

Published on Author gryzli

1. Create directory structure mkdir certificates private_keys echo ‘100001’ >serial touch certindex.txt   2. Create some default openssl.cnf file # # OpenSSL configuration file. # # Establish working directory. dir = . [ ca ] default_ca = CA_default [ CA_default ] serial = $dir/serial database = $dir/certindex.txt new_certs_dir = $dir/certs certificate = $dir/cacert.pem private_key =… Continue reading Creating Root SSL Authority with OpenSSL