Quick Links

Tip: Encrypted passwords, just add salt

You can generate encrypted password strings (hashes) using the openssl utility.

You need to supply both a “salt” string and the password you wish to encrypt:

# openssl passwd -1 -salt MoreSalt ThePassword
$1$MoreSalt$Cvu.5MdMq1BjAsFp1oc.f/

The following command line generates a random 8-character salt string:

# openssl rand -base64 6

Combine these into a single command line that uses a different random salt on each invocation:

# openssl passwd -1 -salt $(openssl rand -base64 6) ThePassword
$1$XpOpurgQ$41bulzoCV8viFy37EX6jk.

Read on for a comparison between old crypt()-style passwords and the current md5-style shadow passwords.

Configure Wake-on-LAN on Red Hat Enterprise Linux

Wake-on-LAN is a useful feature on most network cards that allows you to remotely boot up a computer.

The ethtool utility (found in the ethtool RPM) can tell you if your network card supports Wake-on-LAN:

[root@example]# ethtool eth0
Settings for eth0:
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: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: umbg
Wake-on: d
Current message level: 0×00000007 (7)
Link detected: yes

Look for the “Supports Wake-on” line. It should list one or more letters, including “g” (WoL using Magic Packet). In the example above, Wake-on-LAN is currently [...]

Continue reading Configure Wake-on-LAN on Red Hat Enterprise Linux

How to disable the DHCP server on VMware Fusion 3

VMware Fusion 3 on Mac offers three kinds of networking: bridged, NAT and host-only.

When using host-only networking, VMware Fusion runs a DHCP server for you on the virtual network “vmnet1“. By default, this daemon hands out IP addresses in the 172.16.115.0/24 network.

There are no settings in Preferences to configure or disable the DHCP server. This causes problems when trying to run your own virtualized DHCP server or PXE boot environment on the host-only network.

The VMware DHCP server can be disabled either temporarily or permanently. For a temporary fix (until you restart Fusion), end the DHCP server process. Open a Terminal [...]

Continue reading How to disable the DHCP server on VMware Fusion 3

CFengine3 tip: “Redefinition of a constant variable”

The CFengine3 learning curve is steep and slippery.

Let’s say you want to define a default policy for your hosts, and a more specialized policy for certain hosts. Your implementation might look like this:

# CFengine3 Test Policy
body common control
{
bundlesequence => { “test” };
}

bundle agent test
{
vars:

“base_list” slist => { “one”, “two”, “three” },
comment => “All systems can count one-two-three”;

redhat::
[...]

Continue reading CFengine3 tip: “Redefinition of a constant variable”

Dropbox Tip: 1Password Sync

I’m a great fan of both 1Password and Dropbox, so what’s better than combining the goodness of both?

If you have multiple computers running 1Password, you’ll love how easy it is to set up password syncing using Dropbox. The 1Password team recommends Dropbox over MobileMe or iDisk, so I decided to follow their lead.

As an extra feature, you’ll even get “1PasswordAnywhere”…