Proxmox VE Helper-Scripts (community-scripts.github.io)
from downhomechunk@midwest.social to selfhosted@lemmy.world on 31 Aug 07:21
https://midwest.social/post/34511376

I only discovered this recently, and it’s very handy.

Piping scripts directly to bash is a security risk. You can always download the scripts, inspect them and run locally if you so choose.

#selfhosted

threaded - newest

atzanteol@sh.itjust.works on 31 Aug 07:30 next collapse

Piping scripts directly to bash is a security risk. You can always download the scripts, inspect them and run locally if you so choose.

This entire trend needs to die. Package managers exist. Use them. Shun and shame sites that promote shell script installers.

Saik0Shinigami@lemmy.saik0.com on 31 Aug 07:37 next collapse

There is no functional difference to piping a script vs running an AUR or other user repository install.

atzanteol@sh.itjust.works on 31 Aug 08:25 next collapse

How do you “undo” whatever that script did?

Saik0Shinigami@lemmy.saik0.com on 31 Aug 08:27 next collapse

AUR repo items don’t necessarily clean themselves up properly either. So I’m not sure why you think that’s part of some requirement for the scripts if we’re comparing the 2.

Edit: But in the case of this specific repo… You delete the lxc or vm that you created.

MangoPenguin@lemmy.blahaj.zone on 31 Aug 09:46 next collapse

In the case of these ones you just remove the LXC/VM it created.

atzanteol@sh.itjust.works on 31 Aug 17:07 collapse

Neat. Now you have a snowflake install. How do you upgrade it?

lka1988@lemmy.dbzer0.com on 31 Aug 20:29 next collapse

Upgrade what? The LXC/VM you just removed because of a wonky script?

You went on with this for way too long, my guy. We get it, you don’t like the helper scripts.

atzanteol@sh.itjust.works on 31 Aug 22:24 collapse

Upgrade what? The LXC/VM you just removed because of a wonky script?

Did you purposefully misunderstand me? How did you not know that I meant “how do you update the thing you installed with a rando shell script” and not “how do you update something after removing it”?

hendu@lemmy.dbzer0.com on 01 Sep 07:10 collapse

You go into the LXC’s console and type update, or use whatever package manager is available in the LXC.

y0kai@anarchist.nexus on 01 Sep 10:51 collapse

I'm pretty sure for most of them you just type update and it will update.

interdimensionalmeme@lemmy.ml on 01 Sep 14:04 collapse

pct stop 505 ; pct destroy 505

If it messed up the host, just run the proxmox installer key, easy !

NuXCOM_90Percent@lemmy.zip on 31 Aug 08:42 collapse

If anything it is easier to self audit the script.

But nobody ever actually audits the stuff they run so…

Saik0Shinigami@lemmy.saik0.com on 31 Aug 08:44 next collapse

Eh… I have my own repo that pulls the PVE repo and updates a bunch of things to how I want them to be and then runs a local version of the main page. While I don’t stare at every update they make… There’s likely enough of us out there looking at the scripts that we’d sound some alarms if something off was happening.

NuXCOM_90Percent@lemmy.zip on 31 Aug 12:32 collapse

Which puts you ahead of the curve. But you are still depending on enough other people to be watching every update and so forth.

I am not saying I am much better. But it is one of those things where anyone considering the selfhosted Fun should REALLY spend some time dealing with software supply chains and the like. Too many people just figure “it is open source so it is safe” or, even in this thread, assume something is more or less safe based upon what app pulls it.

Saik0Shinigami@lemmy.saik0.com on 31 Aug 12:44 collapse

Sure, but my point is that it’s no different to an AUR/user repo. At some point you’re just trusting someone else.

I think the whole “Don’t put bash scripts into a terminal” is too broad. It’s the same risk factor as any blind trust in ANY repository. If you trust the repo then what does it matter if you install the program via repo or bash script. It’s the same. In this specific case though, I trust the repo pretty well. I’ve read well more than half of the lines of code I actually run. When tteck was running it… he was very very sensitive about what was added and I had 100% faith in it. Since the community took it over after his death it seems like we’re still pretty well off… but it’s been growing much faster than I can keep up with.

