Mini-guide to GnuPG and FireGPG

In this guide I will explain how to create a keypair (public/private key) and use them with FireGPG to encrypt/decrypt/verify your Gmail communications. What is GnuPG and what is FireGPG? GnuPG is GNU's tool for secure communication and data storage. It can be used to encrypt data and to create digital signatures. It includes an advanced key management facility and is compliant with the proposed OpenPGP Internet standard as described in RFC2440.

Before anything else, you will need to install GnuPG - if you are using a Debian/derivate Linux flavour, installing GnuPG is as simple as this:


Installing Nessus on Ubuntu

Installing and using Nessus on a Debian/Ubuntu based system is as simple as following these steps:

sudo apt-get install nessusd nessus nessus-plugins

During the installation, it will ask you to create a Certificate, accept defaults, change location, state, etc if you like.

sudo update-rc.d nessusd defualts
/etc/init.d/nessusd start
sudo nessus-adduser

Active Directory authentication in Ubuntu

This article will explain how to log inside a Linux box using Windows Domain credentials. This is especially useful in an enterprise environment. I am assuming that my windows username is james.attard and the domain is called ACME. First of all we install Likewise-Open:

james@madvip.net:~$ sudo apt-get install likewise-open

Now we can try to join the domain ACME with a domain administrator account. I'm assuming that my windows username james.attard is part of the domain admins:

james@madvip.net:~$ sudo domainjoin-cli join ACME james.attard

Joining Ubuntu to a Windows 2003 AD

First of all you need to install the following packages:

* Samba (version 3):
o samba
o samba-common (installed by default)
o smbclient (installed by default)
o winbind

* Kerberos:
o krb5-config
o krb5-user

Edit /etc/samba/smb.conf:

[global]
security = ADS
realm = mycompany
workgroup = mycompany
password server = obelix.mycompany
wins support = no
wins server = 10.0.20.202
invalid users = root
# Winbind settings
idmap uid = 10000-20000
idmap gid = 10000-20000
# For testing
debuglevel = 2

Creating encrypted loopback filesystems on Linux

Using the loopback filesystem interface, you can create encrypted filesystems very easily. These filesystems are great for storing sensitive documents be it SSH or GnuPG keys, financial documents, etc.

To begin, you’ll need to load the aes and cryptoloop modules in the kernel if they are not already available. This can be done by executing:

# modprobe cryptoloop
# modprobe aes

MySQL Table Locking Issues

Taken from http://dev.mysql.com/doc/refman/5.0/en/table-locking.html

To achieve a very high lock speed, MySQL uses table locking (instead of page, row, or column locking) for all storage engines except InnoDB, BDB, and NDBCLUSTER.

For InnoDB and BDB tables, MySQL only uses table locking if you explicitly lock the table with LOCK TABLES. For these storage engines, we recommend that you not use LOCK TABLES at all, because InnoDB uses automatic row-level locking and BDB uses page-level locking to ensure transaction isolation.


Enabling locked accounts in HPUX

You can’t use vi to re-enable an account if you are using password aging or “trusted” password databases, and the user is aged out or locked out due to too many login failures.

To enable a disabled HP-UX account via the command line, run one of these commands:

/usr/lbin/modprpw -l -k username

/usr/lbin/modprpw -l -x username

Is my OS / Oracle running 32-bit or 64-bit software?

DBAs often need to know if they should install Oracle 32-bit or 64-bit software on a given server. If the operating system support 64-bit applications, the 64-bit Oracle distribution can be loaded. Otherwise, the 32-bit distribution must be installed. The following Unix commands will tell you whether your OS is running 32-bits or 64-bits:

Solaris - isainfo -v (this command doesn't exist on Solaris 2.6 because it is only 32-bits)

HP-UX - getconf KERNEL_BITS

AIX - bootinfo -K

SQL Server database mirroring

You can find lots of online resources which describe how to mirror an MSSQL database, however the ones I've seen all manage to fail to explain all the necessary prerequisites. The first step to correctly configure a database for mirroring is to take a full backup of the database and another backup of its transaction log file:



BACKUP DATABASE my_db TO DISK='c:\my_db_full.BAK' WITH INIT 
BACKUP LOG my_db TO DISK='c:\my_db_log.TRN' WITH INIT 


Then we need to restore the database (but not recovering it, so we keep it closed for mirroring) on our destination site:


Removing duplicate rows from tables

The most efficient way to remove duplicate rows from a table is by using what we database freaks call 'CTAS'. It is an exotic acronym for the SQL statement 'CREATE TABLE AS'. Imagine table T1 contains duplicate rows and we want to create table T2 as a non-duplicate version of T1. The syntax is as follows:

CREATE TABLE T1 AS SELECT DISTINCT * FROM T2;

In Oracle this will generate lots of temp information so be sure you provide an ample temp tablespace!


Syndicate content