Oct 02 2009

The Most Common OpenSSL Commands

Tag:tepezcuintle @ 16:36

Hackers

The Most Common OpenSSL Commands

One of the most versatile SSL tools is OpenSSL which is an open source implementation of the SSL protocol. There are versions of OpenSSL for nearly every platform, including Windows, Linux, and Mac OS X. OpenSSL is commonly used to create the CSR and private key for many different platforms, including Apache. However, it also has hundreds of different functions that allow you to view the details of a CSR or certificate, compare an MD5 hash of the certificate and private key (to make sure they match), verify that a certificate is installed properly on any website, and convert the certificate to a different format.

Continua”The Most Common OpenSSL Commands”


Oct 02 2009

Useful OpenSSL Tricks

Tag:tepezcuintle @ 16:31

Gif

Introduction

OpenSSL deserves a lot of credit. It is an extremely useful, valuable Open Source project. When
people talk about how successful Apache is, rock-solid crypto toolkits like OpenSSL and OpenSSH should
also be mentioned. Here are a few (of the many) functions that I have found useful, along with examples of
how to use them:

Continua”Useful OpenSSL Tricks”


Apr 27 2009

Your File System became read only. What gives?

Tag:tepezcuintle @ 13:38

If your system abruptly loses power, or if a RAID card is beginning to fail, you might see an ominous message like this within your logs:

EXT3-fs error (device hda3) in start_transaction: Journal has aborted

Basically, the system is telling you that it’s detected a filesystem/journal mismatch, and it can’t utilize the journal any longer. When this situation pops up, the filesystem gets mounted read-only almost immediately. To fix the situation, you can remount the partition as ext2 (if it isn’t your active root partition), or you can commence the repair operations.

Continua”Your File System became read only. What gives?”


Jan 29 2009

Managing Init Scripts with chkconfig

Tag:tepezcuintle @ 16:06

chkconfig

—————————————————————————-

List all services on at run level 1:

# chkconfig –list | grep 1:on

—————————————————————————-

Enable a service:

# chkconfig cups on

—————————————————————————-
Continua”Managing Init Scripts with chkconfig”


Jan 09 2009

Optimizing NFS performance

Tag:tepezcuintle @ 21:20

This was very useful to me troubleshooting some nfs issues. I figured i post it here in case someone is having issues with NFS.

NFS Picture

Careful analysis of your environment, both from the client and from the server
point of view, is the first step necessary for optimal NFS performance. The
first sections will address issues that are generally important to the client.
Later (Section 5.3 and beyond), server side issues will be discussed. In both
cases, these issues will not be limited exclusively to one side or the other,
but it is useful to separate the two in order to get a clearer picture of
cause and effect.

Continua”Optimizing NFS performance”


Nov 21 2008

Troubleshoot with the lsof command

Tag:tepezcuintle @ 17:29

The Lsof Command is a great tool to troubleshoot your linux box. Check out these instructions that have saved me in the past

Problem:

You have a service that cannot bind to a port and the only message you have in log files is ‘port already in use’ or you have a need to find out exactly what processes are currently manipulating your server and what files they are affecting.

Continua”Troubleshoot with the lsof command”


Nov 14 2008

Turn off SE Linux

Tag:tepezcuintle @ 20:37

But SELinux can sometimes get
in your way. For example, I have had typical services, such as Apache, appear
to start up correctly, but remain inaccessible from the outside world because
I forgot to allow the apache user rights to open that port or maybe my distro
forgot about it. Before you turn off SELinux make sure you know why
you are turning it off and the security concerns you might be opening yourself
up to.

Continua”Turn off SE Linux”


Nov 10 2008

Removing ^M Characters from your Unix Text Files

Tag:tepezcuintle @ 15:24

The files you just uploaded to your server are a mess. The original author used a Windows machine and now they all look like this:

#header div {^M
padding-top: 50px;^M
}^M
#header div a {^M
font-size: 24px;^M
color: #fdfdfd;^M
font-weight: bold;^M

…and so on. If you’re like me you’ve found a few hundred Perl scripts to do this. I don’t know why, but I was never a fan of that method. So without further ado, I would like to introduce you to another candidate: the “tr” command, or the translate command. tr takes characters from the standard input stream, processes them, and the writes to the standard output. This means we can use all our favorite Linux/BSD command and just pipe and redirect our way to results.

Using tr’s -d (delete) option we can simply tell tr that we’re wishing to delete any occurrence of “\r” which is being displayed as ^M in your files. Here’s the super-simple command, using our old friend cat:

# cat file | tr -d "\r" > newfile

So have fun, and remember, if you’re sending these files up using FTP you can skip this step by doing an ASCII upload instead of a binary upload.


Oct 22 2008

The date command

Tag:tepezcuintle @ 14:00

`date’: Print or set system date and time
=========================================

`date’ with no arguments prints the current time and date, in the
format of the `%c’ directive (described below). Synopses:

date [OPTION]… [+FORMAT]
date [-u|--utc|--universal] [ MMDDhhmm[[CC]YY][.ss] ]

If given an argument that starts with a `+’, `date’ prints the
current time and date (or the time and date specified by the `–date’
option, see below) in the format defined by that argument, which is the
same as in the `strftime’ function. Except for directives, which start
with `%’, characters in the format string are printed unchanged. The
directives are described below.

* Menu:

* Time directives:: %[HIklMprsSTXzZ]
* Date directives:: %[aAbBcdDhjmUwWxyY]
* Literal directives:: %[%nt]
* Padding:: Pad with zeroes, spaces (%_), or nothing (%-).
* Setting the time:: Changing the system clock.
* Options for date:: Instead of the current time.
* Examples of date:: Examples.

********* From the Man Pages *****************************

DESCRIPTION
Display the current time in the given FORMAT, or set the system date.

-d, –date=STRING
display time described by STRING, not `now’

-f, –file=DATEFILE
like –date once for each line of DATEFILE

-I, –iso-8601[=TIMESPEC] output an ISO-8601 compliant date/time string.
TIMESPEC=`date’ (or missing) for date only, `hours’, `minutes’, or `seconds’ for date and time to the indi-
cated precision.

-r, –reference=FILE
display the last modification time of FILE

-R, –rfc-822
output RFC-822 compliant date string

-s, –set=STRING
set time described by STRING

-u, –utc, –universal
print or set Coordinated Universal Time

–help display this help and exit

–version
output version information and exit

Continua”The date command”


Oct 17 2008

Quick tutorial Joe Editor

Tag:tepezcuintle @ 18:30

Getting to Know Joe
Who (or what) is Joe?
Starting Joe
Getting Help
Exiting

Working with Blocks of Text
Mark Beginning
Mark End
Delete
Move
Copy
Write

Making Joe the Default Editor

Quick Reference
Movement
Find and Replace
Block
Deleting
Miscellaneous
Window Control
Macros
File Functions
Exit
Continua”Quick tutorial Joe Editor”


Next Page »