But none of these issues are any different than installing from AUR.

The rule should just be “don’t run shit from untrusted sources” which could include AUR/repo sources.

antlion@lemmy.dbzer0.com on 31 Aug 22:17 collapse

I’m a real beginner with this stuff and I read through the install scripts before running them. But it wasn’t for security, I just wanted to see if I could learn some tips since I had already struggled to do it manually.

HybridSarcasm@lemmy.world on 31 Aug 08:00 next collapse

Apples and oranges.

Package managers only install a package with defaults. These helper scripts are designed to take the user through a final config that isn’t provided by the package defaults.

No need to be elitist about such things.

EDIT: this particular repo is highly regarded in the community. It is very akin to the AUR. It’s not some haphazard collection of scripts.

atzanteol@sh.itjust.works on 31 Aug 09:02 next collapse

Package managers only install a package with defaults. These helper scripts are designed to take the user through a final config that isn’t provided by the package defaults.

This is trivially solved by having a “setup” script that is also installed by the package manager.

splendoruranium@infosec.pub on 31 Aug 23:14 next collapse

Apples and oranges.

Package managers only install a package with defaults. These helper scripts are designed to take the user through a final config that isn’t provided by the package defaults.

Whether there’s a setup wizard doesn’t have anything to do with whether the tool comes from a package manager or not. Run “apt install ddclient”, for example, it’ll immediately guide you through all configuration steps for the program instead of just dumping a binary and some config text files in /etc/.

So that’s not the bottleneck or contradiction here. It’s just very unfortunate that setup wizards are not very popular as soon as you leave Windows and OSX ecosystems.

frongt@lemmy.zip on 01 Sep 07:11 collapse

No, package installers support configuration. Plenty of packages (e.g. postfix) prompt for configuration at install time.

Mondez@lemdro.id on 31 Aug 08:48 next collapse

IMO these kinds of poor man’s automation scripts are only useful to novice sysadmins but those are exactly the kind of people who shouldn’t be running scripts they piped from the internet for both the fact that it’s risky behaviour and the fact they don’t then get the experience doing this manually for themselves to move on from being novice.

That said, let’s not gate keep. If novices don’t want to gain experience actually doing sysadmin work and level up their abilities and just want stuff that will probably work but that they’ll not be able to fix easily if it doesn’t, at least it’s a starting point and when things break some of them will look deeper.

atzanteol@sh.itjust.works on 31 Aug 09:01 collapse

That said, let’s not gate keep.

This shouldn’t be an excuse for promoting risky behavior.

Burghler@sh.itjust.works on 31 Aug 12:20 next collapse

Heellll no, the scripts are publically available to read over if you’re sketched out. They save you so much time to actually get to using the service. 98% of my homelab is from these same helper scripts too.

RIP tteck

atzanteol@sh.itjust.works on 31 Aug 17:22 next collapse

You can install with package managers and include with it a helper script to setup the service. No big deal.

But can you spot the difference between http://myservice.com/script.sh and http://myserv1ce.com/script.sh if you use a font that doesn’t make it clear? If you get people used to just copy/pasting/running scripts then there’s a risk they’ll run something entirely different by accident.

There’s no good reason to install things this way.

Burghler@sh.itjust.works on 31 Aug 21:05 next collapse

But this is a trusted source with years of credibility. Why would any sensible competent tech user copy paste from other places because this one worked.

You’ll be pissed when you hear about Linux game server manager then. It’s all helper scripts over https

atzanteol@sh.itjust.works on 01 Sep 06:22 collapse

Why would any sensible competent tech user copy paste from other places because this one worked.

Because sites like this and people like you are normalizing the practice. I have seen numerous curl | sh commands pasted on lemmy telling people “how easy it is to install blank”.

interdimensionalmeme@lemmy.ml on 01 Sep 14:00 collapse

Some people have jobs and families to attend and can’t afford weeks figuring out linux idiosyncrasies. This works.
Yes it would be nice to have an official LXC repository, but we don’t
Tell the LXC people we should have had one already instead of splitting hairs with docker.

discuss.linuxcontainers.org/t/…/14946

