The Belfry
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
dumnezero@piefed.social to linuxmemes@lemmy.worldEnglish · 3 months ago

sudo ...for windows

piefed.social

message-square
60
fedilink
289

sudo ...for windows

piefed.social

dumnezero@piefed.social to linuxmemes@lemmy.worldEnglish · 3 months ago
message-square
60
fedilink

https://learn.microsoft.com/en-us/windows/sudo/

alert-triangle
You must log in or register to comment.
  • cmnybo@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    126
    arrow-down
    1
    ·
    3 months ago

    So can you run sudo rm -rf C: to remove the malware now?

    • Khanzarate@lemmy.world
      link
      fedilink
      arrow-up
      40
      arrow-down
      1
      ·
      3 months ago

      No you can’t do that with administrator in windows.

      Some things, windows just won’t let you do, even as an administrator.

      • spujb@lemmy.cafe
        link
        fedilink
        English
        arrow-up
        6
        ·
        edit-2
        3 months ago

        which is good, to be clear

        no user should be able to accidentally brick their entire system just because some internet troll told them to type some magic words :P massive security flaw

        • LupertEverett@lemmy.world
          link
          fedilink
          arrow-up
          4
          ·
          3 months ago

          The Unix Haters Handbook was so real for that rm rant.

          • spujb@lemmy.cafe
            link
            fedilink
            English
            arrow-up
            2
            ·
            3 months ago

            haha TIL!

        • tippfehlr@discuss.tchncs.de
          link
          fedilink
          arrow-up
          2
          ·
          3 months ago

          *remove the french language pack ^^

  • OsrsNeedsF2P@lemmy.ml
    link
    fedilink
    arrow-up
    53
    arrow-down
    1
    ·
    3 months ago

    Way to lazy to find a source but IIRC one of the Sudo devs said this was horrible because it’s “like Sudo” but not 1:1 so people will make assumptions about it that will lead to security issues

    (Usually idc about security but for Sudo…)

    • breakingcups@lemmy.world
      link
      fedilink
      arrow-up
      69
      ·
      3 months ago

      Like that time they made their own Powershell imitation of curl? (before deciding it was an abomination and finally including stock curl, but not removing the old Powershell commandlet because of backwards compatibility so now curl and curl.exe are two different things and you’ll want the latter)

      • superkret@feddit.org
        link
        fedilink
        arrow-up
        45
        ·
        3 months ago

        Yeah that sounds like Microsoft.

      • Possibly linux@lemmy.zip
        link
        fedilink
        English
        arrow-up
        5
        ·
        3 months ago

        Or renaming things for seemingly no reason.

    • JackbyDev@programming.dev
      link
      fedilink
      English
      arrow-up
      16
      ·
      3 months ago

      Which is frustrating because 99% of the time people just want a way to run a command as admin without relaunching cmd as an admin.

    • Doc Dish@lemm.ee
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 months ago

      So it’s a pseudo sudo?

  • emergence_trailblazer@sh.itjust.works
    link
    fedilink
    arrow-up
    45
    arrow-down
    1
    ·
    3 months ago

    Wsl, sudo … Maybe step by step windows will turn into Linux. For sure it would be an unexpected way for Linux to conquer the desktop market

    • Rikudou_Sage@lemmings.world
      link
      fedilink
      arrow-up
      35
      arrow-down
      2
      ·
      3 months ago

      Hardcore Linux users would still not count it and would still wait for Linux on desktop to finally take off.

      Source: Linux has 6.73% share on desktop. Except 2.25 percent points are ChromeOS, which is not FOSS enough, so Linux only has 4.48% on desktop.

      • алсааас [she/they]@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        20
        arrow-down
        2
        ·
        edit-2
        3 months ago

        There is no such thing as “FOSS enough” or “not enough FOSS” it’s either free/libre or it’s not

        (and ChromeOS most definitely isn’t)

        • Rikudou_Sage@lemmings.world
          link
          fedilink
          English
          arrow-up
          15
          ·
          3 months ago

          That was kinda heavy sarcasm.

          • алсааас [she/they]@lemmy.dbzer0.com
            link
            fedilink
            arrow-up
            3
            ·
            3 months ago

            huh, was not able to get that from your comment. I usually use “/s” in cases like that

            • Midnight Wolf@lemmy.world
              link
              fedilink
              English
              arrow-up
              5
              ·
              3 months ago

              sudo /s

      • bitchkat@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        3 months ago

        If I could replace the windows ui with gnome, I’d do it.

        • Midnight Wolf@lemmy.world
          link
          fedilink
          English
          arrow-up
          6
          ·
          3 months ago

          gnome kde

          ftfy

        • Rikudou_Sage@lemmings.world
          link
          fedilink
          English
          arrow-up
          3
          ·
          3 months ago

          Hmm, now that you mention it, you got me thinking I’d actually like the Win11 UI on Linux (without the ads and tracking, of course).

    • gandalf_der_12te@discuss.tchncs.de
      link
      fedilink
      arrow-up
      10
      ·
      3 months ago

      at one point, microsoft will put all of their software into a VM and ship that on a linux platform. that will do.

      • Rooty@lemmy.world
        link
        fedilink
        arrow-up
        9
        ·
        3 months ago

        Do what Apple did - take the BSD kernel and build the userland on top of it. NT is fucked beyond repair, let it die.

      • ⛓️‍💥@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        5
        ·
        3 months ago

        They essentially would just need to develop their own Wine

        • Midnight Wolf@lemmy.world
          link
          fedilink
          English
          arrow-up
          6
          ·
          3 months ago

          (in the tone of “I’d like a Pepsi” “Is Coke okay?”)

          “is Wine Beer okay?”

    • Wispy2891@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      edit-2
      3 months ago

      And don’t forget the horrible practice of putting everything in ~/ because everyone loves cluttered home directories

      I tried the new Microsoft aishell on Windows 11 and the config is saved on ~\.aishell instead of %appdata%\\Microsoft\aishell

      WTF Microsoft you forgot that you’re on windows?? Can you follow the guidelines that you decided?

    • Treczoks@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      3 months ago

      Maybe one day, the Windows UI will only be one of the many Linux window managers, and the rest of Windows will just be a compatibility layer.

  • gandalf_der_12te@discuss.tchncs.de
    link
    fedilink
    arrow-up
    35
    arrow-down
    1
    ·
    3 months ago

    look what they have to do to mimic a fraction of our power

    • Sarcasmo220@lemmy.ml
      link
      fedilink
      arrow-up
      9
      ·
      3 months ago

      That’s immediately what came to mind when I saw it

  • Siegfried@lemmy.world
    link
    fedilink
    arrow-up
    28
    arrow-down
    1
    ·
    3 months ago

    Shoudlnt this be “admdo” or something like that?

    • phlegmy@sh.itjust.works
      link
      fedilink
      arrow-up
      14
      ·
      3 months ago

      Windo

      • Unbecredible@lemm.ee
        link
        fedilink
        English
        arrow-up
        3
        ·
        3 months ago

        Is that where you get that black jedi to do it for you? Cause that sounds problematic.

  • ☂️-@lemmy.ml
    link
    fedilink
    arrow-up
    26
    ·
    3 months ago

    no, microsoft. the linux cli tools are good but thats not the main reason why we ditched you.

    • babybus@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      5
      ·
      3 months ago

      Definitely not due to the lack of sudo.

  • bruce965@lemmy.ml
    link
    fedilink
    arrow-up
    22
    ·
    edit-2
    3 months ago

    FYI this has already been a thing for a long while thanks to an open source third-party implementation, and also works on Windows 10. I use it all the time, it’s very similar to Linux’s and I’ve never had any issues so far. Not sure if Microsoft’s official solution will be any different/better.

    https://github.com/gerardog/gsudo

  • Possibly linux@lemmy.zip
    link
    fedilink
    English
    arrow-up
    18
    arrow-down
    2
    ·
    3 months ago

    They know they are losing a lot of the technical crowd…

  • f4f4f4f4f4f4f4f4@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    15
    ·
    3 months ago

    sudon’t

  • ColdWater@lemmy.ca
    link
    fedilink
    arrow-up
    18
    arrow-down
    3
    ·
    3 months ago

    🤡

    • muhyb@programming.dev
      link
      fedilink
      arrow-up
      11
      ·
      3 months ago

      Don’t need sudo to run clown

      • boringbisexual@lemmy.blahaj.zone
        link
        fedilink
        arrow-up
        6
        ·
        3 months ago

        What does the “cl” stand for?

        • muhyb@programming.dev
          link
          fedilink
          arrow-up
          2
          ·
          3 months ago

          color owner? :)

  • TimeSquirrel@kbin.melroy.org
    link
    fedilink
    arrow-up
    11
    ·
    3 months ago

    Is this just some sort of alias to “runas”?

    • JackbyDev@programming.dev
      link
      fedilink
      English
      arrow-up
      5
      ·
      3 months ago

      I believe so, yeah. I used to have a script that would start a local Cassandra service and that’s what I had to use (because I didn’t want my live-in session of cmd to be admin 24/7.

  • HStone32@lemmy.world
    link
    fedilink
    arrow-up
    11
    ·
    3 months ago

  • f4f4f4f4f4f4f4f4@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    8
    ·
    3 months ago

    $ sudo usermod -l root susudio

    $ su susudio

    # ohh

    Don’t do this, it summons an angry Phil

  • Pippipartner@discuss.tchncs.de
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    3 months ago

    It feels like a potential security nightmare. If your desktop at work is compromised and you have your domain admin come over and take a look; they might decide not to elevate the whole session, exercising appropriate caution and protocol in doing so, but just wing it with a quick sudo !! because the previous command didn’t go through.

    I don’t quite remember if this works properly, but I think !! should expand to sudo “previous command” at least in bash.

    • spujb@lemmy.cafe
      link
      fedilink
      English
      arrow-up
      4
      ·
      3 months ago

      it uses the UAC flow so it’s closer to right click > run as administrator than runas, so you will be required to enter credentials in the UAC dialogue (not the terminal) unless you are using an admin account (which at any workplace taking security seriously you should not be)

      and in powershell it’s $$ to execute the previous command :)

      disclaimer: not an admin i just use these tools

  • einlander@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    3 months ago

    3rd party sudo for Windows https://github.com/janhebnes/chocolatey-packages/tree/master/Sudo

    • f4f4f4f4f4f4f4f4@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      6
      ·
      3 months ago

      • Tiger_Man_〔he/him〕@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 months ago

        Now do rm /bin/rm

