Author: admin

Apache, Linux, Security

Installing TeamPass in Debian Jessie

Introduction: TeamPass is a very good Web application which can store securely Passwords for single person or teams. Here are the steps I used to install it in Debian Jessie. These instructions can also be used with no or minimal changes to install TeamPass in other Debian or Ubuntu systems. These instruction are partly based …

Linux, MAC OS X, Security

SSH doesn’t accept my key since upgrade Mac OS X to Sierra

Introduction: I have two MacBooks. One that still has Mavericks OS X and one that I just upgrade to Sierra OS X. Since the upgrade I can’t connect via SSH to one of my Linux servers using the RSA/DSA Keys any more. It always asks for a password. After adding the ‘-v’ option to the …

Linux, MAC OS X

Making a PC bootable USB stick using an .iso file on MAC

Introduction: Although Mac has been changed a lot since the days of Free-BSD it is still Unix and has lots of commands that are very compatible with the ones of its brother Linux. So here are the commands done in the Mac terminal which creates a bootable USB drive using an ISO file as the …

Linux, XEN

pygrub: Unable to find partition containing kernel

Introduction: Lately after I upgraded many packages in a Xen 4.4 DOMU VM the pygrub could not boot the VM any more. During the security update, the installed grub2(grup-pc), which never created any problems before with pygrub, got updated and suddenly it did create problems to boot the VM. Here is the error message I …

Bash, Linux

Force reboot a remote Linux server

Introduction: After having tried to do a reboot of a remote Linux server via the command reboot which had no effect, I tried to find a command that would force the server to reboot immediately. I found the commands that do exactly that at: https://major.io/2009/01/29/linux-emergency-reboot-or-shutdown-with-magic-commands/ Commands: echo 1 > /proc/sys/kernel/sysrq echo b > /proc/sysrq-trigger This …

Apache, Linux

Upgrading Apache2 from Debian Wheezy to Jessie

Introduction: As I tried to make a full distribution upgrade from Wheezy to Jessie the upgrade of Apache2 didn’t go well at all: dpkg kept coming up with dependencies errors and post-install scripts errors. Unfortunately I don’t have a sample of these errors here. Since I had to dist-upgrade over 30 servers of the same …

Linux, MySQL

Switch database type from H2 to MySQL in Atlassian Jira

Introduction: After having tested Jira and decided to keep it for production it is very recommended to change the type of database used by Jira. The default database at delivery time is H2(local file dB) and in this HOW-TO I describe what I had to do to execute that switch under Debian Jessie. Steps: References: …

Bash, Linux, MySQL

Display MySQL databases types in bash

Based on the site: http://stackoverflow.com/questions/213543/how-can-i-check-mysql-engine-type-for-a-specific-table Here is a bash command that will display the databases types(innoDB or MyISAM) of all the MySQL databases except for the defaults ones(mysql, etc) for i in $(mysql -u root -p -e “show databases;” | egrep -v ‘Database|information_schema|mysql|performance_schema’); do echo “——————–$i——————–“; mysql -u root -p -e “use $i; show table …

Linux, Security

Changing Linux system password in bash script

Introduction: I created a script that creates a full email account for a new user including setting the password. I was looking for a way to change/set the password programmatically in the script using clear text passwords provided in variables. I took this information for the man page of chpasswd Some solution examples: Changing/setting the …

Linux, XEN

‘init: plymouth-upstart-bridge main process ended, respawning’ error messages at boot.

I installed a new Ubuntu 14.04 as a Xen server and found out that on booting the following messages repeated itself many times, [ 2.811553] init: plymouth-upstart-bridge main process (191) terminated with status 1 [ 2.812789] init: plymouth-upstart-bridge main process ended, respawning [ 2.874117] init: plymouth-upstart-bridge main process (210) terminated with status 1 [ 2.875167] …

Linux, Security

Discover live hosts on a network under Linux

There are lost of tools available to scan a network and list the IPs of the hosts that are live. Here is one that I find quite cool using nmap with the following command(for example for the LAN network 192.168.100.0/24): Reference: http://security.stackexchange.com/questions/36198/how-to-find-live-hosts-on-my-network nmap 192.168.100.0/24 -n -sP | grep report | awk ‘{print $5}’ the result …

Linux, XEN

Installing Xen Hypervisor 4.8 on Debian Jessie

Introduction: I was looking for a way to install Xen 4.8 in Jessie because in some of the newest Processors Intel series called Skylake the default version of Xen Hypervisor on Jessie (4.4) results in endless booting loops. NOTE: If you already had the Xen 4.4(original installed) no worries the version 4.4 will not be …

Bash, Linux, Security

Forcing pam users to use only FTPS and block SFTP/SSH

Introduction: I needed to force certain PAM users(configured in /etc/passwd) to use FTPS and block them from using SSH or SFTP. Here is a solution I found in: http://askubuntu.com/questions/93411/simple-easy-way-to-jail-users Solution: Add to /etc/shells a new shell: vim /etc/shells Add one line: /bin/false Save. For each user you want to deny ssh/sftp, change the user’s shell: …

GlusterFS, Linux

Upgrading GlusterFS from 3.2(Debian) to 3.4 for Debian Wheezy

Reference: https://download.gluster.org/pub/gluster/glusterfs/3.4/LATEST/Debian/wheezy/ Packages of GlusterFS 3.4.7 for Debian wheezy are available here from the Gluster Community… Add the GPG key to apt: wget -O – http://download.gluster.org/pub/gluster/glusterfs/3.4/LATEST/Debian/wheezy/pubkey.gpg | apt-key add – Add the source: echo deb http://download.gluster.org/pub/gluster/glusterfs/3.4/LATEST/Debian/wheezy/apt wheezy main > /etc/apt/sources.list.d/gluster.list Update package list: apt-get update Install: apt-get install [ glusterfs-server | glusterfs-client ] Packages from …

Linux, Systemd, XEN

Ubuntu 16.10 : xenconsole: Could not read tty from store: Success

Introduction: After having had some stability problems, with running Xen DOMUs under Ubuntu 16.04/Xen 4.6, I decided to upgrade to Ubuntu 16.10/Xen 4.7. Unfortunately, as I tried to start any of the DOMUs with the option -c to see the console content, the following error message was displayed and I got kicked out and no …

Linux, MAC OS X

Extending SSD life expectancy by tuning Firefox

Introduction: If you are using Firefox and SSD drive(s) then according to this site: https://www.servethehome.com/firefox-is-eating-your-ssd-here-is-how-to-fix-it/ it is very recommended to make the small configuration change in Firefox to extend the life of your SSD. Reason: SSD Drives do have a lifespan depending on how many times we write to it. Therefore the function of regular …

Bash, Linux

Displaying the list of all ‘at’ jobs and their respective commands

Introduction: The command atq gives me the list of at jobs waiting to be executed and their execution times. Each line starting with the job number. The command at -c JobNumber gives me the content of the job including the environment variables. What I wanted is a command that would give me the list of …

Linux, Monitoring

Monitoring Linux server with iPhone/iPad

Introduction: Although Apple doesn’t have too many apps that support Linux admins, here is one that just came back on the market with a rebound on 26 Oct. 2016 with a new look, features and bug fixes: The iStat3 Server for Linux and iStat3 for iOS made by Bjango PTY Ltd. This app will display …

Linux, MySQL, Security, Systemd, Wordpress

Resolving Mysql error: Too many open files

Introduction: As I upgraded from Mysql 5.5 to 5.6 suddenly some sites were showing the following error: …… Too many open files The issue has to do with the present limitations given to the system and PAM system to open max 1024 files. After doing some research I found this site below here which is …