One of the things which makes Linux more appealing is the capability to send email from command line, without logging to a webmail account or configuring your mail client like Outlook express. While working on the command line, you can send an attachment too, but the problem with this is file attachments like pdf or jpg appear as garbled text to the receiver. The solution? Another cool opensource software: uuencode. Download uuencode from this site for ubuntu: http://packages.ubuntu.com/dapper/i386/sharutils/download.
Usage: Suppose you want to send a pdf file(‘climatechange.pdf’) to a recipient address firstname.lastname@example.org. Then type the following command:
$uuencode climatechange.pdf climatechange.pdf | mails -s “climate change document” email@example.com
The pdf document wil appear as an attachment on the recipients side. Read More
Net Neutrality wars…”If cable and the Bells can’t negotiate special deals, neither can Google.” opponents of Net neutrality.
Are all packets created equal? It is more like asking is the Internet neutral by design? The answer is no. It seems to favor text than voice, for instance. The more you hear this debate on Net neutrality, it is easy to realize that it is a battle between two giants – Cable companies(especially AT&T, Comcast) and Content providers (particularly Google). After the Federal Courts decided unanimously that the FCC doesn’t have the authority to tell Comcast on how to manage its network, the FCC has been trying hard to find a legal loophole which gives it the authority to regulate the Internet. Many proponents suggested the FCC reclassify the broadband Internet into the telecommunications services rather than the previous Information services, which is outside FCC’s regulatory authority. But the FCC seems to have decided to take a ‘third way’ without reclassifying broadband Internet. Time will decide whether this new path will be challenged in courts too.
What makes Net neutrality interesting is it is a partisan issue, the Democrats are pushing the FCC to take whatever means available to it legally to preserve the openness of the Internet, while the Republicans, on the other hand are threatening it with ‘see you in court’ remarks. But here is an addition to the debate, a claim made by a Republican representative – if the Cable companies are not allowed to make deals with their clients for a preferential treatment of their traffic based on price, then the Content providers(read as Google) should not be allowed to discriminate among content…like Google’s ranking of search results (that is not neutral ;)). Read more.
If you are looking for a lightweight, lean&mean operating system oriented towards web applications, then download and play with Peppermint Linux. It has just been released in the last few days.
If your ftp server is behind a NAT router, the regular ftps configuration steps you find in most tutorials in the Internet may not work for you. Hope these steps help.
1. Chroot (chain or jail) users to their home directory by adding the line below to proftpd.conf
2. Generate certificate keys, in this case, in the directory /etc/proftpd/ssl/
$openssl req -new -x509 -days 365 -nodes -out /etc/proftpd/ssl/server.cert.pem -keyout /etc/proftpd/ssl/server.key.pem
3. Add this lines to proftpd.conf
4. Allow a range of passive ports to be forwarded to your ftp server by the firewall and set those ports in your ftp config fil – proftpd.conf in this case.
PassivePorts 60000 60100
5. Masquerade the ftp server’s address to the external IP of the NAT server/router.
Just came across a traditional Eritrean ‘kuda’ dance. Very entertaining & made me nostalgic! Enjoy.
Got this advice from a CTO – hot topics for system administrators:
1. performance monitoring
2. capacity planning
4. Disaster recovery(DR) planning
By default, any error message in your php script will be visible to site visitors on the browser and will be logged to apache error log file – most commonly in “/var/log/httpd/error.log”. In a production server it is advisable to prevent the error message from appearing on browser and has to be silently sent to a custom log file, specifically created for logging only php error messages. Following these steps might help:
1. Create the file under /var/log -> $touch /var/log/php-error.log
2. change permission to 644 -> $chmod 644 /var/log/php-error.log
3. set ownership -> $chown root.apache /var/log/php-error.log (if httpd is running under apache, could be www-data, nobody…)
4. Edit /etc/php.ini and make sure the following options are set correctly
error_reporting = E_ALL
display_errors = OFF
log_errors = ON
5. Write a php script with some syntax error in it and check whether the error notification is logged or not
$tail -f /var/log/php-error.log
It is not advisable to use password based login for ssh any more. One of the most secure ways of remote login through ssh is to use public key authentication. But in order to do that you have to generate both private and public keys using ssh-keygen, for RSA the default file names would be id_rsa (private key) and id_rsa.pub (public key). Since you have already generate those keys with a passphrase and want to change the passphrase now, execute the following command:
$ ssh-keygen -f id_rsa -p
type your new passphrase, you are done!
Have you locked yourself out of your linux machine? If by any chance you forgot the root password of your linux box and you have physical access to that machine, booting linux in single user mode will do the trick. Restart your computer using one of the following commands:
$shutdown -r now OR $init 6 OR $reboot
Then select the Linux kernel from the boot menu, type “e” (for edit). Then select the second line which starts with the word “kernel” and type “e”. Then press “space bar” and type “single” (for linux single user mode). Finally press “Enter” and type “b” for boot. Go ahead change the password now with $passwd.
Alright, let me admit this first – I love stand-up comedians. Not all of them, but those who tell it as it is. If I were to decide who the most intelligent and smartest stand-up comedian was I would pick George Carlin. He didn’t hesitate to question things we normally take for granted and simply accept as social norms. Actually he was more of a philosopher than just a regular comedian. My second choice would be Richard Pryor, an excellent story teller.
1. Carlin – critique on consumerism
2. Pryor – In the Jungle