Torsten Werner: Improving password security in Debian
Most readers probably have installed Debian version 5.0 (Lenny) or an older version and are using shadow passwords with the md5 hash algorithm. This is not bad but not good enough. You can find out the details by looking at /etc/passwd and /etc/shadow (as root). The second column in these files should be a simple character x in /etc/passwd and a string like $1$biMft/Pr$Lo3zPpiItdLZrzx8t/mTy0in /etc/shadow. The number 1 between the 1st and 2nd $ sign means md5, the following string biMft/Pr is the salt and the last string Lo3zPpiItdLZrzx8t/mTy0 is the actual hash for the password ('testmd5' in this case). The salt is used to avoid attacks based on precomputed hash tables.
The package pam has switched to the stronger sha512 algorithm in version 1.1.0-2 on 31st august 2009. Look for a line like
password [success=1 default=ignore] pam_unix.so obscure sha512in file /etc/pam.d/common-password if you have installed at least version 1.1.0-2. After changing the password I have the new password string
$6$qjc5gFgK$vaz/gLKMyDuhsVOU2oVIkDZrD0.reJM.2Ft3CMEoAsjN/lenvHC2ls6g/MY1ZaYaYBP3HHDOxel1dvTerl17q1in /etc/shadow. The number 6 means sha512 and the hash
vaz/gLKMyDuhsVOU2oVIkDZrD0.reJM.2Ft3CMEoAsjNlenvHC2ls6g/MY1ZaYaYBP3HHDOxel1dvTerl17q1is much longer than before.
The pam_unix module in combination with the sha algorithms allows specifying the number of rounds for hashing the password with the argument rounds=... which defaults to 5000. My current machine needs about 20 milliseconds to hash my password. That can be tested with the command
/usr/bin/time -f %U su testmd5 -c trueI have changed the number to 1 million
password [success=1 default=ignore] pam_unix.so obscure sha512 rounds=1000000to make brute force attacks more difficult. After changing the password again the string is
$6$rounds=1000000$Va4plzLi$EtixueZQ1ZQlzQa7eHHsG6UcNvu.EnuCqM79kIyUe82eAZ.JNegn4SBY1RduYlACs0RWLFHD4d//PzQXMsCqk0with the number of rounds embedded. The su command needs 1.79 seconds now which is an acceptable delay for the login process considering the improved security.
Don't forget to change the root password too if you have set one.
With the help of a couple of friends, we ve put a 4.5T RAID-5 machine on our network and I m trying to figure out how to share the storage with the rest of the hosts. In the past, I have used NFS and CIFS/Samba to provide access to remote hosts. This has generally worked okay so long as the server stays online.
I don t know if the results are going to be much different, but I am now trying a different approach. I plan to run an iSCSI server, and I ve already configured AoE (ATA over Ethernet). I ve exported a block device on the network segment and mounted it on a remote host. This was pretty easy to configure. There is a bit of documentation on the internet already, but I ll give another quick overview.
I gave the storage server the unoriginal name san0 . This host is running debian lenny. I am testing the configuration from my debian sid development host, which has the similarly unoriginal name dev0 . So, think server when you see san0 and client when you see dev0 .
I assume that you ve already got an LVM volume group set up. Mine is called vg0 . Correct the following examples to account for any differences. You can use disk partitions instead of LVM logical volumes.
Yes, aptitude can list packages by priority, but what I wanted was a simple list of just package names. I've got two ways of getting a bare list:
As a standalone browser, it may look quite similar to 


It was interesting to see Clint Adams
I'm a notoriously late adopter of new technologies. Sure, if I
think that something is potentially a good idea, I'll go for it,
but for the most part, I assume that things are stupid. I refused
to use the WWW for many years, thinking it was idiotic. Now I use
the WWW. I find microblogging to be inane and narcissistic at best,
but I have derived mild amusement from Shaq on Twitter. Microsoft
Windows is something I thought would be ridiculously unsuccessful,
because it didn't do anything I would find useful.
The list goes on and on, and includes something known in the popular
vernacular as configuration management . I've been hearing about
BladeLogic and Opsware for quite some time, and idly wondering who
the incompetent fools are that need something like this. Back in
my day we could manage 100 servers with relative ease; no centralized
authentication (because it was a running argument about whether
NIS sucked more than NIS+ or vice-versa), no cfengine, no prebuilt
server images or any of that jazz. If, for some reason, we needed
to make the same change to all servers at once, or some subset thereof,
we would just script it.
So when one of my acquaintances started raving about Puppet, I
assumed it was equally pointless. We'll call him Downs.
Downs exhibits a pattern of behavior where he will rave about
something for a few weeks, sometimes without having even tried
it first, and then eventually become disillusioned with it and
start ranting with the same fervor with which he had insisted
that whatever fad of the week was the greatest thing ever.
It came as no surprise to me when he fell out of love with
Puppet and started raving about how much better Chef is.
In case you're wondering, he still has not tried Chef to
this day.
Finally someone convinced me of the value of Puppet. I do not
think it is the Way and the Light, but I do see a few situations
wherein it makes sense to sacrifice efficiency, flexibility,
sanity, and system resources to gain a way of building a
near-identical machine from scratch. Now, beyond the flaws
inherent to a solution like this, Puppet does have some annoying
flaws which I find unnecessary, and which Downs ranted about back
when I had absolutely no idea what he was talking about.
I disregarded his alleged preference for Chef, but I have heard
intelligent people extoll the virtues of Chef, and to a lesser
extent Bcfg2. So I took a very brief look at each of those, and
was pretty much horrified by what I found.
If I need something Puppet-like in the very near future, I will
probably be choosing Puppet. I have no intention of running
Puppet on machines I manage all by myself though.
For that eventuality I am NIHing something with what I consider
a better design. The current code is published, but it does
not do very much, and requires linking with libdpkg.a which does
not exist in any package (but Guillem's working on that, I think).
I have no idea whether or not I'll have the motivation to finish
it all by myself, but it is Free Software.
This post is intentionally weak on details, or deets as the
kids call them.