solution for ” too long for Unix domain socket ” with ansible and amazon ec2


fatal: [ec2-x.x.x.x.us-west-2.compute.amazonaws.com] => SSH Error: unix_listener: "/home/shrinivasan/.ansible/cp/ansible-ssh-x.x.x.x.us-west-2.compute.amazonaws.com-22-ubuntu.0wqQt0HttbVPpz9B" too long for Unix domain socket
while connecting to x.x.x.x:22
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.

I got the above error on ansible, when used huge hostnames ( amazon ec2 names) instead of IP addresses, in hosts file for ansible.

Ansible can not log in the the machines via ssh.

To solve this, in /etc/ansible/ansible.cfg file, enable the following.
control_path = %(directory)s/%%h-%%r

After this, ansible can login to remote servers and run the scripts.

Solution for passwd: Module is unknown issue in ubuntu


I have a AWS instance with Ubuntu installed.

When I add a new user, or try to change the password, I got the following error.

# passwd
passwd: Module is unknown
passwd: password unchanged

 

Let us check the auth.log for any issues.

root@ip-172-31-9-242:~# tail -n 2 /var/log/auth.log
Jun  3 14:06:01 ip-172-31-9-242 CRON[31435]: pam_unix(cron:session): session closed for user root
Jun  3 14:08:01 ip-172-31-9-242 CRON[31490]: PAM unable to dlopen(pam_cracklib.so): /lib/security/pam_cracklib.so: cannot open shared object file: No such file or directory

 

It means that it misses the pam_cracklib. Let us search for it.

root@ip-172-31-9-242:~# apt-cache search pam | grep crack
libpam-cracklib – PAM module to enable cracklib support

 

Good. Let us try installing it.

root@ip-172-31-9-242:~# apt-get install libpam-cracklib

Let us try now to change the password.

 

Great. It works now.

 

Lesson : Look for the log files, before googling.

 

unrtf – rtf to html conversion utility


For http://FreeTamilEbooks.com project, we have to convert many Word Documents into html before converting them to epub using http://PressBooks.com

I used LibreOffice to open Word doc and to save as HTML.

Till LibreOffice 4.1, the images are extracted and stored separately along with HTML file.

But, after LibreOffice 4.2, they moved to base64 type of encoding of images, so that images are embedded into HTML files. We can not separate images from HTML files.

This was so annoying and many people are reporting this as a bug here.
https://bugs.documentfoundation.org/show_bug.cgi?id=48887

But, This seems not to be fixed.

So, I installed LibreOffice 4.1 in /opt just to use the old feature of storing images separately.

Just now, found another utility, unrtf to do the same.

http://www.gnu.org/software/unrtf/

To install it in ubuntu/debian

sudo apt-get install unrtf

If you get an word doc with images, save it as a Rich Text File using libreoffice writer.

example:

test.doc -> test.rtf

Then,

unrtf test.rtf > test.html

This gives a nice HTML file and images separately.

Thanks for the GNU team for the nice utility.

I can get rid of old LibreOffice 4.1 now.

FSFTN Summer Camp on Free Software Technologies at IIT Madras – June 8 to June 13


unnamed

http://fsftnsummercamp.org/

Free Software Foundation, Tamil Nadu (FSFTN) is an organisation that works to spread awareness about Free Software and Free Knowledge among college students of Tamil Nadu . As a part of our initiatives in taking Free Software technologies to the college students, we are holding a 6 day summer camp .This year the camp is to be held from June 8 th to June 13 th ( 6 days ) at IIT Madras.

The event would start with Introduction to Free Software Philosophy

Hands on sessions

  1. GNU/Linux introduction and installation
  2. Introduction to File system and Shell scripting
  3. Git & GitHub
  4. Blender
  5. Ruby
  6. HTML, CSS, JS
  7. Ruby On Rails
  8. Introduction to Node.js, MongoDB & Meteor

Apart from this there would be

  1. Team building excercise
  2. Showcasing of website built by students during the Ruby on Rails session

