Marc 'Zugschlus' Haber: Booting from USB stick on older hardware

This usually happens in the late evening CEST. In the next cron-apt run, things are fine again. What’s going on here? Is this part of a mirror update process where the Release and Release.gpg files are inconsistent? Any idea how to get rid of these error messages?CRON-APT LINE: /usr/bin/apt-get update -o quiet=2 W: GPG error: http://debian.debian.zugschlus.de lenny Release: The following signatures were invalid: BADSIG A70DAF536070D3A1 Debian Archive Automatic Signing Key (4.0/etch) W: GPG error: http://debian.debian.zugschlus.de sid Release: The following signatures were invalid: BADSIG A70DAF536070D3A1 Debian Archive Automatic Signing Key (4.0/etch) W: You may want to run apt-get update to correct these problems
We’ve been getting many many strange mailman-bounces. It seems that somewhere the mailman-bounces address is mis-configured. It should be [EMAIL PROTECTED], but mail seems to be sent as [EMAIL PROTECTED] (note missing “u”). That’s causing bounces to bounce all over the place...which has better not been archived at all - it doesn’t help when vital information is removed from the archived mail. Yes, this example was taken from an actual archive entry. Sheesh.
"I think I'm going to stop being responsive to users. They're not worth the blood pressure."Andrew Suffield:
"But realistically, all that is fairly minor compared to the number of idiot users, idiot developers, kooks, luddites, zealots, managers, politicians, and self-obsessed fools that everybody has to deal with in the free software world."I think I have a new source of blunt put-downs.
I mean, this user hasGreat job breaking exim4 on my system with no easy way to fix it. $ /etc/init.d/exim4 start Starting MTA:DEBCONFsomethingDEBCONF found in exim configuration. This is most probably caused by you upgrading to exim4 4.67-3 or later without accepting the suggested conffile changes. Please read /usr/share/doc/exim4-config/NEWS.Debian.gz for 4.67-2 and 4.67-4 2007-07-17 11:31:57 Exim configuration error in line 25 of /var/lib/exim4/config.autogenerated.tmp: malformed macro definition Invalid new configfile /var/lib/exim4/config.autogenerated.tmp, not installing /var/lib/exim4/config.autogenerated.tmp to /var/lib/exim4/config.autogenerated I’ve been running exim4 v4.63 for awhile now and only have you bugger exim4-config it doesn’t work.
exim4 (4.67-2) experimental; urgency=low
- update-exim4.conf:
- finally get rid of the DEBCONFfooDEBCONF stuff. That information
is now passed to the configuration by ue4c by directly setting exim
macros in the configuration. This has caused both the configuration
and ue4c to be much shorter.
- run with -e, -C and -u.
- convert input read from update-exim4.conf.conf to lower case
- barf if strange characters are found in ue4cc. Closes: #400294
- Remove superfluous “x$foo” = “xbar” constructs from scripts
- Add routers to reject mail to accounts with low UID.
Closes: #400790.
- Make daily cron job barf if /usr/bin/mail is not found. Have
exim4-base recommend mailx. Closes: #427960
- Have all -daemon packages provide exim4-localscanapi-1.0 and
exim4-localscanapi-1.1 as requested by Magnus Holmgren while fixing
#426425. Also include exim4-localscan-plugin-config script with
exim4-dev. Thanks to Magnus for helping with this. Closes: #428274
- remove /etc/exim4/email-addresses symlink and document this.
Thanks to Josip Rodin. Closes: #420578
- introduce conf.d/250_exim4-config_lowuid which optionally allows
to reject (or alias away) mail to low-uid accounts that are not
listed in an exception list. Thanks to Dominic Hargreaves,
Marc Sherman and Ross Boylan. Closes: #400790, #307768, #331716
- remove versioned depends on cron, since the version we need is
well before sarge.
- Add cron fcron dependency. Fcron is going to be removed again
at the first sign of trouble. Closes: #381806
- remove move_exim3_spool debconf template. Closes: #391762
- replace openssl gendh with openssl dhparam. Closes: #413235
- adapt docs, README and manpages
- have Hilko fix the lynx-dump postprocessing to repair generating
README.Debian text version. Thanks!
- increase README.Debian generation robustness. Thanks to Hilko.
- debconf:
- Partly apply Christian Perrier’s patch for reviewed
templates and control file. Closes: #426980
- Other minor template changes.
- get rid of “mails” in debconf templates, use “messages” instead.
Re-word local_interface debconf template. Other minor changes.
Thanks to Jens Seidel and Christian Perrrier. Closes: #394976
- re-work exim4-config.config logic to have split/non-split config
asked last instead of first. This partly addresses #410756.
- Add exim4-daemon-heavy.templates, exim4-daemon-light.templates
and exim4.templates to POTFILES.in
- Re-Word dc_other_hostnames debconf template.
Thanks to Hans G. Ehrbar. Closes: #421860
- translation updates:
- French
- Ukrainian. Closes: #427793
- Bulgarian.
- Thai.
- Galician.
- Swedish.
- Punjabi.
- Indonesian.
- Italian.
- Khmer.
- Traditional Chinese. Closes: #428072, #428069.
- Portuguese.
- Simplified Chinese. Closes: #428072, #428069.
- Marathi
-- Marc Haber <mh+debian-packages@zugschlus.de> Wed, 13 Jun 2007 14:00:38 +020
0
Yes, this needs some more documentation and generalization. But it’s just a proof of concept that needs some polishing before being put into real life use. Here are the two template files for wiki page and contents page:#!/bin/bash set -e set -C set -u JOBNAME=“update-wiki-firewall-config” DWPAGE=“php4 /usr/share/dokuwiki/bin/dwpage.php” TMPBASE=“/tmp” SSHID=“$HOME/.ssh/$USER-passphraseless-$(hostname)” REMOTEHOST=“remote.fqdn.example” REMOTEJOB=“pull-netfilter-init-config-tar” SHAREDIR=“$HOME/share/$JOBNAME” WIKINAMESPACE=“pointer:to:namespace” start=’/*BEGIN generated firewall rules */’ end=’/*END generated firewall rules */’ insert=’/*INSERT generated firewall rules */’ umask 077 if ! TMPDIR=“$(mktemp -d $TMPBASE/fwconfig.XXXXXXXXXX)”; then echo >&2 “ERR: cannot create temp dir in $TMPBASE” exit 1 fi cd $TMPDIR mkdir remote ssh -i $SSHID root@$REMOTEHOST $REMOTEJOB \ tar --extract --gzip --file - --directory remote mkdir workdir touch workdir/rulelistfile echo “$start” >> workdir/rulelistfile for fwfile in $(find $TMPDIR/remote/rules/up -type f sort); do MTIME=“$(stat --format=”%y“ $fwfile)” PROSEEXPLANATION="$( $fwfile sed -n '/^#::#/ s/^#::#[[:space:]]*//;p;q; ')" if [ -z "$PROSEEXPLANATION" ]; then PROSEEXPLANATION="netfilter-init internal code" fi rm -f workdir/newwikipage $SHAREDIR/wikipagetemplate \ sed \ -e "s PLHfilenamePLH $(basename $fwfile) " \ -e "s PLHproseexplanationPLH $PROSEEXPLANATION " \ -e "s PLHmtimePLH $MTIME " \ -e "/PLHcontentsPLH/r$fwfile" \ -e "s/PLHcontentsPLH//" \ > workdir/newwikipage WIKIPAGENAME=“$WIKINAMESPACE:regeln:$(basename $fwfile .rul)” $DWPAGE checkout $WIKIPAGENAME workdir/wikipage if ! cmp --quiet workdir/wikipage workdir/newwikipage; then cp workdir/newwikipage workdir/wikipage $DWPAGE -m “new contents imported from $fwfile” commit workdir/wikipage $WIKIPAGENAME fi echo “ * [[$WIKIPAGENAME $(basename $fwfile)]] - $PROSEEXPLANATION” >> workdir/rulelistfile done echo “$end” >> workdir/rulelistfile $DWPAGE checkout $WIKINAMESPACE workdir/contentspage.txt workdir/contentspage.txt \ sed -e "\ ^$ start//\\*/\\* \$ ,\ ^$ end//\\*/\\* \$ d; " \ sed -e "\ ^$ insert//\\*/\\* \$ rworkdir/rulelistfile" \ > workdir/newcontentspage.txt if ! cmp --quiet workdir/contentspage.txt workdir/newcontentspage.txt; then cp workdir/newcontentspage.txt workdir/contentspage.txt $DWPAGE -m “new contents page” commit workdir/contentspage.txt $WIKINAMESPACE fi cd / rm -rf “$TMPDIR”
====== Firewallregeln PLHfilenamePLH ======
Last changed on target system: PLHmtimePLH
PLHproseexplanationPLH
<code>
PLHcontentsPLH
</code>
===== Dump of firewall rules =====
/*INSERT generated firewall rules */
/*BEGIN generated firewall rules */
/*END generated firewall rules */
The index page template relys on the HiddenComment dokuwiki plugin to be installed, or the placeholders show up in the
rendered wiki page. The code uses the first comment line marked with #::# to generate a short explanation of the file
being pulled into the wiki. dwpage.php is a fully-fledged command line interface to dokuwiki, committed new pages are
fulled versioned as if entered through the wiki web front end. This way, the documentation in the wiki is guaranteed to
be current and to fit the configuration found on the live system - it is directly pulled from the live system.
Yes, rendering of the code is currently suboptimal. Working on it.
K: “What are you doing today?” Me: “Taking some training in using a commercial spam filter appliance.” K: “It’s all Spam. Autodelete everything.”Next thing I remember was the trainer asking why I was laughing so hysterically.
sudo grml-crypt start /media/usb4/cryptoloop $MOUNTPOINTGotcha: don’t confuse sudo’s “password” prompt with grml-crypt’s “Enter LUKS passphrase” prompt, the cryptoloop password won’t bring you anywhere on the sudo prompt. Preparing the CA directory For the CA, create a dedicated directory in the mounted cryptoloop file system. You’re originally supposed to copy the entire EasyRSA directory tree in there, but I’d recommend to only link the files from your system’s EasyRSA directory to automatically take advantage of distribution updates. You’ll need at least these links:
lrwxrwxrwx 1 mh mh 56 Dec 25 23:23 openssl.cnf -> /usr/share/doc/openvpn/examples/easy-rsa/2.0/openssl.cnf lrwxrwxrwx 1 mh mh 52 Dec 25 23:22 pkitool -> /usr/share/doc/openvpn/examples/easy-rsa/2.0/pkitool lrwxrwxrwx 1 mh mh 60 Dec 25 23:23 whichopensslcnf -> /usr/share/doc/openvpn/examples/easy-rsa/2.0/whichopensslcnf
Configuring your CA The only thing you cannot link is the vars file which contains your CA’s local settings:ln -s /usr/share/doc/openvpn/examples/easy-rsa/2.0/openssl.cnf . ln -s /usr/share/doc/openvpn/examples/easy-rsa/2.0/pkitool . ln -s /usr/share/doc/openvpn/examples/easy-rsa/2.0/whichopensslcnf .
Comments have been removed from this file. Better copy the file from /usr/share/doc/openvpn/examples/easy-rsa/2.0/vars and edit it to your needs. I added the two PKCS11 variables since you won’t otherwise be able to issue certificate requests. Creating the CA Next, decide on a shell instance where you will do most operations, and source vars in there. Next, run /usr/share/doc/openvpn/examples/easy-rsa/2.0/clean-all. If you do this in a directory of an already-in-use EasyRSA CA, you’ll need to restore your backup. To actually initialize the CA, run pkitool --initca --pass. If you do not give the --pass parameter, you’ll create a CA that can issue certificates without asking for a passphrase, which might not be a brilliant idea. Choose a reasonably secure pass phrase. Creating Certificates - the simple and suboptimal way You can now simply proceed to create an arbitrary number of pairs of “private” keys and associated certificate by simply calling pkitool <clientname> and/or pkitool --server <servername>. Depending on your security policy, you can mandate the private keys to be protected by a passphrase (adding --pass to the command lines), but you’ll have the expense of being asked for the passphrase every time you start a new openvpn daemon. Creating Certificates the Right Way I have put the “private” in quotes since the keys created this way are not really private: The key was created on the box hosting the CA, was stored on the local (crypted) file system and needs to be moved to the target system via a secure channel. Doing so the right way is harder than expected, so it is usually the better way to keep the private key really private by creating it directly on the target system. On the target system, you need OpenVPN installed, and openssl. After the certificate was created, you can remove openssl again. Creating a private key is part of a key-pair generation process that also leaves a certificate request. The contents of the certificate request is public, and you can safely move it to the CA box and convert it to a certificate by signing the request. You only need to make sure that nobody exchanges your target system’s certificate request for her own before you sign it as you might end up certifying a wrong identity. For the rest of this document we’re going to assume that you have ssh access to the target system and have verified the ssh host key, so that you can be reasonably sure to be connected to the right system. To create a certificate request, you can use this script, which I have called create-easyrsa-cert-req:export EASY_RSA=“$(pwd)” export OPENSSL=“openssl” export PKCS11TOOL=“pkcs11-tool” export GREP=“grep” export KEY_CONFIG=$($EASY_RSA/whichopensslcnf $EASY_RSA) export KEY_DIR=“$EASY_RSA/keys” # Issue rm -rf warning echo NOTE: If you run ./clean-all, I will be doing a rm -rf on $KEY_DIR export KEY_SIZE=1024 export CA_EXPIRE=3650 export KEY_EXPIRE=3650 export KEY_COUNTRY=“DE” export KEY_PROVINCE=“” export KEY_CITY=“” export KEY_ORG=“Zugschlus.de” export KEY_EMAIL=“mh+easyrsa-mh-openvpn@zugschlus.de” export PKCS11_MODULE_PATH=“dummy” export PKCS11_PIN=“dummy”
When called without parameters, it creates a certificate request for an OpenVPN client certificate, and when you call it with “server” as parameter, it will create a server certificate request. In any case, it will leave two files in the current directory. They are named after the current host name, and have the extensions .csr and .key. The .key file is your private key. keep it private! The .csr file is the certificate request which you can now move to the keys subdirectory of your CA directory via scp or other means such as an USB stick. To do the actual signing, invoke pkitool --sign <hostname> and enter the CA passphrase. You can ignore the error message that there was no .key file to chmod. Gotcha, when signing a server certificate, use pkitool --server --sign <hostname>. Move Certificate to the target host You can now move the certificate to the target system. Since you’re probably going to need the root certificate and the certificate revocation list as well, you can move the .key file (if created on the CA system), the .crt file, and ca.crt to the target system. These files are public, so there is no need for a secure channel. Revoking Certificates Since an OpenVPN server’s only means of authentication is to check whether the certificate presented by a client is signed by the “right” CA, the only way to revoke VPN access is to revoke the certificate. This is also done on the CA system by calling /usr/share/doc/openvpn/examples/easy-rsa/2.0/revoke-full <client-name>. This creates a crl.pem file which contains a list of all revoked certificates. You need to have a mechanism to distribute that list to all systems that might need it, and it is recommended to have this automated. Remember, if you do not distribute the .crl file, the systems are not going to know about revoked certificates.#!/bin/bash set -u TMPDIR=“/tmp” export OPENSSL=“openssl” export PKCS11TOOL=“pkcs11-tool” export GREP=“grep” export KEY_CONFIG=“/usr/share/doc/openvpn/examples/easy-rsa/2.0/openssl.cnf” export KEY_DIR=“$TMPDIR/keys.$$” mkdir -p $KEY_DIR export KEY_SIZE=1024 export KEY_EXPIRE=3650 export KEY_COUNTRY=“DE” export KEY_PROVINCE=“” export KEY_CITY=“” export KEY_ORG=“Zugschlus” export KEY_OU=“$(hostname --fqdn)” export KEY_EMAIL=“mh+$(hostname)-ovpn-cert@zugschlus.de” export DEBUG=1 umask 077 if [ “$ 1:-foo ” != “server” ]; then /usr/share/doc/openvpn/examples/easy-rsa/2.0/pkitool --csr $(hostname) else /usr/share/doc/openvpn/examples/easy-rsa/2.0/pkitool --csr --server $(hostname) fi mv $TMPDIR/keys.$$/* . rm -rf $TMPDIR/keys.$$
Next.