• secret300@lemmy.sdf.org
    link
    fedilink
    arrow-up
    1
    ·
    24 minutes ago

    I’d fedora starts to use it then yeah I’ll use it but I’ll just make an alias cause muscle memory

  • kenkenken@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    85
    ·
    4 days ago

    I will use it. I don’t care what others think. People can use su, sudo, doas, run0 by their choice, and I don’t see why we need a common opinion about it.

      • A lot of people are afraid of systemd expanding because systemd handles a lot of stuff, so distros are likely to support it rather than the mishmash of tools they personally prefer. It all started with the System-V/Upstart replacement and now very few distros have the patience to customise and roll out the 90s style service management anymore. Their preferences used to align with the mainstream, but no longer do these days, and that causes friction.

        This process pushes people who prefer old tools to fringe distros, and newer software is less likely to work on their setups. They’re still free to use whatever system they like, of course, but the burden for developing and maintaining daemon management scripts is now on their fringe distro or themselves if their distro doesn’t have anything yet. I’d find that pretty annoying too, especially with how convoluted many older system management scripts are and how many moving parts are typically involved. Plus, some stuff like socket activation can’t even be done with some of the older init systems so people have to find alternatives.

        I doubt anyone reeling against run0 was ever going to consider it anyway.

  • mexicancartel@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    15
    ·
    3 days ago

    su is the best. I mean, i should be using the admin (root) password for admin things, not the user password of user who is already logged in. And there needs to be a root service already running to make user have root previlages which is dumb imo. Sudo vulnerability could cause previlage escalation but if there is no root process managing this, then it can’t leak the root access. Only kernel security issue(or other root processes) will leak root access if that was the case, which i think is better.

    • Cryxtalix@programming.dev
      link
      fedilink
      arrow-up
      4
      ·
      edit-2
      2 days ago

      The permission to do admin things is given by the root user, to your account. So you have to verify your identity by entering your password.

      Isn’t that how it is? I though that was analogous to how almost everything worked IRL. Whether withdrawing funds from a bank or engaging government services, you prove your identity as a customer/citizen to get the relevant services. At no point do you login to bank or government computers with full privileges.

      • mexicancartel@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 day ago

        If you own your own bank, then i think you login as the one with full previlages. Yes when doing administrator things, you have to use sudo. The problem with root with sudo is, you authenticate as a user, then gain full permission from root, i.e analogous to login in to bank with full previlages.

        As a person who need to run sudo command its better to just verify yourself as root user to gain “full access”. I’m not saying about partial previlages. That is i just need a script which is just su -c with environment variables being copied

    • shapis@lemmy.ml
      link
      fedilink
      arrow-up
      20
      ·
      edit-2
      3 days ago

      Funny. I didn’t know a single thing about the person. But that commit message made me like him more.

      Ofc assuming he was just making a light-hearted joke in it.

      • steeznson@lemmy.world
        link
        fedilink
        arrow-up
        12
        ·
        3 days ago

        Users were complaining that their terminal transparency was being broken by the nspawn container and that the colour for other applications like tmux were being affected by it. For example tmux was appearing in the same navy blue in the terminal emulator instead of its usual green.

        Idk he’s just a hot take merchant basically. He has a particular hate-boner for distros that don’t use systemd as the default init system like void and gentoo (usually these are troll tweets as opposed to commit messages though).

        • Vilian@lemmy.ca
          link
          fedilink
          arrow-up
          2
          ·
          3 days ago

          Idk he’s just a hot take merchant basically. He has a particular hate-boner for distros that don’t use systemd as the default init system like void and gentoo (usually these are troll tweets as opposed to commit messages though).

          shut up, wtf that has todo with the commit, people who don’t use systemd it’s not going to complain about the color of something that they don’t use

      • Vilian@lemmy.ca
        link
        fedilink
        arrow-up
        5
        ·
        3 days ago

        ok them go suffer alone in your 2004 distro that can’t update bash because it break the 400 scripts that it use to boot lmao

  • LainTrain@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    64
    ·
    4 days ago

    If you make users sign in too much, they will just make their passwords short and easy to remember, even 24hrs is too much and people bitch about it all the time, especially since we have password managers enforced, meaning every time they need to Auth they need to Auth into their system, Auth into their password manager, copy the password, auth into their phone, look at the 2FA code and type that in.

    Doing this every day just to open email is understandably fucking enraging even to me as a security “”“engineer”“”/analyst/${bullshitblueteamemailreaderjob}

    Press it harder and they will use simple passwords that will inevitably be passed through to something external (e.g. cockpit which even I can bruteforce) or reused somewhere at some point, and then someone just has to get lucky once and run whatever run0 sudo su <reverse shell bs here> to bypass all protections.

    • TBi@lemmy.world
      link
      fedilink
      arrow-up
      7
      ·
      3 days ago

      I agree with you. If i had to add my password everytime I’d just add my personal account to sudo group.

      Good security works with people, not against them.

  • AndrewZabar@lemmy.world
    link
    fedilink
    arrow-up
    10
    ·
    3 days ago

    I’m surprised they would implement having just run0 effectively log you in as root. For the super security conscious constrictions of the command versus sudo, it would seem that the very notion of elevating your privilege beyond the single command to be carried out, would be anathema to the whole goal of this new command. Evidently not, but it’s surprising to me.

    • Vilian@lemmy.ca
      link
      fedilink
      arrow-up
      1
      ·
      3 days ago

      you can run a command using run0 it’s only elevating that commads, sometimes it’s needed to login as root, it’s life

        • LeFantome@programming.dev
          link
          fedilink
          arrow-up
          4
          ·
          2 days ago

          They did not miss anything. They just used commas where periods should be.

          You can run a command using run0. It’s only elevating that command. Sometimes it’s needed to login as root. It’s life.

          The way it is written, semi-colons may be more appropriate but that would be a lot of them.

          • laughterlaughter@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            2 days ago

            You actually pointed out that they did, indeed, do miss a period (the one after “run0.”)

            you can run a command using run0 it’s only elevating that commads,

  • exu@feditown.com
    link
    fedilink
    English
    arrow-up
    40
    ·
    4 days ago

    I might try run0 for fun, but I don’t think it’ll replace sudo any time soon.
    The biggest issue I see is run0 purposely not copying any environment variables except for TERM.
    You’d have to specify which editor to use, the current directory, stuff like PATH and HOME every time you run a command.

    • sudo had several severe security bugs caused by copying env variables so I’m not surprised run0 isn’t doing much of that. I’ve had to help a whole bunch of people fix the permissions/ownership on their Jo. E directory after running sudo so I can even see the point of jot copying $HOME by default.

      I don’t think it’ll replace sudo necessarily, or doas would’ve done that already. It’s still useful as a shorthand for systemd-run and in some locked down system configurations I can see it being useful (i.e. when minimising the amount of SUID binaries). Maybe some elaborate enterprise setups will switch to it for security reasons, especially if they’re already leveraging PolKit heavily.

    • velox_vulnus@lemmy.ml
      link
      fedilink
      arrow-up
      7
      ·
      edit-2
      4 days ago

      Wouldn’t it be better to just use containers then? Nix and Guix has the exact thing - you get to control what variables you want to pass in.

      • exu@feditown.com
        link
        fedilink
        English
        arrow-up
        2
        ·
        3 days ago

        You can’t really install packages or modify configs on the host without root. Containers can only do some parts.

    • kbal@fedia.io
      link
      fedilink
      arrow-up
      6
      ·
      4 days ago

      I’m not a fan of the idea at all, but come on, it can’t really be that bad. There’s got to be somewhere you can tell it what environment variables to use. Probably something like run0 systemd-edit /usr/system/systemd/systemrun/run0-environment --system-default=system

      • exu@feditown.com
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 days ago

        Maybe, but now I still need to remember the alias or distribute it to any machine I’m working on.
        Not that difficult if you have everything managed with Ansible or similar anyways, but lots of people likely don’t have that setup.

    • qaz@lemmy.world
      link
      fedilink
      arrow-up
      14
      ·
      4 days ago

      sudo has more than 220k lines of code, I can definitely see the use of a simpler alternative.

        • TMP_NKcYUEoM7kXg4qYe@lemmy.world
          link
          fedilink
          arrow-up
          4
          ·
          edit-2
          3 days ago

          run0 is just an alias for a part of systemd, so installing doas too would be useless bloat. Another thing to note is that doas is just smaller sudo, you still wouldn’t use 99 % of its features.

          edit: also from my totally surface level understanding both sudo and doas “elevate your privileges” which is supposedly unnecessary attack surface. run0 does it in a better way which I do not understand.

          • Laser@feddit.org
            link
            fedilink
            arrow-up
            7
            ·
            edit-2
            3 days ago

            also from my totally surface level understanding both sudo and doas “elevate your privileges” which is supposedly unnecessary attack surface. run0 does it in a better way which I do not understand.

            sudo and doasare setuid binaries, a special privileged bit to tell the kernel that this binary is not run as the user starting it, but as the owner. A lot of care has to be incorporated into these to make sure you don’t escalate your privileges as the default interface is very limited, being a single bit.

            Another issue with this approach is that since you’re running this from your shell, the process will by default inherit all environment variables, which can be convenient, but also annoying (since a privileged process might write into your $HOME) or upright dangerous.

            run0doesn’t use that mechanism. systemd is, being a service manager at its core, something launching binaries in specialized environments, e.g. it will start an nginx process under the nginx user with a private tmp, protecting the system from writes by that service, maybe restrict it to a given address family etc. So the infrastructure to launch processes – even for users via systemd-run– is already there. run0 just goes one step further and implements an interface to request to start elevated (or rather with permissions different from their own) processes from a user’s shell.

            Classic solutions do it like this:

            1. user starts binary with setuid (let’s say sudo) that runs with root (because that’s the owner of the binary) privileges in their shell. Since this is a child process of their shell, it inherits all environment variables by default.
            2. sudochecks /etc/sudoers if that user is authorized to perform the requested action and either denies the request, performs it or asks for authentication.
            3. a new process is spawned from it, again inheriting the environment variables that were not cleaned, as you can’t get rid of variables by forking (this is often an issue if you have services that have their secrets configured via environment variables)

            With run0:

            1. user starts run0 binary as a user process. This process inherits the environment variables.
            2. run0 forwards the user’s request via interface to the running systemd process (pid 1 I guess). That process however does not inherit any variables by default, since it was started outside the user’s shell.
            3. systemd checks if the user who started the run0 binary is allowed to perform the requested operation and again, either denies the request, performs it or asks for authentication.
            4. a new process is spawned from it, but it will only receive the environment variables that were explicitly requested as there’s no inheritance.

            At least that’s my understanding, I haven’t looked too much into it or used it yet.

            • Vilian@lemmy.ca
              link
              fedilink
              arrow-up
              2
              ·
              3 days ago

              the pid1 part is wrong, only the systemd-init run in pid1, in it’s own process, own binary etc, it’s sole purpose is being an init system, after that it start the rest of the system, including the others systemd binaries

              the rest is perfect thanks!, in the lennart he made a comparation with ssh were you “forward the commad to run as root”, i think it’s a good analogy

          • Vilian@lemmy.ca
            link
            fedilink
            arrow-up
            2
            ·
            3 days ago

            . run0 does it in a better way which I do not understand.

            it does that in a “ssh like” that i read in the blog, they foward your commands, they don’t elevate your user, they also use polkit for security intead of sudoers

    • TMP_NKcYUEoM7kXg4qYe@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      3 days ago

      The original problem was to automagically prompt the user for password, if he tried to run some systemd executable without the wheel privileges. At some point they decided to reuse the code for [a command that allows you to run stuff as root] replacement because sudo is too bloated and vulnerable.

  • onlooker@lemmy.ml
    link
    fedilink
    arrow-up
    14
    ·
    3 days ago

    I don’t know, we’ll just have to see. But personally, I am not a fan of tying so many functionalities to systemd.

  • electricprism@lemmy.ml
    link
    fedilink
    arrow-up
    10
    ·
    3 days ago

    Sometimes I really hate the utility names people come up with.

    I would love to see chatgpt rename all the core utils in a way that summarizes their function.

  • ssm@lemmy.sdf.org
    link
    fedilink
    arrow-up
    26
    ·
    edit-2
    4 days ago

    No, it’ll just be yet another pile of bloat that’ll separate IBM distros and their followers (rhel, fedora, centos, debian, arch) from the rest (alpine, void, gentoo, devuan, *BSD).

      • ssm@lemmy.sdf.org
        link
        fedilink
        arrow-up
        18
        ·
        4 days ago

        Nah, I’m just referring to IBM’s acquisition of redhat. I’ve been referring to redhat as IBM in kind.

        • boredsquirrel@slrpnk.net
          link
          fedilink
          arrow-up
          52
          ·
          edit-2
          4 days ago

          And neither Arch, nor Ubuntu, nor Debian, nor OpenSUSE, nor any other distro using systemd belongs to IBM.

          systemd has nothing to do with any corporation doing bad stuff to “our Linux”.

          It is just newer software, doing more things more easily.

          Sure, the centralization is pretty damn bad. But for example replacing sudo is needed.

          • MonkderDritte@feddit.de
            link
            fedilink
            arrow-up
            18
            ·
            edit-2
            4 days ago

            But for example replacing sudo is needed.

            There’s plenty of 100-loc tools for that already. And doas, who has most of sudo’s server-features, is not much bigger.

            And they all work even without systemd or services.

          • bionicjoey@lemmy.ca
            link
            fedilink
            arrow-up
            13
            ·
            4 days ago

            But for example replacing sudo is needed.

            Seriously asking: what’s wrong with Sudo? And aren’t there already loads of alternatives?

            • maniii@lemmy.world
              link
              fedilink
              English
              arrow-up
              6
              ·
              4 days ago

              systemd nightmare needs to end. Too many broken garbage from malicious actors within the opensource community.

              Just as an experiment, get every distro to have at least 2 or 3 SysVInit / runit / rc.init alternatives, and you will see a MASS Migration back to SysVInit. Bash/shell script init functions were really dead simple and almost unbreakable/hackerproof.

              Systemd really needs to be thrown in the garbage dumps of history so we can finally have a UNIX-like boot back.

              • exu@feditown.com
                link
                fedilink
                English
                arrow-up
                28
                ·
                4 days ago

                As someone who writes bash scripts, fuck no, this is a terrible language and it shouldn’t be used for anything more complex than sticking two programs together.

                Also, parallelism goes right out of the window.

                Maybe you’d convince me with a real programming language.

                • db0@lemmy.dbzer0.com
                  link
                  fedilink
                  arrow-up
                  7
                  ·
                  3 days ago

                  Any time I see a grognard seriously suggest going back to bash for anything exceeding 10 lines of code it makes me very happy none of them are in control.

                • maniii@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  3
                  ·
                  4 days ago

                  Corpo sabotage of opensource. So many community projects are under the thumb of corpo insiders. It was a “cash-grab” a way to shoehorn and takeover an essential but mostly unchanged and stable Init system. And they shimmed that into everything they could ram it into with no options or alternatives.

              • Vilian@lemmy.ca
                link
                fedilink
                arrow-up
                3
                ·
                3 days ago

                that’s some high ammount of copium from someone that never made a distro

          • ssm@lemmy.sdf.org
            link
            fedilink
            arrow-up
            13
            ·
            edit-2
            4 days ago

            And neither Arch, nor Ubuntu, nor Debian, nor OpenSUSE, nor any other distro using systemd belongs to IBM.

            Where did I say they belong to IBM?

            Sure, the centralization is pretty damn bad. But for example replacing sudo is needed.

            We already have doas, which is such a simple codebase I’d have a hard time imagining it contains a bug that leads to setuid being a problem. run0’s codebase size on the other hand…

          • GolfNovemberUniform@lemmy.ml
            link
            fedilink
            arrow-up
            5
            ·
            4 days ago

            Btw can RH as the biggest contributor to systemd make it paid like it did with RHEL? Then it’s going to be the death of the free and independent Linux desktop for quite a while.

            • Aqler@discuss.online
              link
              fedilink
              arrow-up
              13
              ·
              4 days ago

              Don’t spread lies, misinformation and/or FUD.

              Btw can RH as the biggest contributor to systemd make it paid like it did with RHEL?

              It’s not. They’ve only made it harder for other parties to freely benefit from RHEL’s hard work at the expense of RHEL.

              • GolfNovemberUniform@lemmy.ml
                link
                fedilink
                arrow-up
                5
                ·
                4 days ago

                Don’t spread lies, misinformation and/or FUD.

                Uhm what? I asked a question bruh.

                They’ve only made it harder for other parties to freely benefit from RHEL’s hard work

                True but they still can find something to hurt everyone. Not like I think it will happen but it is a problem with centralization and a company being behind a big and important product.

                • Aqler@discuss.online
                  link
                  fedilink
                  arrow-up
                  8
                  ·
                  edit-2
                  4 days ago

                  Uhm what? I asked a question bruh.

                  The bold parts include a false claim; i.e. Red Hat made RHEL paid.. So it’s perfectly possible to include a lie, piece of misinformation and/or straight up FUD within a question.

                  True but they still can find something to hurt everyone. Not like I think it will happen but it is a problem with centralization and a company being behind a big and important product.

                  I agree with you that Red Hat is indeed way too powerful in this realm. Hence, there will inevitably always be the fear that they might (somehow) misuse their power. So far, they’ve been mostly benevolent and I hope it will stay that way. There’s no fault at being cautious, but this should never lead us towards toxic behavior.

                  EDIT: Why the downvotes?

            • gh0stcassette@lemmy.blahaj.zone
              link
              fedilink
              arrow-up
              1
              ·
              3 days ago

              No, it’s licensed under the LGPL, which means source code can be freely distributed and distros would continue to package it for free no matter how hard Redhat tried to paywall it.

            • ssm@lemmy.sdf.org
              link
              fedilink
              arrow-up
              3
              ·
              edit-2
              4 days ago

              If IBM makes redhat do something that greedy and stupid (it’d be more likely to happen with a distribution like fedora or centos than userland components), we have plenty of existing infrastructure to fall back on.

              • GolfNovemberUniform@lemmy.ml
                link
                fedilink
                arrow-up
                1
                ·
                4 days ago

                (it’d be more likely to happen with a distribution like fedora or centos than userland components

                I mean, if they make an actual workstation distro and kill systemd’s real FOSS nature, everyone else will have to spend some time rebuilding their distros with other init systems. That’ll be quite a sabotage.

            • boredsquirrel@slrpnk.net
              link
              fedilink
              arrow-up
              2
              ·
              4 days ago

              RedHat is not restricting access to any upstream project. They package things in extremely stable form, which means they need to manage like all the software themselves and do tons of backports, as normally software just releases new versions.

              They restrict access to these packages.

              So yes, their 5 years old systemd with backported security fixes may be restricted. But not the normal systemd you can install anywhere.

            • maniii@lemmy.world
              link
              fedilink
              English
              arrow-up
              1
              ·
              4 days ago

              You are not wrong. IBM management paralleled in the same cash-grab and exit C-suite functions that has consumed Redhat. That is why the merger happened.

              Soon, Purple Hat should be charging for systemd and hopefully other corpos and organizations will move back to sanity.

              • Chewy@discuss.tchncs.de
                link
                fedilink
                arrow-up
                5
                ·
                4 days ago

                Soon, Purple Hat should be charging for systemd and hopefully other corpos and organizations will move back to sanity.

                From systemd licenses readme:

                Unless otherwise noted, the systemd project sources are licensed under the terms and conditions of LGPL-2.1-or-later (GNU Lesser General Public License v2.1 or later).

                New sources that cannot be distributed under LGPL-2.1-or-later will no longer be accepted for inclusion in the systemd project to maintain license uniformity.

                I can understand critism of systemd for its tools only working with itself and not with any other Unix tools. But it’s absolutely a conspiracy theory to think they’d want to charge for systemd. Though I do agree that if someone was charging for systemd (which they can’t because its open source), open source alternatives would pop up.

          • ssm@lemmy.sdf.org
            link
            fedilink
            arrow-up
            12
            ·
            4 days ago

            Arch ships redhat userland (systemd) and doesn’t support alternative userlands; you have to go to artix for that.

    • Aqler@discuss.online
      link
      fedilink
      arrow-up
      14
      ·
      4 days ago

      For clarity, because the obnoxious ones out there didn’t get it, this refers to how Arch, Debian, Fedora and most other distros just default to systemd and hence can (and probably will) make use of run0. While, on the other hand, distros like Alpine, Artix, Devuan, Void and others (including *BSD-systems) will not. For distros with no defaults (e.g. Gentoo), the user gets to decide.