Introduction to:

  1. Cloud and containers
  2. Open Hardware
  3. From Internet to Meshnet
  4. Net Nuetrality

Short talks

  1. Wikipedia
  2. Tamil Computing & Localization
  3. Firefox OS & Contributing to Mozilla
  4. Getting started with Free Software Contribution
  5. SWIFT- Swift Women in Free Technologies

For continuous follow ups we have :

  1. How to form a GLUG and What next?

Every participant would be given a Participation certificate from FSFTN .

Please have look at the website of the Chennai edition of the 2015 summercamp. The posters for the events are attached .

About FSFTN :

Free Software Foundation, Tamil Nadu (FSFTN) is an organisation that works to spread awareness about Free Software and Free Knowledge among college students of Tamil Nadu.We are a part of Free Software Movement of India (FSMI), a social movement that has pledged to enlighten the general public with the essence of Free Software. FSFTN was founded in 2008 and is also a registered society in Tamil Nadu.

About Previous Editions and our movement

As a part of our initiatives in taking free software technologies to the college students, we have held two five days summer camps in the past two years – 18 – 22 June in 2013 and 15 – 19 June in 2014. The venue for these two summer camps were the Department of Computer Science and Engineering at IIT Madras. A total of 150 students from across Tamil Nadu participated in the summer camps for each year, where they learnt about basics of free software and innovative software packages like Python, Ruby on Rails etc. The summer camps were well received by the participating students.

The photos and videos of earlier versions can be accesed at 2008 – SSN , 2009 – SSN , 2010-SSN .

Apart from this , there have been workshops and events conducted throughout the year . Join the journey of creating a ecosystem in which Knowledge Sharing takes the front seat rather than mere studying .

How to use ibus in KDE5?


I use KDE Desktop environment for long time.

The recent KDE5 is good, sleek and beautiful.

To type in Tamil, I use ibus.
Installed it and configured Tamil99 keyboard layouts.

sudo apt-get install ibus-m17n ibus m17n-db m17n-contrib ibus-gtk ibus-qt4

This links helped to setup ibus.
https://abstract2paradox.wordpress.com/2011/06/14/typing-tamil-on-linux/
http://askubuntu.com/questions/129407/how-do-i-turn-on-phonetic-typing-for-tamil
https://www.youtube.com/watch?v=Q6fYn3OvfUE

Still in KDE5 , ibus is not working only in KDE applications. But, it works well with GTK based applications like Firefox.

In order to resolve this problem add

export QT_IM_MODULE=ibus

to ~/.xprofile and restart your X user session. ie. logout and login.

After doing this, I can type in tamil using ibus in all KDE applications.

Thanks to https://wiki.archlinux.org/index.php/IBus#Troubleshooting

Few Ebooks on Free Software, GNU/Linux, MySQL, HTML5 in Tamil


“Nithya, Please stop seeing TV Serials. I can not tolerate them.”

I requested my wife.

“Hmm. OK. I will stop it. But, I have to do something useful on the saved time”. Nithya said.

“Good. Can you share your knowledge in Tamil? Can you write few articles for the e-magazine Kaniyam“?

“Will give a try”.

This is how she started to write on Tamil about the technologies, she is strong and the new stuff she is learning. Her articles are published in Kaniyam site in 3 years. Compiled them and released as Free Ebooks.

Here is the list of Ebooks written by Nithya.

Nithya

MySQL – Part 1

MySQL – part 2

GNU/Linux Part 1

GNU/Linux Part 2

HTML

 My friend Amachu a.k.a Ramadhas wrote a book on Free Software. It came as print edition 7 years ago.
Released it as a free Ebook.

Ramadhas

 

Free Software

All these books are released in Creative Commons License.
You can download, read and share with all.

Nithya completed a book on GNU/Linux administration. Now writing on CSS.
My friend Priya wrote on Ruby.
Mr. Kuppan wrote on OpenOffice/LibreOffice.

These books are under spell checking and proof reading.

