Saturday, October 31, 2009

Password Management Using htpasswd

In Linux, several components use non-system standard passwords.

Some of these are svn, and ftp (e.g. vsftpd).

Here are the basics to get you through setting and resetting these passwords:

For svn, refer this guide.

For vsftpd, refer this guide.

Basically, htpasswd can be used to create encrypted passwords for such modules. Here are some basics to htpasswd:

1. htpasswd uses a password encrypted file, using an SSL certificate.
You can create your own ssl certificate too. But for public/production environments, you'd want to get a certificate from a third party so users don't get a security alert.

2. The first time, use the -c flag to set a password, as follows. You'll need to do this as root (or prefix sudo in ubuntu)

htpasswd -c /etc/apache2/my_passwd.passwd username

3. Subsequently, use the -m flag to modify this file for adding/editing users:

htpasswd -m /etc/apache2/my_passwd.passwd username

Tuesday, October 6, 2009

LAMP Server Crash

If you did some optimizations by adding memory or RAM to processes, and the next morning, you find your server is no longer online: chances are it ran out of space and triggered the oom-killer.

oom-killer is a process that goes randomly killing processes to help the system survive.
After this occurs you should always restart as soon as possible.

Here is where you can find the logs in ubuntu, and how to identify if your system shutdown because of memory:

location of log: /var/log/messages (you will have to have super user permissions to view)
What you'll see: Just before the server shutdown or went erratic, this message:

apache2 invoked oom-killer

To get out of this situation, try to put more conservative memory settings on your applications, or add more RAM!

All the best!

Saturday, October 3, 2009

5 features Ubuntu needs to compete

Though I dearly love Ubuntu, and many of its features make windows seem obsolete...
But no matter how much I'd like to bid Windows adieu... there are reasons I need to still hang on to Windows - and no, its not just because of Word.

1. IE Compatibility
It's tiresome to go online and find a site (turbotax, netflix, web outlook...) which doesn't work well with firefox - especially linux based firefox. Sure there are workarounds and spoofs, but that's not a system working out of the box.

2. Multimedia experience
Ubuntu has some really neat multimedia features. Compiz Fusion adds mouthwatering features to your desktop - allowing you to rotate it like a cube for example.
But when I plug in an HDMI cable to connect a big screen tv, windows still supports the extension much better. My nVidia ubuntu driver asks for a restart, but doesn't do anything even after that.
DRM support is not present, which means the music industry leaves Linux users with no form of entertainment. No rhapsody to go.

3. Application Setup
It takes a whole lot of effort to get some apps to work. Skype, for example, needs a whole lot of tweaking and driver upgrades before it can work. For an app that needs speakers and a mic for basic functionality, setup should not be so difficult.
The soundcard drivers and programs, though feature rich, are not seamlessly integrated yet.

4. Much needed Applications
Some applications are altogether missing linux support. For example, no iTunes, no Microsoft Office are completely missing (sure the MS Office issue has been beaten to death - but really, at least give us an application that formats word documents accurately!) - and I'm not even talking hit games like GTA.
And yes, Wine can help get some things working. But any serious OS can't rely on workarounds.

5. Teething issues
Linux is lightweight, and efficient. Not!
That's what I always believed, until I wondered why my computer was so sluggish, when all I was doing was browsing the internet. Turns out, the Adobe Flash plugin on linux is a resource hog. Even if its just pandora playing, or Rhapsody online, the cpu usage peaks, and everything slows to a crawl.
Its a known issue. But is anyone fixing it?

Most of these are minor issues, and most of them have workarounds. But the question is, if Ubuntu linux is really going to compete mainstream, these need to be addressed. Linux has come a long way since its inception and text based output. But it still needs some polishing before it can kill the competition.