Visit Jeremy's Blog.
Go Back > Blogs
User Name



Reconciling block devices by major number / minor number

Posted 03-30-2012 at 05:20 PM by anomie


I had a task earlier this week to reconcile block devices between two directories. Simple - one can do so by reviewing major number / minor number, and then noting the match. Thus:

$ ls -l /dev/oracleasm/disks/ASMDISK2 
brw-rw---- 1 oracle dba 253, 267 Mar 21 13:58 /dev/oracleasm/disks/ASMDISK2

$ ls -l /dev/mapper/lun0015p1 
brw-rw---- 1 oracle dba 253, 267 Mar 21 13:52 /dev/mapper/lun0015p1
Senior Member
Posted in Uncategorized
Views 3658 Comments 0 anomie is offline

Rotating MySQL server log files

Posted 03-09-2012 at 06:09 PM by anomie

This may seem like an inconsequential, overly specific topic, but I'm posting here because - following a couple 'net searches - I observed a dearth of helpful information on MySQL server log file rotation. All the resources I found on the topic essentially said:
  • Use logrotate(8) -- 95% of the hits I found; or
  • Use "some_contrived_steps, not explained well" -- the other 5%

So I am sharing my own contrived steps here. There's nothing wrong with logrotate(8), in particular, but...
Senior Member
Posted in Uncategorized
Views 1856 Comments 0 anomie is offline

OpenLDAP and Perl

Posted 01-12-2012 at 05:15 PM by anomie
Updated 01-12-2012 at 05:19 PM by anomie

I recently deployed a slapd(8) instance, and immediately recognized the need for a robust directory entry management utility. After doing some reading and experimentation, I discovered that Perl - and a few accompanying modules - handle the job nicely. What I'm sharing here is a brief, rather disjointed synopsis and some code samples.

In order to understand and use the samples, you should be comfortable with Perl and the installation of modules. And you'll certainly want a good fundamental...
Senior Member
Posted in Uncategorized
Views 3452 Comments 0 anomie is offline

Quick-and-dirty symmetric encryption

Posted 01-27-2011 at 10:53 PM by anomie

Nothing earth shattering here. Just a quick automation utility I put together using the venerable openssl.

The wrapper script does a couple sanity checks, and saves you from having to remember command options for enc(1). You can change _cipher to suit your tastes / baked-in support.


# $Id: encrypt,v 1.3 2011/01/28 04:38:22 anomie $

# NOTE -
# Save this script in your users' PATH as
#       "encrypt"
Senior Member
Posted in Uncategorized
Views 1644 Comments 0 anomie is offline

Running an sftp-only daemon on RHEL5

Posted 01-08-2011 at 03:05 PM by anomie

The problem:
  • You're a RHEL5 sysadmin.
  • You want to run your regular ol' ssh daemon.
  • You also want to chroot a few sftp users.
  • You need the OpenSSH Match directive with support for the ChrootDirectory directive! This functionality exists as of OpenSSH version 5.1. [1]
  • Alas, your RHEL5 server still runs OpenSSH version 4.3p2. [2]


Some thoughts and a solution:

You can...
Senior Member
Posted in Uncategorized
Views 12612 Comments 0 anomie is offline


All times are GMT -5. The time now is 11:56 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration