Archive for August, 2008

How to add a user to a group in phpLDAPadmin

Saturday, August 30th, 2008

Now I find it obvious, but at first, it was not.

I am using a OpenLDAP for Linux user authentication, and I am using Web based tool for editing LDAP entries called phpLDAPadmin. I needed to add a user to a group in phpLDAPadmin, but it was not obvious to me.

Click on the group on the left part of a screen (in a tree structure) . Then, in right half, click on a Add new attribute, then select memberUid and enter some username. After you press Add or Save Changes couple of times, you will notice a new link under memberUid called (modify group members), which allows you to edit members in a more user friendly way.

List of free Linux backup solutions

Wednesday, August 27th, 2008

I need a tool for backing up a directories on a server. The problem in Linux it that you have too much solutions for that specific task, and you need a time to research and figure out which one is the best.
I will backup my data on the same server, only on a different disk. CPU utilization is not a problem, and primary goals are small footprint (to be able to have the longest history), and to have reasonable easy way of retrieving data from backup archive.
So, first, let me list all the solutions.

Based on rsync:

  • rsnapshot : Written in Perl, using rsync and hard links, it is possible to keep multiple, full backups instantly available
  • rsback : Written in Perl, I am not sure what are the differences from rsnapshot
  • ccollect : Written in simple sh-script.
  • fwbackups : Installable with yum (yum install fwbackups).
  • flyback : Python based.
  • Dirvish : I believe it is not maintained anymore.
  • rsync-backup : Perl script.
  • RIBS (Rsync Incremental Backup Script) : Written in PHP.
  • rsnap : Python.

Based on rdiff:

  • rdiff-backup : Python & C written. Best documentation at this wiki. Can be installed with yum.
  • SafeKeep : Python / based on rdiff-backup. Installable on Fedora 9 via yum (–enablerepo=rawhide list safekeep*)
  • Backupninja : centralized way to configure and schedule many different backup utilities.
  • pybackpack : Python, based on rdiff-backup. Basic usage at howtoforge.com. Can be installed with yum (yum install pybackpack). But, it has a big problem in not possible to start it from the commandline or cron.
  • rBackup : Written mainly in PHP. Not in repository.

None of the above:

  • Areca : Written in Java, supports everything I need. Not available in any Fedora repository. Good tutorial and manuals, but still the problem that it is not diff-based (the whole file is written). Good solution is because it has a compression.
  • RESTORE-EE (Enterprise Edition) : Complicated and nice, but not impressed. Tutorial at howtoforge.
  • Duplicity : Very good, only with no GUI or other tool for restoring data. Probably the only viable solution if you backup data is on a public server, because supports encryption right from the start.
  • Backerupper : To me, it looks that is not maintained anymore. Written in Lazarus-Freepascal (Delphi for Linux)
  • Bacula : Really heavy.
  • Amanda : Heavy too.
  • Mondo Rescue : Really a recovery solution, but just to mention it.
  • afbackup : Written in C. Very odl and mature, but none of the documentation.
  • BackupPC : Configuration seemed very strange to me.

BackupPC

BackupPC

	cat /etc/httpd/conf.d/BackupPC.conf</pre><br />htpasswd -c /etc/BackupPC/apache.users backuppc<br /><pre><br /> nano /etc/BackupPC/hostsThat worked http://localhost/BackupPC (note the letter case)<br /><br />chkconfig --list backuppc<br /><br /></pre><br /><br /><h2>rdiffWeb</h2><br /><br />Web interface for retrieving a rdiff-backup data. Two are available (<a target="_blank" href="http://www.rdiffweb.org/">rdiffWeb</a> and <a target="_blank" href="http://rdiffbackupweb.sourceforge.net/">rdiff-backup-web</a>) - with same function. The first one is nicer to me, and installation was the following:<br /><pre><br />yum install python-cherrypy<br />wget http://www.rdiffweb.org/releases/rdiffWeb-0.6.3-1.noarch.rpm<br />yum localinstall --nogpgcheck rdiffWeb-0.6.3-1.noarch.rpm<br />rdiff-web-config<br />service rdiff-web start<br />

And in browser: http://localhost:8080/. Beautifull. To add it permanently, just: chkconfig –add rdiff-web.

Some notes: Somehow, my instict told me that I will be needin a compression file system, and best I found was FuseCompress (the older, perfectly stable version is found here). Btw. it is available in Fedora 9 with yum (–enablerepo=rawhide list fusecompress). The other solution – patched kernel for ext2 called e2compr, was not acceptable because I do not want to patch kernel after every kernel update.