Kathirvel is writing on PHP
Tamil on WordPress.
I am writing on Python

We will release them soon.

Thanks for Kaniyam.com team and FreeTamilEbooks.com team for bringing these ebooks and the awesome service for the Tamil readers.

Please donate to buy a good camera for a Wikimedia Commons Photography Contributor


Please donate to buy a good camera for a Wikimedia Commons Photography Contributor.

Source –

https://ta.wikipedia.org/wiki/படிமம்:Yercaud_elango-science_writer-1-yercaud-salem-India.jpg

Mr.Yerkadu Elango, is a Tamil writer. He wrote 75 books. All the books are non-fiction, much informative, basic science oriented. General knowledge, educationalists, scientists, women leaders, social causes are the themes for his books.

To make Science and General Knowledge reach more people, he releases his books as Free Ebooks.

http://freetamilebooks.com/authors/ஏற்காடுஇளங்கோ/

We can download all his 15 ebooks for free here.

As works in Botanical Department in a Central Govt office in Yerkadu, He is very good at categorizing the plants and flowers. He take photos of all the plants around Yerkadu and uploads in https://commons.wikimedia.org

https://commons.wikimedia.org is a sub project of Wikipedia, where we can contribute with photos and anyone can use the photos without any piracy issues. All the photos are in creative commons license. So we can use the photos and have to mention the name, url of the wikipedia page as source.

So far, Yerkadu Elango, contributed 3200 photos on Commons.

He adds the Botanical details of the plants along with the photos.

We can see all his contributions here – https://commons.wikimedia.org/wiki/Category:Files_by_User:Yercaud-elango

More details about him:

https://ta.wikipedia.org/s/3pgz

http://www.vallamai.com/?p=53227

He is looking for Donations to buy a good camera so that his efforts can be more useful for the community.

For now, he is using a normal point and shoot camera, which is not helping to capture the flowers are in height of trees.

He has to climb up on trees and rocks to get the photos.

It will be nice, if we can help him to buy a good camera with nice ZOOM features, may be around 30x.

Below is his request in Tamil.

======================

வணக்கம். நான் இதுவரை 2868 புகைப்படங்களை விக்கிமீடியாவில் இணைத்துள்ளேன். இதில் 1126 தாவர இனங்களின் 2796 புகைப்படங்கள், 30 விலங்குகள், வண்ணத்துப் பூச்சிகள், 30 ஏற்காடு சுற்றுலா தளங்கள் என
இணைத்துள்ளேன்.

தாவரங்களின் பெயர்களை அடையாளம் கண்டுபிடித்து அதற்கு தாவரவியல் பெயரிடுவது மிகவும் சிரமம். சுமார் 30 நிமிடம் முதல் சில நாட்கள், சில மாதங்கள் கூட ஆகும். அலுவலக வேலை, தமிழ்நாடு அறிவியல் இயக்க பணிகள், அறிவியல் புத்தகம் எழுதும் பணி என பல வேலைகளுக்கு இடையே இப்பணியை நவம்பர் 22, 2014 முதல் செய்து வருகிறேன்.

தாவரம், மரம் போன்றவற்றை புகைப்படம் எடுக்க ஏற்காடு மலையில் 50 கி.மீ. தூரம் வரை செல்ல வேண்டும். மலையின் மீது ஏற வேண்டும். இது ஆபத்தான வேலை. இருப்பினும் சமூக நோக்கத்துடன் மாணவர் சமூகத்திற்காக, ஆராய்ச்சி மாணவர்களுக்கு உதவுவதற்காக இப்பணியை செய்து வருகிறேன். 5 ஆண்டுகள்
செய்ய கூடிய பி.எச்.டி., ஆய்வுக்கு இணையான பணியாகும். 75 புத்தகங்களை எழுதி முடித்து விட்டு, எழுத்துப் பணியையும் தொடர்ந்து கொண்டிருக்கிறேன்.

