What is Minimalism?

To me, that is an odd – and existential – question, along the lines of the eternal question “What is art?”

I answer this question this way: It is what you define it to be.

In redefining myself, I have begun to make some changes that contribute to my own definition of living in a minimalist way:

Reduce ownership. This is a first and easy to enumerate step. Don’t keep a hundred different types of clothes when just a few will do. Don’t keep twenty separate computers when you only need a couple. This is a constant battle, but it is worth it.

Reduce purchasing. The goal of business is to get people to buy – and buy and buy. Thus, when a business says you need to get something, think twice. This also holds for updates and upgrades. Buy things that don’t require constant updates or upgrades. Buy items that don’t force you to buy only one very specific item (such as room deoderizers that only work with a single refill item). See if you can last a week without buying anything.

Reduce usage. Don’t use the dishwasher or the clothes dryer if you don’t have to. These contribute to electricity usage, and thus increase your costs and your impact on the environment. (Just remember to use the dishwasher once in a while or it will require expensive repair.)

Reduce the unneccessary. Do you really need a couch? Or those extra lamps? Re-evaluate every item to see if you need it. Don’t rule out anything categorically – think. Do you really need it? Dump if you don’t – and before you change your mind: give it to Goodwill.

There are a number of blogs that cover minimalism:

One of my inspirations has been homes like Tumbleweed Homes. If a person can live in one of these, certainly the rest of us can reduce our personal clutter down a lot further than it is today. A counter-inspiration for me is also the current crop of homes that are still being built today – homes that are so big that cities and counties are passing laws limiting house size.

Most importantly, minimalism is what you make it. You define what it means to you.

Generating Passwords Using crypt(3)

When writing things like Red Hat Kickstart scripts, or using useradd, or in many other cases, a password is required in the format generated by crypt(3). However, how do we generate a password in this format? In fact, there are many, many ways – if you just know what they are.

One way is to use mkpasswd. This utility is made just for this very purpose; to generate a password with crypt(3) use the command:

mkpasswd

The program will ask for a password, and generates a crypt(3) output string.

If you have the Apache web server loaded, you can use htpasswd. Use this command

htpasswd -nd user

The name of the user doesn’t matter, as it is the password we want. The output will be in the format user:password; just copy the password and you’re set.

If you have OpenSSL available, you can use the openssl command:

openssl passwd -crypt myPassword

Replace myPassword with the password you want to encrypt.

The other methods all require putting the password into the command line in plain text. This can be a problem: the process list (seen using ps) will have the password in it as long as the program runs. The password will also go into the shell history.

One way around this – with programming languages – is to use a script or to use the language’s interpreter.

Using Perl:

perl -e "print crypt('password','sa');"

Perl requires a salt ('sa' in the example).

Ruby can generate a crypt-formatted password, but it requires a salt:

ruby -e 'print "password".crypt("JU"); print("\n");'

Using PHP, you can generate a password from the UNIX command line this way:

php -r "print(crypt('password','JU') . \"\n\");"

Note that if you do not provide a salt ('JU' in the example) then the string returned may not be in crypt format, but rather in MD5 format. Thus, while the salt is an optional parameter, it is necessary in this case.

Using Python requires importing the crypt library – and it requires a salt:

python -c 'import crypt; print crypt.crypt("password","Fx")'

Again, the salt in this case is the second parameter or "Fx".

Databases can generate crypt passwords too; using MySQL it can be done like this:

echo "select encrypt('password');" | mysql

For Tcl there are a number of options; if you are using Ubuntu, you could give the trf package a try. If using Lua, there is the lua-crypt extension.

Feel free to add other options below – with working command-line examples.

Using example domains

People have put example domains in all kinds of programs and servers, often using example.com, example.net, or example.org – along with such as test.com, anywhere.com, anywho.com, somewhere.com, anytownusa.com, and so on.

All of these are domains that resolve and have actual servers up and running on the Internet. Of those mentioned previously, only example.com, example.net and example.org are preserved for testing purposes by IANA in RFC 2606.

Better yet, when using example email addresses avoid any surprises by using one of these domains specified in RFC 2606:

  • .example (for documentation)
  • .test (for testing purposes)
  • .localhost (for sending to the local host)
  • .invalid (for creating guaranteed invalid domain names)

If you use these domains, you won’t have to worry about mail going out that wasn’t supposed to go out. I’ve seen this happen before – a configuration file sent out with an open source server sends mail to an example address – which address turns out to go to a valid domain on the Internet, where it is accepted by the mail host.

Don’t get caught by this mistake! Use the RFC 2606 domains wherever needed, and don’t make one up of your own.

Follow

Get every new post delivered to your Inbox.

Join 114 other followers