Change user password through BASH script

Published on Author gryzliLeave a comment

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 gryzliLeave a comment

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 gryzliLeave a comment

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