இத்துடன் தாவரங்களின் படங்களை எடுத்து இணைக்கும் பணியிலும் ஈடுபடுகிறேன். மரத்தின் உச்சியில் உள்ள பூக்களை படம் எடுக்க வேண்டி இருக்கிறது. ஒரு அதி நவீன கேமரா இருந்தால் மரங்களின் உச்சியில் உள்ள பூக்களை படம் எடுக்க முடியும். மேலும் ஏற்காட்டில் வாழும் பறவைகள், விலங்குகளையும் புகைப்படம் எடுத்து விக்கிமீடியாவில் இணைக்க முடியும். சமூக நோக்கத்துடன் எதிர்கால மாணவர் சமூகத்திற்காக செய்ய இருக்கும் இப்பணிக்கு 25க்கும் மேற்பட்ட Mega Pixel மற்றும் 30 x Zoom கொண்ட கேமரா வாங்கிக் கொடுத்தால் பணி சிறப்பாக அமையும்.

ஏற்காடு இளங்கோ

yercaudelango@gmail.com

======================

We dont know, if such effort of capturing plants will happen once again. The initial effort itself should be best as much possible.

Please donate to buy a good camera for Yerkadu elango.

Bank Details:

Name:B.S.Elango
Account no.1226101022826
Bank:Canara Bank
Branch:Yercaud
IFSC: CNRB0001226

Send an email to yercaudelango@gmail.com  & tshrinivasan@gmail.com on your donation details.

Thanks a lot.

Fix unknown ca error in apache SSL


I have a PHP application with apache and SSL.

It was failing on authentication.

The ssl error logs were as below

AH02008: SSL library error 1 in handshake
SSL Library Error: error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca (SSL alert number 48)

The apache ssl configuration was fine as below.

SSLCertificateFile Certificate file path
SSLCertificateKeyFile Key file path
SSLCertificateChainFile Intermediate bundle path

I tested the SSL with the site – https://www.sslshopper.com/ssl-checker.html

It reported as below

The certificate is not trusted in all web browsers. You may need to install an Intermediate/chain certificate to link it to a trusted root certificate. Learn more about this error. You can fix this by following GoDaddy’s Certificate Installation Instructions for your server platform. Pay attention to the parts about Intermediate certificates.

The intermediate certificate, aka bundle file may be an issue.

To verify it, ran the following commands.

openssl verify /etc/ssl/certs/cert.pem

gives me the following error:

error 20 at 0 depth lookup:unable to get local issuer certificate

We have to give the path of the intermediate CA certificate to verify the pem file.

openssl verify -CAfile /etc/apache2/ssl.crt/sf_bundle-g2-g1.crt /etc/ssl/certs/cert.pem

It gave the error as

Error loading file /etc/apache2/ssl.crt/sf_bundle-g2-g1.crt

It seems that there are some issues with sf_bundle-g2-g1.crt

I downloaded a fresh sf_bundle-g2-g1.crt file from GoDaddy site.

https://certs.godaddy.com/repository/
https://certs.godaddy.com/repository/sf_bundle-g2-g1.crt

and placed in /etc/apache2/ssl.crt/

Now the command works fine.

openssl verify -CAfile /etc/apache2/ssl.crt/sf_bundle-g2-g1.crt /etc/ssl/certs/cert.pem
/etc/ssl/certs/cert.pem: OK

And now, the web application can allows the users to login.

Thanks to the following links.

http://w3facility.org/question/trouble-connecting-to-ssl-encrypted-web-service-with-php/
http://www.herongyang.com/Cryptography/OpenSSL-Certificate-Path-Validation-Tests.html
http://stackoverflow.com/questions/26260445/openssl-unable-to-get-local-issuer-certificate-debian
http://serverfault.com/questions/582438/how-to-verify-signed-certificate
https://www.sslshopper.com/ssl-checker.html
https://certs.godaddy.com/repository/
http://serverfault.com/questions/655995/roundcube-postfix-smtp-ssl-routinesssl3-read-bytestlsv1-alert-unknown-cas3