From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lb0-x22c.google.com (mail-lb0-x22c.google.com [IPv6:2a00:1450:4010:c04::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Thu, 18 Sep 2014 15:45:18 +0200 (CEST) Received: by mail-lb0-f172.google.com with SMTP id p9so538364lbv.31 for ; Thu, 18 Sep 2014 06:45:18 -0700 (PDT) Received: from [172.30.42.23] (p5DD1E8DB.dip0.t-ipconnect.de. [93.209.232.219]) by mx.google.com with ESMTPSA id ua2sm4034770lac.35.2014.09.18.06.45.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Sep 2014 06:45:17 -0700 (PDT) From: "=?windows-1252?Q?Konstantin_Bl=E4si?=" Message-ID: <541AE1EB.5010201@gmail.com> Date: Thu, 18 Sep 2014 15:45:15 +0200 MIME-Version: 1.0 References: <1411000175.17610.0@smtp.gmail.com> In-Reply-To: <1411000175.17610.0@smtp.gmail.com> Content-Type: multipart/alternative; boundary="------------060905040802040204030203" Subject: Re: [dm-crypt] piping password to cryptsetup List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de This is a multi-part message in MIME format. --------------060905040802040204030203 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 09/18/2014 02:29 AM, frodowiz wrote: > i have been to so many forums to find a solution to this. all the > variations are confusing me and none are working. > i am trying to pipe a passphrase to cryptsetup using yad. > > pass1=`yad --form --title="Enter container passphrase" --height=50 > --width=350 --field=Password:H` > > then i strip out the pipe character present between yad variables > > pass="${pass1//|}" > > at this point the variable pass appears to be exactly what i want. > > later on i invoke cryptsetup with the passphrase variable piped to it. > > echo "$pass" | cryptsetup --cipher aes-xts-plain --key-size 512 --hash > sha512 --iter-time 5000 --use-random luksFormat "$container" - > > after a moment, i see the device pop into the selection in my file > manager then it dissapears. > > the funny thing is, i wrote a terminal only version using the same > methods minus the yad things and it works fine(see attached) > > terminal version requires 3 confirmations YES, passphrase, passphrase. > do i need to reproduce these confirmations even with a minus sign at > the end of the cryptsetup line? > > if so, would echo "YES"$'\n'"$pass"$'\n'"$pass"'\n' do this? > > also, if i replace the echo "$pass" pipe with xterm -e cryptsetup.... > it works fine. basically, i am not getting the password format piped > correctly. ive seen 7 different variations on this pipe and nothing is > working. its probably something with spaces but i am resorting to > email to lower my bloodpressure. also avoiding forums to lower my > heart rate :) > > thanks to anyone reading this. > Erik > > > _______________________________________________ > dm-crypt mailing list > dm-crypt@saout.de > http://www.saout.de/mailman/listinfo/dm-crypt Hi Erik, you want to use "echo -n" for piping the password without a trailing newline and "cryptsetup -q ..." in your scripts to avoid any additional user input. Konstantin --------------060905040802040204030203 Content-Type: text/html; charset="windows-1252" Content-Transfer-Encoding: quoted-printable
On 09/18/2014 02:29 AM, frodowiz wrote:<= br>
i have been to so many forums to find a solution to this. all the variations are confusing me and none are working.=A0
i am trying to pipe a passphrase to cryptsetup using yad.=A0

=A0pass1=3D`yad --form --title=3D"Enter container passphrase" --height=3D50 --width=3D350 --field=3DPassword:H`

then i strip out the pipe character present between yad variables

pass=3D"${pass1//|}"

at this point the variable pass appears to be exactly what i want.

later on i invoke cryptsetup with the passphrase variable piped to it.=A0

echo "$pass" | cryptsetup --cipher aes-xts-plain --key-size 512 --hash sha512 --iter-time 5000 --use-random luksFormat "$container" -

after a moment, i see the device pop into the selection in my file manager then it dissapears.=A0

the funny thing is, i wrote a terminal only version using the same methods minus the yad things and it works fine(see attached)

terminal version requires 3 confirmations YES, passphrase, passphrase. do i need to reproduce these confirmations even with a minus sign at the end of the cryptsetup line?

if so, would echo "YES"$'\n'"$pass"$'\n'"$pass"'\n' do this?=A0<= /div>

also, if i replace the echo "$pass" pipe with xterm -e cryptsetup.... it works fine. basically, i am not getting the password format piped correctly. ive seen 7 different variations on this pipe and nothing is working. its probably something with spaces but i am resorting to email to lower my bloodpressure. also avoiding forums to lower my heart rate :)

thanks to anyone reading this.
Erik


_______________________________________________
dm-crypt mailing list
dm-=
crypt@saout.de
http://www.saout.de/mailman/listinfo/dm-crypt
Hi Erik,

you want to use "echo -n" for piping the password without a trailing newline and "cryptsetup -q ..." in your scripts to avoid any additional user input.

Konstantin --------------060905040802040204030203--