linuxmemes@lemmy.world

linuxmemes@lemmy.world

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !linuxmemes@lemmy.world

Hint: :q!


Sister communities:
  • !tech_memes@lemmy.world
  • !memes@lemmy.world
  • !lemmyshitpost@lemmy.world
  • !risa@startrek.website

Community rules (click to expand)

1. Follow the site-wide rules
  • Instance-wide TOS: https://legal.lemmy.world/tos/
  • Lemmy code of conduct: https://join-lemmy.org/docs/code_of_conduct.html
2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like “every user of thing”.
  • Don’t get baited into back-and-forth insults. We are not animals.
  • Leave remarks of “peasantry” to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
4. No recent reposts
  • Everybody uses Arch btw, can’t quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
5. 🇬🇧 Language/язык/Sprache
  • This is primarily an English-speaking community. 🇬🇧🇦🇺🇺🇸
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
6. (NEW!) Regarding public figures

We all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.

  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.

 

Please report posts and comments that break these rules!


Important: never execute code or follow advice that you don’t understand or can’t verify, especially here. The word of the day is credibility. This is a meme community – even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don’t remove France.

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 662 users / day
  • 4.64K users / week
  • 9.54K users / month
  • 19.1K users / 6 months
  • 1 local subscriber
  • 24.9K subscribers
  • 1.44K Posts
  • 48.9K Comments
  • Modlog
  • mods:
  • Kevin@lemmy.world
  • zephyr@lemmy.world
  • rtxn@lemmy.world
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org