Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #243439

Re: doas 101 question

From Greg Wooledge <greg@wooledge.org>
Newsgroups linux.debian.user
Subject Re: doas 101 question
Date 2021-12-25 15:00 +0100
Message-ID <DyfKy-4gu-7@gated-at.bofh.it> (permalink)
References <Dvsbf-6Z6-11@gated-at.bofh.it> <Dvzmp-3Em-1@gated-at.bofh.it> <DvAs9-4kI-1@gated-at.bofh.it> <DvJvr-1SQ-3@gated-at.bofh.it> <Dy7jX-7Fn-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Dec 24, 2021 at 08:32:14PM -0800, David Robert Newman wrote:
> I asked doas author Ted Unangst about this. His reply:
> 
> > Sorry, only very limited env replacement can be done in setenv. root's environment isn't available before the switch.
> 
> Ergo, it is just as you suspected. This isn't an issue with OpenBSD because
> regular users's PATHs already include sbin directories. It is an issue with
> Debian because (a) a regular user's PATH doesn't include sbin directories
> and (b) the change in su behavior awhile back restricted access to some root
> privileges. It's not an issue with sudo, but for various reasons I'm more
> comfortable using doas.
> 
> My workaround was to add aliases for a few commands to my .bashrc file, e.g.
> (but not a real example):
> 
> alias ua='doas /usr/sbin/useradd'

In order to use doas, you already have to customize your system (it
does nothing out-of-the-box).

You might as well take another step, and customize your login so that
your PATH contains /usr/local/sbin and so on.  The details of how to do
this are extremely specific to how you login, but it should be pretty
simple if you know what you're doing.

Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

doas 101 question David Newman <dnewman@networktest.com> - 2021-12-17 21:40 +0100
  Re: doas 101 question Greg Wooledge <greg@wooledge.org> - 2021-12-18 05:20 +0100
    Re: doas 101 question David Newman <dnewman@networktest.com> - 2021-12-18 06:30 +0100
      Re: doas 101 question Tim Woodall <debianuser@woodall.me.uk> - 2021-12-18 08:00 +0100
      Re: doas 101 question Greg Wooledge <greg@wooledge.org> - 2021-12-18 16:10 +0100
        Re: doas 101 question David Robert Newman <david@davidrobertnewman.com> - 2021-12-25 06:00 +0100
          Re: doas 101 question Greg Wooledge <greg@wooledge.org> - 2021-12-25 15:00 +0100

csiph-web