Wednesday, December 26, 2007

Samba configuration on Debian Linux for accessing fileshares from Windows

After much hunting and well written how-to articles, I found that it boils down to this:

1. Either log in as root, or sudo each of these commands.
2. Edit your /etc/samba/smb.conf file to add whatever shares you need to access from a Windows computer. Here's a sample of mine

[docroot]
path=/var/www
writable=yes
invalid users=%S

3. Add a samba user:

smbpasswd -a {username}

4. Restart Samba

/etc/init.d/samba restart

5. Access your new share from Explorer or IE with the IP address of the computer backslash the name of the share. In my case:

\\192.168.1.106\docroot

Windows will prompt for the userid and password. Use the values you supplied to the smbpasswd command. You may have to preceed the userid with the hostname of the server (for example: 192.168.1.106\rick).

Monday, December 10, 2007

Network configuration woes with Debian

Trying to resurrect an ancient computer to use it as a low-powerer (wattage) file server/web server. After install Debian, couldn't communicate on the network.

Used ifconfig -a to show all the network interfaces. For some reason, eth2 was the selected choice.

Edited /etc/network/interfaces and changed references for eth0 to eth2. Then just did a ifup eth2, and behold the transmission of bits over my twisted pairs.

Other good commands to help diagnose the problems:

lspci - List all the PCI devices
lsmod - List modules loaded into the running kernel
modprobe -l - List all available modules

Monday, October 15, 2007

Correcting time problems in Kubuntu

After a serious misstep during a Grub correction, I installed a base install over my existing install. This resulted in network configuration going away and timezone problems. I fixed the network configuration easily enough, but the timezone stuff drove me crazy.

I finally found a post referencing the command tzconfig, which resolved my problems. Run it as follows:

$ sudo tzconfig

It will ask about your timezone and magically correct problems. My problems were with the desktop clock, the timestamp on Pidgin messages and the creation times of files created with Eclipse.

Adding default startup applications to Kubuntu

I wanted to have my gmail notifier start up with KDE on my Kubuntu 7.04 installation, so I Googled how to do it. Although the post I found was either incorrect or outdated, it let me down the right path.

To add a startup application, go to your .kde directory, then to the Autostart directory. In here, create a soft link to the application you wish to start.

$ cd
$ cd .kde
$ cd Autostart
$ ln -s /usr/bin/checkgmail checkgmail

Log out and login again and you should see the checkgmail application start.

Additionally, the checkgmail application is a Linux taskbar tool that monitors (unfortunately) one gmail account for new mail. Very much like the one Google makes for Win/Mac users. Highly recommended.

Wednesday, October 3, 2007

How to make Firefox built-in search open a new browser tab

I wanted to make Firefox 2's search window open a new tab rather then updating the current tab with the search results. After searching far and wide, I found that entering about:config in the address area brings up a geeky browser configuration page.

The setting I wanted was:

browser.search.openintab

Double-click that entry to toggle it from false to true, and you're there.

Friday, August 31, 2007

Cannot start phpmysqladmin from browser

I've installed Apache 2, PHP, MySQL, and PhpmyAdmin. When I try to run phpMyAdmin, I get the following error:

Cannot load mysql extension. Please check your PHP configuration. - Documentation

The problem is likely that you didn't install a PhpMyAdmin configuration file. Go to the server root, then the directory for PhpMyAdmin. Copy the default configuration file 'config.sample.php.inc' to 'config.php.inc'.

$ cp config.sample.php.inc config.php.inc

Add the following two lines after $i++

$cfg['Servers'][$i]['user'] = 'db-user-name';
$cfg['Servers'][$i]['password'] = 'db-user-name-password';

And while there, enter a valid blowfish key. Any old sentence of text will do.

Access phpmyadmin from your browser again, and you should be all set

Wednesday, August 15, 2007

Environment variables set in shell script not available after shell script

Problem
I struggled for hours trying to figure out why my shell script for setting my Java classpath wouldn't work. It was pretty straightforward too...

CLASSPATH=$CLASSPATH:/home/xxx/lib/itext.jar:.
export CLASSPATH

Then I ran it like this:

$ setclasspath.sh

And my classpath would be the same as it was before the script.

Solution
I needed to call it with the "." notation, as in:

$ . setclasspath.sh

This notation indicates that the settings should be applied to the current shell versus starting a new shell to execute the script, which was what I was getting by invoking by specifying the name.

Thursday, August 9, 2007

Welcome to Rick Did It

I've often thought it would be a good idea to document how when I overcome sort some of hurdle utilizing brain power, or even just using online research. This blog will be that documentation. I hope to cover items ranging from home repair to social interactions. I'm sure some of the items will be off-the-wall, but my goal is to simply share my solutions.

I hope this site is valuable for you too.