This is ridiculous!
These Deep Web stories never cease to amaze me!
This is pretty crazy man!
This is pretty incredible but totally what you’d expect from somebody like him
I’ve been setting users passwords successfully on CentOS/RHEL from within my kickstarts, using entries like this:
echo p4ssw0rd | passwd --stdin username
… however, that unfortunately doesn’t work on at least Ubuntu (and possibly many other distros as well).
Now — finally — and thanks to this comment, I have an answer; and it looks something like this:
echo username:password | chpasswd
(Note that I’ve only ever done this on CentOS 6.2. It should work in a lot of other places too though, especially other RHEL based distros.)
I really wanted to use the Smokeping init script that comes with Ubuntu 10.04.* LTS on a CentOS 6.2 box. One look at it, however, and you will very quickly realise that out-the-box that isn’t something which is likely to work, possibly for other reasons, but definitely because you don’t have “start-stop-daemon” on a CentOS box; not yet at least
This helpful post suggested that if you pull the dpkg source from one of the Debian mirrors then you could build it, albeit quite nastily, and end up with a successful build of start-stop-daemon. However, it doesn’t have to build so nastily. Newer versions of dpkg build cleanly, as I discovered and have detailed below. As root or using sudo, do the following:
wget -c "http://za.archive.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_126.96.36.199ubuntu3.tar.bz2"
tar jfxvh dpkg_188.8.131.52ubuntu3.tar.bz2
./configure --without-install-info --without-update-alternatives --without-dselect
make && make install
Now if you type “which start-stop-daemon” you should discover that it’s built and installed into /usr/local/sbin, and works perfectly just like it’s supposed to. And with that hurdle out the way, I could now finish getting that Ubuntu init script working on CentOS. Happy time