[GLLUG] why is adduser unknown command in Debian 10.4?

John Hearns hearnsj at gmail.com
Wed Sep 2 07:32:06 UTC 2020


sudo -i
Yes i will burn in heck.

On Wed, 2 Sep 2020 at 08:19, James Roberts via GLLUG <
gllug at mailman.lug.org.uk> wrote:

> "Use su - instead" - we always were supposed to do that and I tried to
> remember to do so, but bad habits learned early on persist and I often
> slipped. Now I'll be forced into canonicity :)
>
> MeJ
>
> On 01/09/2020 18:24, Andy Smith via GLLUG wrote:
> > Hello,
> >
> > On Tue, Sep 01, 2020 at 04:01:04PM +0000, MJ via GLLUG wrote:
> >> desktop at desktop:~$ su
> >> Password:
> >> root at desktop:/home/desktop# adduser desktop dialout
> >> bash: adduser: command not found
> >> root at desktop:/home/desktop#
> >
> > Most likely /usr/sbin isn't in your path as "su" doesn't do that any
> > more.
> >
> > https://wiki.debian.org/NewInBuster
> >
> > == Changes
> >
> > * The su command in buster is provided by the util-linux source
> >    package, instead of the shadow source package, and no longer
> >    alters the PATH variable by default. This means that after doing
> >    su, your PATH may not contain directories like /sbin, and many
> >    system administration commands will fail.
> >
> >> This is LPC 101 standard stuff?!
> >
> > Rote learning goes out of date. Working out how to diagnose a
> > "command not found" error is more valuable.
> >
> > $ command -v adduser
> > /sbin/adduser
> > # Oh, /usr/sbin is in my user's path then. Because I set that on purpose
> > $ PATH= command -v adduser
> > $ apt-file search bin/adduser
> > adduser: /usr/sbin/adduser
> > $ dpkg -L adduser | grep bin
> > /usr/sbin
> > /usr/sbin/adduser
> > /usr/sbin/deluser
> > /usr/sbin/addgroup
> > /usr/sbin/delgroup
> > $ ls -lah /usr/sbin/adduser
> > -rwxr-xr-x 1 root root 34K Sep 15  2018 /usr/sbin/adduser
> >
> > So, PATH issue.
> >
> > Cheers,
> > Andy
> >
>
> --
> Stabilys Ltd            www.stabilys.com
> 244 Kilburn Lane
> LONDON
> W10 4BA
>
> 0845 838 5370
>
> --
> GLLUG mailing list
> GLLUG at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/gllug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20200902/6a6ab2b1/attachment.html>


More information about the GLLUG mailing list