non_burglar@lemmy.world on 31 Aug 17:26 next collapse

Have you ever looked at what was once ttek scripts? They’re a spaghetti of calls to other scripts. It’s not pretty. And not intuitive to audit.

Burghler@sh.itjust.works on 31 Aug 21:02 next collapse

Wtf you’re my opposite D:

I did and had a decent time with ctrl shift F’ing around. Took a moment since bash isn’t my strong suit.

interdimensionalmeme@lemmy.ml on 01 Sep 13:58 collapse

They work so what is your objection ?
If you are worried pipe it into chatgpt with the prompt
“tell me why this script is safe to use”

non_burglar@lemmy.world on 01 Sep 15:54 collapse

I thought I was being clear that I have audited some of the scripts. They are built referencing other scripts instead of functions, and these rely on URLs. It’s difficult to follow.

Don’t ask chatgpt to audit code.

panda_abyss@lemmy.ca on 02 Sep 11:03 collapse

I don’t like that an adversary could modify that link or its contents without much detection or any logging.

When you compare it to package managers that have immutable versioning that’s a big downfall. If someone were modifying pypi or npm packages I would be surprised if it went undetected.

Realistically is that an issue, probably not. But I do try and reduce my exposure when I can.

deafboy@lemmy.world on 31 Aug 13:16 next collapse

Piping scripts directly to bash is a security risk

Nobody has ever explained why. What is the difference between executing a script directly from curl, and adding a repository which downloads a package which contains a script.

atzanteol@sh.itjust.works on 31 Aug 17:06 collapse

The URL can point to a different file. People can post maliciously similar URLs and trick you into running something else.

With a repository you have some semblance of “people have looked at this before”. Packages are signed and it will provide a standard way to uninstall and upgrade in the future.

There’s literally no good reason to replace it with a shell script on a website.

splendoruranium@infosec.pub on 31 Aug 22:57 next collapse

There’s literally no good reason to replace it with a shell script on a website.

I fully agree that a package manager repository with all those tools would be preferable, but it doesn’t exist, does it? I mean… content is king. If the only way to get a certain program or functionality is a shell script on a website, then of course that’s what is going to be used.

interdimensionalmeme@lemmy.ml on 01 Sep 14:02 collapse

Here is a good reason

root@proxmox:~# apt install vaulrwarden
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package vaulrwarden
root@proxmox:~#

It’s the difference between “it works” and “it doesn’t”

frongt@lemmy.zip on 01 Sep 07:15 next collapse

Fun fact, a malicious server can detect the difference between you loading the script for inspection in your browser, and you doing curl | sh, and could serve an entirely different script.

lukespademan.com/blog/the-dangers-of-curlbash/

atzanteol@sh.itjust.works on 01 Sep 13:57 next collapse

Yeah - it’s remarkable that I receive pushback about it. I guess it’s down to the technical immaturity of your average home-gamer vs. people who support Linux systems for a living?

interdimensionalmeme@lemmy.ml on 02 Sep 00:32 collapse

Of course, Linux sysadmin needs linux to remain a ceaseless whirlpool of busywork, that’s what they’re paid for. Imagine having a tool that cuts the bullshit out of using linux, it would put them right out of business if the users could just do the things they want to do without having to beg the middleman.

atzanteol@sh.itjust.works on 02 Sep 06:15 collapse

🤣

OMG this is so dumb.

Edit: I’m thinking this was satire?

interdimensionalmeme@lemmy.ml on 02 Sep 10:15 collapse

Why else would so many of them step on the brake with both foots, shut down any way to streamline them out of the picture, while proposing impossible alternatives or even no alternatives. And of course it’s always about "for your security and safety "

atzanteol@sh.itjust.works on 02 Sep 10:17 collapse

This wasn’t satire?

🤣 🤣

interdimensionalmeme@lemmy.ml on 02 Sep 10:24 collapse

I’ve never said a joke in my life

Also read this, lemmy.ml/post/35479661/20837334

It is worse to even try to do it yourself, you’re more likely to mess up then if you just pipe those script into your root shells, even if you’re an expect, because even one good expert is hopeless compared with multiple experts

