From owner-freebsd-questions@FreeBSD.ORG Tue Mar 2 15:47:57 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81F9D106566B for ; Tue, 2 Mar 2010 15:47:57 +0000 (UTC) (envelope-from news@nermal.rz1.convenimus.net) Received: from dd17730.kasserver.com (dd17730.kasserver.com [85.13.138.103]) by mx1.freebsd.org (Postfix) with ESMTP id 3CE568FC15 for ; Tue, 2 Mar 2010 15:47:56 +0000 (UTC) Received: from nermal.rz1.convenimus.net (f054166103.adsl.alicedsl.de [78.54.166.103]) by dd17730.kasserver.com (Postfix) with ESMTP id CBD5A186F2E89 for ; Tue, 2 Mar 2010 16:47:55 +0100 (CET) Received: by nermal.rz1.convenimus.net (Postfix, from userid 8) id 432E515236; Tue, 2 Mar 2010 16:43:56 +0100 (CET) To: freebsd-questions@freebsd.org Path: not-for-mail From: Christian Baer Newsgroups: gmane.os.freebsd.questions Date: Tue, 02 Mar 2010 16:48:09 +0100 Organization: Convenimus Projekt Lines: 41 Message-ID: NNTP-Posting-Host: jon.rz1.convenimus.net Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Trace: nermal.rz1.convenimus.net 1267544636 39650 192.168.100.9 (2 Mar 2010 15:43:56 GMT) X-Complaints-To: abuse@convenimus.net NNTP-Posting-Date: Tue, 2 Mar 2010 15:43:56 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.23) Gecko/20090812 Lightning/0.9 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 X-Enigmail-Version: 0.96.0 Subject: Did something in the hashes change from 6 to 8? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 15:47:57 -0000 Mellow greetings! On a box running FreeBSD 6.something (probably 6.4) the boot drive died. I had never bothered to update it to 7 or 8, since I was planning to build a new computer anyway. Since I hadn't done that yet and I still needed the work of this machine, I just put in a new drive and installed 8.0. The deal is that a script I restored from backup doesn't quite work as I think it should. This is the part that somehow causes problems: !/bin/sh stty -echo read -p "Enter passphrase: " passphrase stty echo main=`echo "${passphrase}" | sha256 | cut -c 1-5` if [ "${main}" != "ddfab" ]; then echo "Wrong passphrase!" exit fi I have typed the password in question about a gazillion times, so I am pretty sure I got it right. But somehow the 'if' keeps kicking in. There are two possible reasons for this: 1. I have Alzheimer's. 2. Something about the way sha256(1) and/or digest(1) or one of the other commands in the script react differenly than before. Maybe there is another reason that I just don't see? Can someone help me out here? Regards, Chris -- Ich kam. Ich ging. Und ich war da gewesen.