10 tools to create boxshots

Monday, August 25th, 2008

Use these software tools to easily create boxshots, screenshots and sample photos (for your portfolio, for example). I made a research, and here are my picks. (more…)

Practical rules for life & business by GoDaddy

Sunday, August 24th, 2008

I just had to quote these 16 fantastic simple rules. More practical and more simple than any that I found before. This is copied from Bob Parsons blog which I don’t fancy very much.

1. Get and stay out of your comfort zone. I believe that not much happens of any significance when we’re in our comfort zone. I hear people say, “But I’m concerned about security.” My response to that is simple: “Security is for cadavers.”

2. Never give up. Almost nothing works the first time it’s attempted. Just because what you’re doing does not seem to be working, doesn’t mean it won’t work. It just means that it might not work the way you’re doing it. If it was easy, everyone would be doing it, and you wouldn’t have an opportunity.

3. When you’re ready to quit, you’re closer than you think. There’s an old Chinese saying that I just love, and I believe it is so true. It goes like this: “The temptation to quit will be greatest just before you are about to succeed.”

4. With regard to whatever worries you, not only accept the worst thing that could happen, but make it a point to quantify what the worst thing could be. Very seldom will the worst consequence be anywhere near as bad as a cloud of “undefined consequences.” My father would tell me early on, when I was struggling and losing my shirt trying to get Parsons Technology going, “Well, Robert, if it doesn’t work, they can’t eat you.”

5. Focus on what you want to have happen. Remember that old saying, “As you think, so shall you be.”

6. Take things a day at a time. No matter how difficult your situation is, you can get through it if you don’t look too far into the future, and focus on the present moment. You can get through anything one day at a time.

7. Always be moving forward. Never stop investing. Never stop improving. Never stop doing something new. The moment you stop improving your organization, it starts to die. Make it your goal to be better each and every day, in some small way. Remember the Japanese concept of Kaizen. Small daily improvements eventually result in huge advantages.

8. Be quick to decide. Remember what General George S. Patton said: “A good plan violently executed today is far and away better than a perfect plan tomorrow.”

9. Measure everything of significance. I swear this is true. Anything that is measured and watched, improves.

10. Anything that is not managed will deteriorate. If you want to uncover problems you don’t know about, take a few moments and look closely at the areas you haven’t examined for a while. I guarantee you problems will be there.

11. Pay attention to your competitors, but pay more attention to what you’re doing. When you look at your competitors, remember that everything looks perfect at a distance. Even the planet Earth, if you get far enough into space, looks like a peaceful place.

12. Never let anybody push you around. In our society, with our laws and even playing field, you have just as much right to what you’re doing as anyone else, provided that what you’re doing is legal.

13. Never expect life to be fair. Life isn’t fair. You make your own breaks. You’ll be doing good if the only meaning fair has to you, is something that you pay when you get on a bus (i.e., fare).

14. Solve your own problems. You’ll find that by coming up with your own solutions, you’ll develop a competitive edge. Masura Ibuka, the co-founder of SONY, said it best: “You never succeed in technology, business, or anything by following the others.” There’s also an old Asian saying that I remind myself of frequently. It goes like this: “A wise man keeps his own counsel.”

15. Don’t take yourself too seriously. Lighten up. Often, at least half of what we accomplish is due to luck. None of us are in control as much as we like to think we are.

16. There’s always a reason to smile. Find it. After all, you’re really lucky just to be alive. Life is short. More and more, I agree with my little brother. He always reminds me: “We’re not here for a long time; we’re here for a good time.”

Inline images in RoundCube Webmail

Saturday, August 23rd, 2008

I needed to make a fancy signatures for some clients, in RoundCube Webmail. For that, I wanted an inline image in a HTML signature – something that is not possible to achieve in current Roundcube. So i made a some changes, and come up with a solution:

Every change is in

\program\steps\mail\sendmail.inc

and \program\lib\stringstream.php is needed.

I am lazy to write this… Finish whenever you want.

DNS Vulnerability Check for specific Name Server

Saturday, August 2nd, 2008

You probably found a lot of online tools to check for DNS Poisoning check. For example, here and here. The second one is a site of Dan Kaminsky – the original researcher that discovered the vulnerability. But, these tools check “My DNS Server” – something that is my ISP server, and not DNS that I am hosting/running. So, after some looking around, a found this one-liner here: just find any Linux box, and type there:

dig @ns1.nameserver.com +short porttest.dns-oarc.net TXT

where ns1.nameserver.com is either IP or name of a DNS server. If the result is GOOD – it’s like that – anything else is a big problem.