<div dir="ltr">sudo -i<div>Yes i will burn in heck.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 2 Sep 2020 at 08:19, James Roberts via GLLUG <<a href="mailto:gllug@mailman.lug.org.uk">gllug@mailman.lug.org.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">"Use su - instead" - we always were supposed to do that and I tried to <br>
remember to do so, but bad habits learned early on persist and I often <br>
slipped. Now I'll be forced into canonicity :)<br>
<br>
MeJ<br>
<br>
On 01/09/2020 18:24, Andy Smith via GLLUG wrote:<br>
> Hello,<br>
> <br>
> On Tue, Sep 01, 2020 at 04:01:04PM +0000, MJ via GLLUG wrote:<br>
>> desktop@desktop:~$ su<br>
>> Password:<br>
>> root@desktop:/home/desktop# adduser desktop dialout<br>
>> bash: adduser: command not found<br>
>> root@desktop:/home/desktop#<br>
> <br>
> Most likely /usr/sbin isn't in your path as "su" doesn't do that any<br>
> more.<br>
> <br>
> <a href="https://wiki.debian.org/NewInBuster" rel="noreferrer" target="_blank">https://wiki.debian.org/NewInBuster</a><br>
> <br>
> == Changes<br>
> <br>
> * The su command in buster is provided by the util-linux source<br>
> package, instead of the shadow source package, and no longer<br>
> alters the PATH variable by default. This means that after doing<br>
> su, your PATH may not contain directories like /sbin, and many<br>
> system administration commands will fail.<br>
> <br>
>> This is LPC 101 standard stuff?!<br>
> <br>
> Rote learning goes out of date. Working out how to diagnose a<br>
> "command not found" error is more valuable.<br>
> <br>
> $ command -v adduser<br>
> /sbin/adduser<br>
> # Oh, /usr/sbin is in my user's path then. Because I set that on purpose<br>
> $ PATH= command -v adduser<br>
> $ apt-file search bin/adduser<br>
> adduser: /usr/sbin/adduser<br>
> $ dpkg -L adduser | grep bin<br>
> /usr/sbin<br>
> /usr/sbin/adduser<br>
> /usr/sbin/deluser<br>
> /usr/sbin/addgroup<br>
> /usr/sbin/delgroup<br>
> $ ls -lah /usr/sbin/adduser<br>
> -rwxr-xr-x 1 root root 34K Sep 15 2018 /usr/sbin/adduser<br>
> <br>
> So, PATH issue.<br>
> <br>
> Cheers,<br>
> Andy<br>
> <br>
<br>
-- <br>
Stabilys Ltd <a href="http://www.stabilys.com" rel="noreferrer" target="_blank">www.stabilys.com</a><br>
244 Kilburn Lane<br>
LONDON<br>
W10 4BA<br>
<br>
0845 838 5370<br>
<br>
-- <br>
GLLUG mailing list<br>
<a href="mailto:GLLUG@mailman.lug.org.uk" target="_blank">GLLUG@mailman.lug.org.uk</a><br>
<a href="https://mailman.lug.org.uk/mailman/listinfo/gllug" rel="noreferrer" target="_blank">https://mailman.lug.org.uk/mailman/listinfo/gllug</a></blockquote></div>