List of command line commands to access POP3 and IMAP4.

List of command line commands to access POP3 and IMAP4.

POP3

Start, Run, type ‘cmd’, Select ‘ok’.

Type:

Telnet

Set local_echo : This is so you can see what you type.

Open London 110 : London can be replaced with the ip address of the Exchange server.

User administrator : Administrator is the user account.

Pass password : password is the password of the user.

Stat : gives you the number of messages and total size of your mailbox.

List : Lists each message number and gives you its size.

Retr message number : message number is the number of the individual message, the message will be displayed.

Dele message number : message will be deleted from your mailbox.

Quit : end of session.

IMAP4

Start, Run, type ‘cmd’, Select ‘ok’.

Type:

Telnet

Set local_echo : This is so you can see what you type.

Open London 143 : London can be replaced with the ip address of the Exchange server.

0000 login administrator password : login with username and password.

0001 select “inbox” : select the folder you want to view.

0002 fetch 1 all : retrieves the first message header information.

0003 logout : logout.

RPM commands

How to compile rpm from src.rpm

1) download src.rpm

2) rpm -ivh file.src.rpm

3) cd /usr/src//spec

4) rpmbuild -bb file.spec

new rpm should be in /usr/src/distro/rpms/…

other RPM commands:

rpm -ivh file.rpm (install)

rpm -Uvh file.rpm (upgrade)

rpm -qav (list rpms installed)

rpm -qil (list files in an installed rpm)

rpm -qilp file.rpm (list files that are included in the rpm)

rpm -qf /path/to/somefile (find rpm that installed the file)

rpm -qav | grep name (look to see if some rpm is installed)

Apache SSL Self-Signed Certificates Without Passphrase

taken from: http://www.rpatrick.com/tech/makecert/

Following is a quick listing of the commands you need to use when setting up an SSL key for Apache that doesn’t require a passphrase to be entered during normal operations, and includes a self-signed certificate so you needn’t bother with cert requests and CAs. The sequence of events is to create a 3DES key, remove the passphrase, and then generate a self-signed certificate.

The following commands are to be entered via the command line, with each openssl statement requiring interactive input. Performed on Red Hat Linux, these instructions ought to also work on other flavors of Unix with OpenSSL and Apache installed.

openssl genrsa -des3 -out pass.key 1024
openssl rsa -in pass.key -out server.key
openssl req -new -key server.key -x509 -out server.crt -days 999

cp server.key /etc/httpd/conf/ssl.key/
cp server.crt /etc/httpd/conf/ssl.crt/

apachectl restart

Verifying that Apache has the correct SSL directives and is using the correct key and certificate created above is left as an exercise for the webmaster.

If your system has a Makefile or symlink in the Apache conf directory, you can opt to pursue an earlier method to this madness using the below steps (provided here only for completeness):

cd /etc/httpd/conf
/usr/bin/openssl genrsa 1024 > /etc/httpd/conf/ssl.key/server.key
chmod go-rwx /etc/httpd/conf/ssl.key/server.key
make testcert

Optionally, if you need a server.pem file for a given application, such as courier-imapd, use the following to create the .pem file from the previously created certificate and key:

cat server.key server.crt >server.pem

Using the above method you can enjoy the encryption protection provided by SSL without having to pay a commercial vendor to sign your server keys. If you don’t like the popup presented by some applications (e.g. web browsers) about an untrusted certificate, simply follow the process provided by your application to import or install the certificate, at which point you will no longer have to deal with future dialog boxes regarding an untrusted site.

compiling xinetd on Solaris 8

You’ll want to download xinetd from here: https://github.com/xinetd-org/xinetd

Just my notes from an old version:

./configure
make
make install perl /usr/local/sbin/xconv.pl < /etc/inetd.conf > /tmp/xinetd.conf then modify your /etc/rc2.d/S72inetsvc
/usr/sbin/inetd -s &
to
/usr/local/sbin/xinetd& mv /tmp/xinetd.conf /etc/xinetd.conf
then make appropriate changes in /etc/xinetd.conf service ftp
{
socket_type = stream
wait = no
protocol = tcp
user = root
server = /usr/local/sbin/in.proftpd
bind = 192.168.0.3
}
service telnet
{
flags = NAMEINARGS
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
server_args = in.telnetd
}

How to get USB devices to work in Linux or the ESX console

Here is how I’ve gotten a couple of cdroms / usb memory sticks / hard drives to work.

1) modprobe usb-ohci
Or
modprobe usb-uhci
(one of them should work, one may fail)

2) modprobe usb-storage

3) tail /var/log/messages
Or
dmesg
and you should see something like this:
Feb 8 14:50:56 supp15 kernel: Initializing USB Mass Storage driver…
Feb 8 14:50:56 supp15 kernel: usb.c: registered new driver usb-storage
Feb 8 14:50:56 supp15 kernel: scsi1 : SCSI emulation for USB Mass Storage devices
Feb 8 14:50:56 supp15 kernel: Vendor: SanDisk Model: Cruzer Mini Rev: 0.4
Feb 8 14:50:56 supp15 kernel: Type: Direct-Access ANSI SCSI revision: 02
Feb 8 14:50:56 supp15 kernel: VMWARE SCSI Id: Supported VPD pages for sdb : 0x1f 0x0
Feb 8 14:50:56 supp15 kernel: VMWARE SCSI Id: Could not get disk id for sdb
Feb 8 14:50:56 supp15 kernel: :VMWARE: Unique Device attached as scsi disk sdb at scsi1, channel 0, id 0, lun 0
Feb 8 14:50:56 supp15 kernel: Attached scsi removable disk sdb at scsi1, channel 0, id 0, lun 0
Feb 8 14:50:56 supp15 kernel: scsi_register_host starting finish
Feb 8 14:50:56 supp15 kernel: SCSI device sdb: 2001888 512-byte hdwr sectors (976 MB)
Feb 8 14:50:56 supp15 kernel: sdb: Write Protect is off
Feb 8 14:50:56 supp15 kernel: sdb: sdb1 Feb 8 14:50:56 supp15 kernel: scsi_register_host done with finish
Feb 8 14:50:56 supp15 kernel: USB Mass Storage support registered.

4) Now that we know that it’s sdb1,
Create the mountpoint directory:
mkdir /mnt/usb
Mount the device:
mount /dev/sdb1 /mnt/usb

That’s it. Your files should be in /mnt/usb. To check, just run ls /mnt/usb

In a case that you don’t have /dev/sdb1 there, which is what happened to me once with a Dell CDrom, I had to mknod the device.
After plugging the usb cdrom into the machine, /var/log/messages showed:

date hostname kernel: sr0: scsi3-mmc drive: 10x/10x cd/rw …..

Unfortunately, if you type: “mount /dev/sr0 /mnt/mountpoint”, it will say:
“mount: special device /dev/sr0 does not exist” and that doesn’t do us any good. So what I did after that was:
cd /dev
mknod sr0 b 11 0

With that, /dev/sr0 existed and hence I was able to run:
mount /dev/sr0 /mnt/mountpoint

or, I could run:
ln -s /dev/sr0 /dev/cdrom
and run:
mount /dev/cdrom /mnt/mountpoint

That’s it!