Author Archives: jonmoore

Locating PostgreSQL data directory

Use a simple psql query to find the location of the data directory postgres=# SHOW data_directory; data_directory —————————— /var/lib/postgresql/8.4/main (1 row) Or postgres=# select setting from pg_settings where name = ‘data_directory’; setting —————————— /var/lib/postgresql/8.4/main (1 row)

Posted in tips | Tagged | Leave a comment

Enable Thunderbird Global Search in Fedora

If you’ve just installed Thunderbird on Fedora 13, you’ve probably noticed the Global Search bar is missing. At least, this is one of the first things I noticed. After using Thunderbird 3.x for sometime on Windows I’ve really come to love this feature. It seems the default configuration on Fedora doesn’t enable this feature by [...]

Posted in other, tips | Tagged , , | 1 Comment

Moving /home to new partition

If /home is just a folder under / and you have a reason to put this on it’s own partition the process isn’t that difficult. Here is the steps I followed to do this. First, create the new partition on the drive. I was using LVM, so I created a new logical volume, do whatever [...]

Posted in Uncategorized | Leave a comment

Lock and Unlock Linux accounts

Using passwd it is possible to quickly lock and unlock Linux accounts. To lock an account. passwd -l username To unlock an account. passwd -u username

Posted in tips | Leave a comment

Using telnet to test POP server

Using telnet (or putty) it’s possible to some simple tests against a POP server. By no means exhaustive, it can give you insights in where to start troubleshooting. First, using telnet and open a connection the remote POP server telnet mailserver 110 Where mailserver is the mail server you want to connect to. Note that [...]

Posted in tips | Leave a comment

Linux IPv6 Neighbor Discovery

Using ping6 and ip neigh it’s possible to discover other IPv6 hosts on your local network using the link-local addresses. First, use ping6 to ping all hosts on the local network using the IPv6 link-local address ping6 -c 2 -I eth0 ff02::1 Then, use ip neigh to show a list of IPv6 enable hosts on [...]

Posted in quickfire, tips | Tagged | Leave a comment

Why use ZFS with FreeNAS?

I recently started using FreeNAS again after exploring other options that existed, such as openfiler, and now that I’ve returned, ZFS seems to be the cool thing to do.  After reading, watching videos and playing with ZFS I’m sold on all the features it offers.  However, I must ask, is there a compelling reason to [...]

Posted in quickfire, rants | Leave a comment

Rewrite incoming CallerID

We’re using asterisk, and as part of the dial plan, a 9 is required before the number to make calls out to the PSTN.  Since our phones have a incoming call log, it would be very convient to have asterisk rewrite the CallerID value on calls from the PSTN to include this leading digit.  I [...]

Posted in quickfire, tips | Tagged | Leave a comment

Asterisk GotoIf Application

The description from asterisk for this is GotoIf(condition?[labeliftrue]:[labeliffalse]), however for me (being somewhat new to asterisk, and not fully understanding all the little bits, this was a bit confusing. A better way of describing this, at least for those of use new to asterisk, might be GotoIf(condition?[context,priority,labeliftrue]:[context,priority,labeliffalse]). I have not used labels in the dial [...]

Posted in quickfire, tips | Tagged | Leave a comment

Remote packet capture

Had a need to capture some traffic on the remote machine and analyze it in Real Time ™.  Found to solutions to this.  The first, involved just sending the output of tcpdump across the ssh session. ssh host.example.org tcpump – eth0 -w – > capture.pcap The other method, picked up from the wireshark wiki allows for the [...]

Posted in Uncategorized | Leave a comment