From owner-freebsd-questions@freebsd.org Thu Jul 20 03:53:19 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B567DA72CC for ; Thu, 20 Jul 2017 03:53:19 +0000 (UTC) (envelope-from roger@qxxy.com) Received: from mail-ua0-x22f.google.com (mail-ua0-x22f.google.com [IPv6:2607:f8b0:400c:c08::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 10F7B7F13E for ; Thu, 20 Jul 2017 03:53:19 +0000 (UTC) (envelope-from roger@qxxy.com) Received: by mail-ua0-x22f.google.com with SMTP id 35so14058110uax.3 for ; Wed, 19 Jul 2017 20:53:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qxxy.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=1/97TYyoISg5qDk+6TJrsVM4gBfC1OViyxAXa/KRAfI=; b=NgYxFBbbwQPVTC2RVHRqcON2wCuxB1MGXxBvyPSN2tVZtEMziWvVGHjQ7Ay7JSuv+Y /w5dcVOUvQxLKyteT9u6SdKI/UCPUOXK+y8a8FfFncvBaCVQhvzG2HR9Bvq/7fDGYMFG O1e0ZyW/Eg+cgq88jh6HB3TECX1XrgIaWWRIY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=1/97TYyoISg5qDk+6TJrsVM4gBfC1OViyxAXa/KRAfI=; b=mn3WklOXTwbNRGckkjcKIS782NufISd3BNPD1W5WsGs+QYanPAQt1EIXXAF8scP74l p8i6ujh65bXzGBNvV5NpulB/W7jMyyGWkyhJQMfZ2m4UUTt6OWHGuBQXtzppLTVhcmeC xqKvEg9mb7+KSdYoOovtqd/DtgwHYJDs2aOlKBL7Ok4OFe1Q8vf11BxDLq2ZTUQ+cto2 SbocVQrwx0qOkczZX+H9qZDyjqJpSyu/WLFIPxNgc5Us0TAnSIlbL+8X482Nr/5M9G9u LLakk9GRL/k4wRhd01sprIb7uBQd6wTQ4Rxz3MTQw5eDsFqTZq0qHIpjwYaRFeFkZorQ ZL6A== X-Gm-Message-State: AIVw113v7NVO+puEUg1qQJqwzdQa3lIiZbuFbRh+NBZq6VEAQSaEazRk e7f8X18yq4BFmN9Z+NHOeA49TbSL+fcs X-Received: by 10.31.244.135 with SMTP id s129mr1138139vkh.167.1500522798129; Wed, 19 Jul 2017 20:53:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.149.11 with HTTP; Wed, 19 Jul 2017 20:52:37 -0700 (PDT) X-Originating-IP: [50.90.163.130] In-Reply-To: References: From: Roger Pate Date: Wed, 19 Jul 2017 23:52:37 -0400 Message-ID: Subject: Re: security/doas can't work with zsh alias To: alphachi Cc: "list: freebsd" Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2017 03:53:19 -0000 On Mon, Jun 26, 2017 at 8:25 AM, alphachi wrote: > I'm preparing to migrate to doas and the following commands are my test: > ... > % echo $SHELL > /usr/local/bin/zsh > % doas echo $SHELL > /usr/local/bin/zsh Would you rather test the following? % doas printenv SHELL (note when $SHELL's value is expanded in yours vs mine) As you mentioned in another reply, you do indeed want your shell to expand your aliases for doas commands before executing doas, which the trailing space (alias doas='doas ') indicates.