From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 9CD0959CAF for ; Wed, 6 Apr 2016 08:59:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5250F21C090; Wed, 6 Apr 2016 08:59:06 +0000 (UTC) Received: from smarthost01b.mail.zen.net.uk (smarthost01b.mail.zen.net.uk [212.23.1.3]) by pigeon.gentoo.org (Postfix) with ESMTP id F249B21C053 for ; Wed, 6 Apr 2016 08:59:03 +0000 (UTC) Received: from [82.69.83.178] (helo=mail.digimed.co.uk) by smarthost01b.mail.zen.net.uk with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1anjIk-000Eza-Sb for gentoo-user@lists.gentoo.org; Wed, 06 Apr 2016 08:59:03 +0000 Received: from digimed.co.uk (fenchurch.digimed.co.uk [192.168.1.6]) by mail.digimed.co.uk (Postfix) with ESMTPA id B1BF03E6188 for ; Wed, 6 Apr 2016 09:59:01 +0100 (BST) Date: Wed, 6 Apr 2016 09:58:57 +0100 From: Neil Bothwick To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] lftp -u user,pass(word Message-ID: <20160406095857.65c11502@digimed.co.uk> In-Reply-To: <5704C570.2090607@gc-24.de> References: <5703B2ED.5070009@gc-24.de> <20160405135236.41ee6626@digimed.co.uk> <5703FE90.5010404@gc-24.de> <2060950.47PH9WsnKc@dell_xps> <5704C570.2090607@gc-24.de> Organization: Digital Media Production X-Mailer: Claws Mail 3.13.2-105-g3e2337 (GTK+ 2.24.30; x86_64-pc-linux-gnu) X-GPG-Fingerprint: 7260 0F33 97EC 2F1E 7667 FE37 BA6E 1A97 4375 1903 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/6_YQH53XsUIxv3KSR+4=DG1"; protocol="application/pgp-signature" X-Originating-smarthost01b-IP: [82.69.83.178] X-Archives-Salt: 353c0ec1-7b2a-40d8-80b3-82051fa9c7e2 X-Archives-Hash: 59eb0556f3bdbeff26add4651812c617 --Sig_/6_YQH53XsUIxv3KSR+4=DG1 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 6 Apr 2016 10:14:40 +0200, hw wrote: > Mick schrieb: > > On Tuesday 05 Apr 2016 20:06:08 hw wrote: =20 > >> Neil Bothwick schrieb: =20 > >>> On Tue, 5 Apr 2016 14:43:25 +0200, hw wrote: =20 > >>>> how do you use lftp (to mirror a remote site) > >>>> when the password you have contains a bracket? > >>>> > >>>> I'm trying 'lftp -u user,pass(word ftp.example.com', and > >>>> there appears to be no way to escape characters in the > >>>> password. Using single quotes also doesn't work, same > >>>> as 'lftp 'ftp://user:pass(word@example.com'. =20 > >>> > >>> Try lftp 'ftp://user:pass\(word@example.com' > >>> or lftp ftp://user:pass\\\(word@example.com > >>> > >>> The \ escapes the ( and the single quotes protect it fro the shell. > >>> In the second way, you escape the \ as well. =20 > >> > >> That's what I thought :) I already tried and it didn't > >> work. =20 > > > > Did you try putting single/double quotes around passwd only? > > =20 >=20 > Yes, that didn't work, either. I had a quick look at the man page and it says that parentheses can be used to group commands, so maybe lftp is misinterpreting the ( in this way. However, the man page also advises against giving the password on the command line (because it is then available to anyone with normal user shell access while the command is running) and suggests using either ~/.netrc, which you have already said works, or $LFTP_PASSWORD along with --env-password. Have you tried this? LFTP_PASSWORD=3D'pass(word' lftp --env-password -u user ftp://example.com --=20 Neil Bothwick Isn't it a bit unnerving that doctors call what they do "practice?" --Sig_/6_YQH53XsUIxv3KSR+4=DG1 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlcEz9EACgkQum4al0N1GQMo5ACfYfapRQnRvnmRllRyEvZY2dTq qy0An1VOYjSkHomK5QPgT7i73jcLsK0q =xZKZ -----END PGP SIGNATURE----- --Sig_/6_YQH53XsUIxv3KSR+4=DG1--