signalsayge@infosec.pub on 02 Sep 13:42 collapse

That’s why I also self host the scripts I’ve vetted…

interdimensionalmeme@lemmy.ml on 01 Sep 13:57 collapse

I asked repository maintainers and they said “LXC is not for apps” and of course docker is a good way to waste your weekends. So we don’t have repositories, we have scripts.

If you disagree, go tell them

discuss.linuxcontainers.org/t/…/14946

Until then, people who have sacrificed enough of their weekend to the linux gods will be pipe internet text into their root consoles

atzanteol@sh.itjust.works on 01 Sep 21:58 collapse

Until then, people who have sacrificed enough of their weekend to the linux gods will be pipe internet text into their root consoles

“I’ll do what’s easy even if it’s not good” is a terrible approach to, well, anything. I would expect people in this community to look for guidance on what the best way to do things is. Seems I’m wrong.

interdimensionalmeme@lemmy.ml on 02 Sep 12:49 collapse

Well look, the people at helper-scripts, they have done the legwork, often as groups, the probably that you even COULD do a better installation section is already very unlikely … no more than that it’s implausible. These people are more dedicated, they started earlier and they’re already done, you are not going to do a better job than them, even if you tried, by the time you did, which realistically, unless you’re doing linux for money, you probably won’t even finish, but even then by the time you’ve re-invented the entire wheel, they will have progressed further, and there is more of them than there is of you, you will NEVER catch up.

But listen, I hear you, I hear your paranoia, your belief that there are bad people out there out to get you. Well I’m sorry but I have to tell you, those people simply do not care enough to break in to helper-scripts. Even if they did they’d get found out. It hasn’t even happenned yet even though the effort has been a huge success of people just like you coming together and dealing to put an end to the endless linux bullshiterry and making things actually work.

The odds that someone will manage to infiltrate without anyone figuring it out are so low that they are in fact insignificant.

Unless you have the resources of multiple militaries at your disposal, there is simply NO justification from trying to do your own helper-scripts, by yourself and then keep them for yourself. None, it’s mental illness to even attempt.

atzanteol@sh.itjust.works on 02 Sep 13:50 collapse

It’s not just this site though is it? I have been seeing a proliferation of curl | shell bullshit for some time now. Lots of sites doing it and people are posting those commands in forums, etc. telling others how easy it is to install that shiny piece of software! “But people should know better” I hear you whine, “They should read scripts before executing them.” But we all know people won’t do that. Especially not the sort of people who are arguing in favor of this practice, and certainly not the newbs these are targeted at.

interdimensionalmeme@lemmy.ml on 02 Sep 14:10 collapse

Read the scripts ? Why would anyone do that ? To truly understand even a relatively simply 10 page script can easily take an entire afternoon, this is a completely unrealistic demand.

There is a piece of infrastructure missing, whether it’s no place to put ready to use LXC files, software installation script or configuration.nix files, there is a HUGE gap between the software that actually works, and the ability to go from nothing to a working computer.

I have used my computer for my entire life, well over 30 years and even having spent my ENTIRE summer doing linux bullshittery, I still barely have anything working. Everything is delivered in a near broken mostly unusable state and that’s after you’ve spent multiple days to just get there.

Almost nothing works and you simply don’t have enough time left in your life to even try making it work.

So yes, people should pipe scripts into root shells without reading them because that’s what any real person would do. They really really should stop listening to all the nannies telling them to waste all their time re-inventing the wheel and achieving nothing.

atzanteol@sh.itjust.works on 02 Sep 14:41 collapse

Maybe computers just aren’t for you.

interdimensionalmeme@lemmy.ml on 02 Sep 17:53 collapse

I think it’s the rest of IT doing computers wrong, they’ve been very wrong for a very long time and getting wrong, unlockable bootloaders, motherboard-locked CPUs, it’s clear where all this “security” stuff is going, they’re building a prison one brick at a time.

Custard@lemmy.world on 31 Aug 21:34 collapse

Didn’t the original creator of these scripts recently pass away, or am I misremembering?

Edit: Yeah he did, but I guess others have been able to keep the project going github.com/community-scripts/ProxmoxVE/…/237