Archive for August, 2005

SchilliX

Tuesday, August 30th, 2005

SchilliX is the first distribution based on OpenSolaris. It is a liveCD and can also be installed on a hard disk on the x86, AMD64 and EM64T based architectures.

According to SchilliX’s website these are the highlights:

  • In 30sec fron bootmanager to multiuser login prompt (HD-boot)
  • Booting from CD or USB-Stick
  • Installs to your harddisk
  • Self healing Services

A quick tour to Solaris 10

Tuesday, August 30th, 2005

Probably at this point you’ve heard a lot of hype regarding Solaris 10. Well, Ben Rockwood’s blog has a quick primer on Sun Solaris 10. Enjoy this nice introduction.

Show shared library dependecies

Monday, August 22nd, 2005

The ldd command lists the dynamic libraries used by a program. This utility is very useful to find out what shared libraries your executables depend on or to do some basic forensic analysis or to help you building chrooted jails.

Simply type this…

ldd /usr/bin/passwd

and you’ll get something like this…

linux-gate.so.1 => (0xffffe000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7fb5000)
libpam.so.0 => /lib/libpam.so.0 (0xb7fab000)
libpam_misc.so.0 => /lib/libpam_misc.so.0 (0xb7fa8000)
libcrack.so.2 => /lib/libcrack.so.2 (0xb7f9c000)
libc.so.6 => /lib/libc.so.6 (0xb7e87000)
libdl.so.2 => /lib/libdl.so.2 (0xb7e83000)
/lib/ld-linux.so.2 (0xb7feb000)

Encrypting files with OpenSSL

Tuesday, August 16th, 2005

The OpenSSL Project is an Open Source implementation of the Secure Sockets Layer and Transport Layer Security protocols as well as a cryptography library. In this tip I will show you how to encrypt an individual file using the openssl tool.

Probably GPG is a better choice for simple file encryption, but in some ocassions (i.e. encrypt without building keys or certificates) OpenSSL could be very useful. It’s very simple:

openssl enc -aes-256-cbc -salt -in SuperSecretFile.txt -out SuperSecretFile.txt.enc

And your are done! Now to decrypt the file:

openssl enc -d -aes-256-cbc -in SuperSecretFile.txt.enc -out SuperSecretFile.txt

A note from the man pages.

use a salt in the key derivation routines. This option should *ALWAYS* be used unless compatibility with previous versions of OpenSSL or SSLeay is required. This option is only present on OpenSSL versions 0.9.5 or above.

Redirect HTTP to HTTPS

Saturday, August 6th, 2005

This little trick will show you how to configure Apache to automatically redirect HTTP requests to HTTPS, i.e. http://www.karkomaonline.com to https://www.karkomaonline.com.

Add this directives to you configuration file:

RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R]

Display system configuration

Saturday, August 6th, 2005

If you are new to Solaris world, don’t forget to add prtconf to your arsenal. This command provides you with information of your sistem configuration.

Simply type the following…

prtconf -v

Ethernet card settings in Linux

Thursday, August 4th, 2005

If you have a Linux system, there is a tool that lets you examine and change ethernet based network interfaces.

The ethtool utility is used for querying settings of an ethernet device and changing them. The basic usage is as follows:

ethtool eth0

…and you’ll get something like this:

Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised auto-negotiation: Yes
Speed: Unknown! (65535)
Duplex: Unknown! (255)
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: umbg
Wake-on: g
Current message level: 0×00000007 (7)
Link detected: no

For more information take a look at man pages.