Taming Ubuntu : Access shared Ubuntu folders from Windows XP

Ubuntu is a wonderful system especially for those who want to be in control of their operating system. On the other hand, sometimes you just want something to work without the hassle. Here is how to overcome one of those hassle if you or your friends want to share files across an Ubuntu installation.

On Ubuntu

Run the following command on your Ubuntu machine as root.

Please be careful when running commands under Linux as root, if you are unsure then ask someone before making any changes as root.

sudo smbpasswd -a 'yourusername'

Add a password when prompted (can be different from pc password).

On Windows

Simply access \\xxx.xxx.xxx.xxx\. Where xxx.xxx.xxx.xxx can either be the machines’ IP address or name.

When asked for credentials, provide user name, password for samba.

That’s it, you now have access to your Ubuntu system.

Migrating Cforms 2 to Production Server

Cforms II is one of the most popular plug-ins considered by WordPress. I recently started using this plug-in for the contact form on any website that I create and it works like a charm. The only problem arise when you want to migrate your local development install to your production server. Here I am presenting a nice little script that I put together to help with fixing the form references after migration.

The Problem

When you migrate your cforms plugin from server to server, cform apparently keeps reference to the initial install which for me caused a lot of problem. For instance, when the website was loading I realise that a file was being referenced from my local server. huh!!! I was curious which plugin was doing this and went straight to the database only to find out that the culprit (with no fingers pointing) was cforms.

These are the references that it keeps:

Because the cforms data is being saved in the database as serialised data changing these from the database would cause the data to be corrupted and in some instances cause your cforms install useless.

For me, I had both problems, I initially tried to update the data from the database and it got corrupted and I tried using the methods prescribed by cforms to fix this problem but that didn’t work. Cforms method is to disable and enable the plugin or edit the data in the little form that the corrupt data page gives you.

Remember, always backup your wordpress install, both database and files before messing around, especially in production environments.

Also, in cforms, go to global settings and backup all settings.

The Solution to Updating the References

After finding that the problem was with cforms I went into cforms code and found what they were doing and here is the final result. Use this method if you have moved over your installation and want to update the references to your production server.

The Solution to Remove Cforms Totally and Reinstall

Use this method to totally remove cforms data from the database, especially if cforms constantly reports that its data is corrupt and doesn’t give you the option to remove it.

Remember to backup your website before messing around.

  • WordPress version: WordPress 2.8.1
  • Cforms version: Cforms 2 10.5.2