Mini-guide to GnuPG and FireGPG
Submitted by madvip on Thu, 07/24/2008 - 07:52.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
Submitted by madvip on Mon, 07/21/2008 - 14:08.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
Submitted by madvip on Fri, 06/20/2008 - 07:29.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
Submitted by madvip on Thu, 06/19/2008 - 09:12.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
Submitted by madvip on Wed, 06/18/2008 - 13:22.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
Submitted by madvip on Tue, 06/17/2008 - 10:25.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
Submitted by madvip on Mon, 05/19/2008 - 07:18.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?
Submitted by madvip on Mon, 04/14/2008 - 17:00.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
Submitted by madvip on Thu, 04/10/2008 - 14:44.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
Submitted by madvip on Thu, 04/10/2008 - 13:20.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!

