Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

One small step for man, one giant stumble for mankind.


computers / alt.os.linux.ubuntu / Re: accidentally installed pip or pip3 as root

SubjectAuthor
* accidentally installed pip or pip3 as rootJake M
+- Re: accidentally installed pip or pip3 as rootPaul
`* Re: accidentally installed pip or pip3 as rootHenry Crun
 +- Re: accidentally installed pip or pip3 as rootJake M
 `* Re: accidentally installed pip or pip3 as rootJake M
  `* Re: accidentally installed pip or pip3 as rootJonathan N. Little
   `* Re: accidentally installed pip or pip3 as rootJake M
    `- Re: accidentally installed pip or pip3 as rootJonathan N. Little

1
accidentally installed pip or pip3 as root

<uo83ui$1u04k$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=3804&group=alt.os.linux.ubuntu#3804

  copy link   Newsgroups: alt.os.linux.ubuntu
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mill45@fla.net (Jake M)
Newsgroups: alt.os.linux.ubuntu
Subject: accidentally installed pip or pip3 as root
Date: Wed, 17 Jan 2024 03:42:58 -0500
Organization: A noiseless patient Spider
Lines: 3
Message-ID: <uo83ui$1u04k$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 17 Jan 2024 08:42:58 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b27d8869625a150e11400f30f84edfb2";
logging-data="2031764"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/g7FnO2CdWqhipGPSO0UUw"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:BZG7GXovloYZFhq8MYxIpkh8XP0=
Content-Language: en-US
 by: Jake M - Wed, 17 Jan 2024 08:42 UTC

I accidentally installed pip or pip3 as root and got the warning about
possible danger to my system. Therefore, I'd like to remove it. Please
let me know the best commands and thanks in advance.

Re: accidentally installed pip or pip3 as root

<uo8n3i$21dl5$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=3805&group=alt.os.linux.ubuntu#3805

  copy link   Newsgroups: alt.os.linux.ubuntu
Path: i2pn2.org!i2pn.org!news.samoylyk.net!nyheter.lysator.liu.se!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nospam@needed.invalid (Paul)
Newsgroups: alt.os.linux.ubuntu
Subject: Re: accidentally installed pip or pip3 as root
Date: Wed, 17 Jan 2024 09:09:54 -0500
Organization: A noiseless patient Spider
Lines: 54
Message-ID: <uo8n3i$21dl5$1@dont-email.me>
References: <uo83ui$1u04k$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 17 Jan 2024 14:09:54 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6bed0963efa9d509909c333ca625ba3b";
logging-data="2143909"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19tnhA/o08gwDlMpx6ONPUza3Gl5W0NXSc="
User-Agent: Ratcatcher/2.0.0.25 (Windows/20130802)
Cancel-Lock: sha1:2LDiVzi3Q2eCBg1tFEoYHMGz074=
Content-Language: en-US
In-Reply-To: <uo83ui$1u04k$1@dont-email.me>
 by: Paul - Wed, 17 Jan 2024 14:09 UTC

On 1/17/2024 3:42 AM, Jake M wrote:
> I accidentally installed pip or pip3 as root and got the warning about
> possible danger to my system.  Therefore, I'd like to remove it.  Please
> let me know the best commands and thanks in advance.

https://www.getpagespeed.com/server-setup/do-not-run-pip-as-root

"Now, pip is the installer/manager for Python modules available via PyPI.

But it has no idea whatsoever about your package manager.
It has no idea about RPM format either, nor about what you already
have installed through the system (yum) packages.

So when you invoke pip as root, it will more than likely overwrite Python modules
that were installed via system packages.

The result of running pip as root, would be a dirty mix of Python modules
installed via yum package management, and pip installed Python modules.

Example of breakage
...
"

So if you ran "pip" as root again, did "pip remove",
then I would expect damage where a system version of a
file would be removed. Then if you used the package management
to remove pip locally, now you'd have a gap-toothed set of
system python packages.

Which is better then ? To have "pip remove" the erroneous files,
or have non-root "pip remove" leave the tainted (unknown version)
of a file put there instead ? Now you need a means to have your
package manager reinstall all the system modules.

When a software developer knows that root usage is destructive,
not only should they issue a warning, they should "drop dead" on
the spot, and stop doing shit. If the activity serves no useful
purpose (damaging tree-installed content), what the hell ? There
are already some other softwares on your machine, that check for
root invocation and deny it.

( Um, yeah, this looks safe. An official version of this approach might be nice. )

https://askubuntu.com/questions/57682/find-and-reinstall-packages-with-corrupted-files-without-breaking-anything

Summary: All I've tried to do here, is find an example of what the
damage mechanism is. You're the administrator, and now it
is up to you to deal with a malicious case of tree damage.
Reinstalling packages is one way to un-taint them.

Even modifying a script to just produce a scan of the tree
without fixing anything, is a start.

Paul

Re: accidentally installed pip or pip3 as root

<l0q81bF97lU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=3806&group=alt.os.linux.ubuntu#3806

  copy link   Newsgroups: alt.os.linux.ubuntu
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: mike@rechtman.com (Henry Crun)
Newsgroups: alt.os.linux.ubuntu
Subject: Re: accidentally installed pip or pip3 as root
Date: Wed, 17 Jan 2024 16:54:34 +0200
Lines: 11
Message-ID: <l0q81bF97lU1@mid.individual.net>
References: <uo83ui$1u04k$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net eS9WyfU8vVYH9SzAlHlNrQDElHfbC7KCGKLUkqa3EbyU1NNhT2
Cancel-Lock: sha1:z1fiBQx0bJSZXMImHF90dN7q97Q= sha256:uPQFUgFPmd15pZYROsvJF7DN4oooPoRzkg5rDRZm+s8=
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <uo83ui$1u04k$1@dont-email.me>
 by: Henry Crun - Wed, 17 Jan 2024 14:54 UTC

On 17/01/2024 10:42, Jake M wrote:
> I accidentally installed pip or pip3 as root and got the warning about possible danger to my system.  Therefore, I'd
> like to remove it.  Please let me know the best commands and thanks in advance.

Easiest: How old is your latest full backup? (solution left as an exercise for the administrator.)
Otherwise you are liable to find youself in a maze of twisty passages, all alike...

--
No Micro$oft products were used in the URLs above, or in preparing this message. Recommended reading:
http://www.catb.org/~esr/faqs/smart-questions.html#befor

Re: accidentally installed pip or pip3 as root

<uo9db6$26d3k$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=3807&group=alt.os.linux.ubuntu#3807

  copy link   Newsgroups: alt.os.linux.ubuntu
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mill45@fla.net (Jake M)
Newsgroups: alt.os.linux.ubuntu
Subject: Re: accidentally installed pip or pip3 as root
Date: Wed, 17 Jan 2024 15:29:26 -0500
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <uo9db6$26d3k$1@dont-email.me>
References: <uo83ui$1u04k$1@dont-email.me> <l0q81bF97lU1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: base64
Injection-Date: Wed, 17 Jan 2024 20:29:26 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="091ec97fa106db18489fd023c07cd4d9";
logging-data="2307188"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19RJ7Ci75LLYBCp7hmB4NBx"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Z+v2ytkt7A5z1BEAPmo8dSs2dP4=
Content-Language: en-US
In-Reply-To: <l0q81bF97lU1@mid.individual.net>
 by: Jake M - Wed, 17 Jan 2024 20:29 UTC

On 1/17/24 9:54 AM, Henry Crun wrote:
> On 17/01/2024 10:42, Jake M wrote:
>> I accidentally installed pip or pip3 as root and got the warning about
>> possible danger to my system.  Therefore, I'd like to remove it.
>> Please let me know the best commands and thanks in advance.
>
> Easiest: How old is your latest full backup? (solution left as an
> exercise for the administrator.)
> Otherwise you are liable to find youself in a maze of twisty passages,
> all alike...
>
backup is a few months old, but hard drive to hard drive thorough
Clonezilla, so backing up this hard drive first on a separate external
hard drive. Once the slightly older back up is restored from another
hard drive, I'll have the current hard drive already backed up and
available to transfer files. Not much has changed other than a couple
of new programs and some program configurations.
What a shame that I got the warning after the fact as I think Paul was
alluding to. Oh well, lesson learned. I didn't even have pip installed
anyway and only did so for a recent script requirement, but won't be
running the script so won't need pip again.

Re: accidentally installed pip or pip3 as root

<uo9gb1$26tfq$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=3808&group=alt.os.linux.ubuntu#3808

  copy link   Newsgroups: alt.os.linux.ubuntu
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mill45@fla.net (Jake M)
Newsgroups: alt.os.linux.ubuntu
Subject: Re: accidentally installed pip or pip3 as root
Date: Wed, 17 Jan 2024 16:20:33 -0500
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <uo9gb1$26tfq$1@dont-email.me>
References: <uo83ui$1u04k$1@dont-email.me> <l0q81bF97lU1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: base64
Injection-Date: Wed, 17 Jan 2024 21:20:33 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="091ec97fa106db18489fd023c07cd4d9";
logging-data="2323962"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+mz+I0F/6Or4sf0bodyvXZ"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:+hxDoih9ev2k5+kfRGQH5x1HlVg=
In-Reply-To: <l0q81bF97lU1@mid.individual.net>
Content-Language: en-US
 by: Jake M - Wed, 17 Jan 2024 21:20 UTC

On 1/17/24 9:54 AM, Henry Crun wrote:
> On 17/01/2024 10:42, Jake M wrote:
>> I accidentally installed pip or pip3 as root and got the warning about
>> possible danger to my system.  Therefore, I'd like to remove it.
>> Please let me know the best commands and thanks in advance.
>
> Easiest: How old is your latest full backup? (solution left as an
> exercise for the administrator.)
> Otherwise you are liable to find youself in a maze of twisty passages,
> all alike...
>
One last thing I forgot to ask is how I can determine where pip was
installed? It's possible I did not install it (or pip3) to root, so it
wouldn't hurt to be sure before reinstalling my backup. Thanks.

Re: accidentally installed pip or pip3 as root

<uo9utj$28smk$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=3812&group=alt.os.linux.ubuntu#3812

  copy link   Newsgroups: alt.os.linux.ubuntu
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lws4art@gmail.com (Jonathan N. Little)
Newsgroups: alt.os.linux.ubuntu
Subject: Re: accidentally installed pip or pip3 as root
Date: Wed, 17 Jan 2024 20:29:23 -0500
Organization: LITTLE WORKS STUDIO
Lines: 15
Message-ID: <uo9utj$28smk$1@dont-email.me>
References: <uo83ui$1u04k$1@dont-email.me> <l0q81bF97lU1@mid.individual.net>
<uo9gb1$26tfq$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 18 Jan 2024 01:29:24 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d97725254792a656a4c3719488143048";
logging-data="2388692"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18dWPuhRXb7DGc6wsUVs1szCM4UP5/WB+g="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.18.1
Cancel-Lock: sha1:b+EJYb5ANOhWugeEPai2a+5J7SQ=
X-Dan: Yes Dan this is a Winbox
X-Face: o[H8T0h*NGH`K`P)s+4PmYlcy|GNl`~+L6Fi.m:%15m[c%{C7V-ump|WiCYPkQ+hFJhq;XW5^1Rg_El'"fE$~AcYW$Pq\yeh9K_-dJqlQ5\y2\;[yw5DYCtOtsf_.TUy}0U\oL^>[3Y#{AP2^o'bG`bwj`]]UNpCxY\(~xK9b+uZKxrb*4-rkD+
In-Reply-To: <uo9gb1$26tfq$1@dont-email.me>
 by: Jonathan N. Little - Thu, 18 Jan 2024 01:29 UTC

Jake M wrote:
> One last thing I forgot to ask is how I can determine where pip was
> installed?  It's possible I did not install it (or pip3) to root, so it
> wouldn't hurt to be sure before reinstalling my backup.  Thanks.

which pip3
/usr/bin/pip3

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Re: accidentally installed pip or pip3 as root

<uo9vov$28vt3$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=3813&group=alt.os.linux.ubuntu#3813

  copy link   Newsgroups: alt.os.linux.ubuntu
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mill45@fla.net (Jake M)
Newsgroups: alt.os.linux.ubuntu
Subject: Re: accidentally installed pip or pip3 as root
Date: Wed, 17 Jan 2024 20:43:59 -0500
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <uo9vov$28vt3$1@dont-email.me>
References: <uo83ui$1u04k$1@dont-email.me> <l0q81bF97lU1@mid.individual.net>
<uo9gb1$26tfq$1@dont-email.me> <uo9utj$28smk$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: base64
Injection-Date: Thu, 18 Jan 2024 01:43:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c534fedb8c8c6edf85e6c87b0c5c27a9";
logging-data="2391971"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19o8yH6NGolgGQD5cA5FZO8"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:HIDHypI8TP1A93Pm8LR19qVFnl8=
Content-Language: en-US
In-Reply-To: <uo9utj$28smk$1@dont-email.me>
 by: Jake M - Thu, 18 Jan 2024 01:43 UTC

On 1/17/24 8:29 PM, Jonathan N. Little wrote:
> Jake M wrote:
>> One last thing I forgot to ask is how I can determine where pip was
>> installed?  It's possible I did not install it (or pip3) to root, so it
>> wouldn't hurt to be sure before reinstalling my backup.  Thanks.
>
> which pip3
> /usr/bin/pip3
>
Thanks. I get both /usr/bin/pip and /usr/bin/pip3 so it looks like it's
on root after all, correct?

Re: accidentally installed pip or pip3 as root

<uoblt1$2m3p2$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=3819&group=alt.os.linux.ubuntu#3819

  copy link   Newsgroups: alt.os.linux.ubuntu
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lws4art@gmail.com (Jonathan N. Little)
Newsgroups: alt.os.linux.ubuntu
Subject: Re: accidentally installed pip or pip3 as root
Date: Thu, 18 Jan 2024 12:07:43 -0500
Organization: LITTLE WORKS STUDIO
Lines: 36
Message-ID: <uoblt1$2m3p2$1@dont-email.me>
References: <uo83ui$1u04k$1@dont-email.me> <l0q81bF97lU1@mid.individual.net>
<uo9gb1$26tfq$1@dont-email.me> <uo9utj$28smk$1@dont-email.me>
<uo9vov$28vt3$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 18 Jan 2024 17:07:45 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d97725254792a656a4c3719488143048";
logging-data="2821922"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ton3caWjCOqBUaWi6HaWauYJNpOeA7Cc="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.18.1
Cancel-Lock: sha1:a4N+hd2quHjmWr+ofy6ev2XTZg0=
X-Face: o[H8T0h*NGH`K`P)s+4PmYlcy|GNl`~+L6Fi.m:%15m[c%{C7V-ump|WiCYPkQ+hFJhq;XW5^1Rg_El'"fE$~AcYW$Pq\yeh9K_-dJqlQ5\y2\;[yw5DYCtOtsf_.TUy}0U\oL^>[3Y#{AP2^o'bG`bwj`]]UNpCxY\(~xK9b+uZKxrb*4-rkD+
In-Reply-To: <uo9vov$28vt3$1@dont-email.me>
X-Dan: Yes Dan this is a Winbox
 by: Jonathan N. Little - Thu, 18 Jan 2024 17:07 UTC

Jake M wrote:
> On 1/17/24 8:29 PM, Jonathan N. Little wrote:
>> Jake M wrote:
>>> One last thing I forgot to ask is how I can determine where pip was
>>> installed?  It's possible I did not install it (or pip3) to root, so it
>>> wouldn't hurt to be sure before reinstalling my backup.  Thanks.
>>
>> which pip3
>> /usr/bin/pip3
>>
> Thanks.  I get both /usr/bin/pip and /usr/bin/pip3 so it looks like it's
> on root after all, correct?

Yep. It is installed via package:

sudo apt install python3-pip

I think where the security issue may be if you are installing packages
globally or local to your user profile.

sudo pip3 install PACKAGE

will install it globally, whereas:

pip3 install PACKAGE

installs it only for your profile under ~/.local/bin/

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor