I want to make Linux my main OS. I’ve used Windows for decades. Since Vista or 7, the Windows security model is this, from what I understand:

  1. unprivileged programs have limited/no ability to do scary things to your computer. they might be able to read some data, but it’s not going to implant malware in the boot sequence for Windows.
  2. if a program wants escalation, it triggers a UAC popup and the user has to accept it. Remote programs cannot accept UAC on a physical person’s behalf. Escalated programs have admin level control and can do the scary things.
  3. As with any OS, there may be privilege escalation vulnerabilities that escalate (1) into (2).

I’ve only had Windows malware a few times since Win7, and the entry point was fairly avoidable. (Running a sketchy EXE, and a possible drive-by malware install via an advertisement. I could never prove the latter.)

I have never run a password on my Windows machines.


On any system, physical access is game over.


On Linux, the password is paramount. I’ve tried to understand the security model and I keep failing. Synthesizing from arch wiki

SSH

Equivalent to local physical access as the user. If it’s a sudoers or root account, it can do scary things. Not a threat if ssh is disabled or well secured (password or key pairs).

If a network has a well configured firewall (on the router), it should block ssh requests from outside the network unless the admin specifically wants SSH outside the network.

As with any OS, there may be bugs that allow remote access outside of SSH.

Local login / password prompts to physical users

Without a password, you can’t escalate to root and install new software. Some software, often dealing with hardware (smartctl) requires sudo/root to run.

Encrypted drives

Passwords can decrypt drives if they are encrypted.

Keyrings

Some DEs (KDE) offer a ‘keyring’ that stores passwords. It’s locked/encrypted with a password, usually the same as the login password.


So what am I missing? Is Windows + UAC + no password secure? What is Linux protecting us from by using passwords?

  • nyan@sh.itjust.works
    link
    fedilink
    arrow-up
    5
    ·
    1 hour ago

    I think part of what you’re missing may be a set of very old assumptions about where the danger is coming from.

    Linux was modeled after UNIX, and much of its core software was ported from other UNIX versions, or at least written in imitation of their utilities. UNIX was designed to be installed on large pre-Internet multi-user mainframe+dumb terminal systems in industry or post-secondary education. So there’s an underlying assumption that a system is likely to have multiple human users, most of whom are not involved in maintaining the system, some of whom may be hostile to each other or to the owner of the system (think student pranks or disgruntled employees), and they all log in at once. Under those circumstances, users need to be protected from each other, and the system needs to be protected from malicious users. That’s where the system of user and root passwords is coming from: it’s trying to deal with an internal threat model, although separating some software into its own accounts also allows the system to be deployed against external threats. Over the years, other things have been layered on top of the base model, but if you scratch the paint off, you’ll find it there underneath.

    Windows, on the other hand, was built for PCs, and more or less assumes that only one user can be logged in to a machine at a time. Windows security is concerned almost entirely with external threats: viruses and other malware, remote access, etc. User-versus-user situations are a very minor concern. It’s also a much more recent creation—Windows had essentially no security until the Internet had become well-established and Microsoft’s poor early choices about macros and scripts came back to bite them on the buttocks.

    So it isn’t so much that one is more secure than the other as that they started with different threat models and come from different periods of computing history.

  • thingsiplay@beehaw.org
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    5 hours ago

    If no password is needed to do authentication, then any script and any user is able to do whatever they want on your system. Basically every script and application has root access by default. That is something you do not want to have. Even more important in multiuser environments.

  • HelloRoot@lemy.lol
    link
    fedilink
    English
    arrow-up
    15
    ·
    edit-2
    7 hours ago

    What is Linux protecting us from by using passwords?

    I’d argue: from yourself.

    On windows I often spam clicked through dialogues and popups and without thinking got malware or some other unwanted outcome.

    On linux, when asked for a password it takes effort to type, so I have a moment of my lazy brain resisting and asking “do we really need to do that” and it makes the action more conscious and responsible. I cought myself one step from fucking something up multiple times this way.

    I had some viruses and malware on windows, just like you. But I never had them on linux in mt 15 years of daily driving it.

  • flatbield@beehaw.org
    link
    fedilink
    English
    arrow-up
    13
    ·
    8 hours ago

    If you have never used a password on windows or some other authentication mechanism then your Windows is not very secure.

    Most of the differences you quote are pretty much the same both systems.

    I guess the one exception is the UAC prompt which on Linux is a bit more secure in that is requires a password. Some random person or app cannot just click through it.

    • False@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      3 hours ago

      UAC can be configured to require a password, just like sudo can be required to not require a password. These things function the same on Windows and Linux.

  • hades@feddit.uk
    link
    fedilink
    arrow-up
    23
    ·
    11 hours ago

    I think the basic premise of this question, that Windows and Linux somehow have a different foundational security model that is or isn’t based on passwords, is not really true. Passwords play more or less the same role for any modern operating system – be it Linux, MacOS, Android, iOS, etc.

    The only major difference is that instead of UAC, Linux has a variety of options (sudo, policykit, run0), which are implemented differently across different distributions. If your privileged user doesn’t have a password, in some cases this could lead to any program being able to elevate their privilege quietly, unlike UAC.

    However, in many distributions you can set up a user with a password and enable passwordless local login, which would be almost equivalent to windows with no password.

    Answering your question directly, the major threat to most consumer users is physical compromise or theft of device. Your statement that “physical access is game over” is not entirely accurate: disk encryption with a password is a very strong protection against unauthorized data access, but you need to use a password (doesn’t matter if it’s Linux or Windows).

    • Oinks@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      5
      ·
      edit-2
      5 hours ago

      If your privileged user doesn’t have a password, in some cases this could lead to any program being able to elevate their privilege quietly, unlike UAC.

      I think this is the most important part. There really isn’t any protection against random processes trying to do some version of exec sudo $0 except for the fact that it requires a password.

    • HelloRoot@lemy.lol
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      1
      ·
      7 hours ago

      it always baffles me when people set up disk encryption with the TPM instead of a password

        • coltn@lemmy.ml
          link
          fedilink
          English
          arrow-up
          3
          ·
          edit-2
          2 hours ago

          personally, i have my system is completely off and i boot it up, i just use my luks password then the system is set to auto log into my environment (only one password required)–then if my system is asleep, when i wake it up it will just go to my lock screen where i can use my fingerprint or user password.

  • SayCyberOnceMore@feddit.uk
    link
    fedilink
    English
    arrow-up
    8
    ·
    12 hours ago

    Not really sure what you’re asking here

    Is Windows + UAC + no password secure?

    No.

    What is Linux protecting us from by using passwords?

    Bad humans & mistakes. But Linux doesn’t need passwords.

    Linux & Windows came from a command-line history, so things like UAC are just a GUI version of sudo (and there is (was?) a Linux equivalent if you wanted it)

    So, consider these as options on either OS. If you want it, it’s there, if you don’t, don’t - other options exist depending on your uae case (ie SSH keys, biometrics, etc…)

    To the point; not using a password is a choice on convenience over protection.

    • pastermil@sh.itjust.works
      link
      fedilink
      arrow-up
      6
      ·
      11 hours ago

      Linux & Windows came from a command-line history, so things like UAC are just a GUI version of sudo (and there is (was?) a Linux equivalent if you wanted it)

      Can confirm that the GUI versions of sudo (and similar privilege escalation interface) exist on Linux, at least for KDE, in the form of kdesu.

  • just_another_person@lemmy.world
    link
    fedilink
    arrow-up
    30
    arrow-down
    2
    ·
    15 hours ago

    Any OS with no password is insecure. Hands down.

    Linux/Unix has a permissions structure that works at the filesystem level, to be really brief about it.

    Files are owned by users. Users can be part of groups to represent a larger number of users for simple organization.

    Regular users can only touch files they own, or are owned by a group they are in. Root has master permissions to anything.

    As a regular user, your home directory is owned by you. Anything you create is owned by you. All programs executed by you require that you have permissions to those things. Therefore if you’re just bouncing on the system and doing things, you can only harm the files that you own.

    Your account having a password prevents access to this account. Though it’s a regular user, anyone with that password can harm your files.

    The Root password allows anyone to execute or delete any files on the system. Anyone with this password can get to any file on the system, so you never let anyone know this password.

    Your assumption that SSH somehow has different passwords is incorrect. You make a user on a machine and you don’t prevent SSH access…then they can SSH in, but they’re still a regular user.

  • lagoon8622@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    2
    ·
    edit-2
    6 hours ago

    I will not address the core questions since others have. I will offer a solution that might do what you want. I disclaim all responsibility if you choose to do this.

    You can buy keyboards such that when you press a macro button, it will type an arbitrary string. Some Logitech keyboards have (had?) programmable keys that did this.

    I’m not suggesting this is a good solution, but it is a solution.

    Edit: idc about the downvotes on this, I’d probably downvote it too. But since OP keeps asking this question over and over and over and over and over and over again I gave him what he wants. I do not endorse doing this. I don’t do it, passwords are important

  • bizdelnick@lemmy.ml
    link
    fedilink
    arrow-up
    6
    ·
    12 hours ago

    What are passwordless solutions in Windows for remote access, disk/filesystem encryption, keyrings?

    BTW in all that cases a password can be replaced with a hardware token, for instance. It is just the simplest, most widely used and one of the less secure options.

  • oscardejarjayes [comrade/them]@hexbear.net
    link
    fedilink
    English
    arrow-up
    11
    ·
    edit-2
    14 hours ago

    Physical access isn’t game over, it’s only game over to a determined hacker. The vast majority of people aren’t competent enough for it to be an issue. It’s just like how a determined thief can get through almost any lock or door, but it takes effort and time, and skill which many casuals just won’t have.

    Full-disk encryption passwords are the most important password, they can prevent physical access from being game-over.

    Unix was originally designed to be multi-user, so different passwords protect different users from each other.

    Linux doesn’t have a UAC-without-passwords equivalent really, programs can interact with the Linux UAC equivalents just as much as you can, so the password makes sure it’s really you, and not a malicious program or person. UAC on Linux would require an almost fundamental architecture change, in a way contrary to most of how Linux is used now.

    Did you really never use a password with Windows? That seems wild to me.

    • oscardejarjayes [comrade/them]@hexbear.net
      link
      fedilink
      English
      arrow-up
      6
      ·
      14 hours ago

      The idea of not having a password at all is just so foreign to me, did you at least use biometrics or something?

      It seems like not having a password would make some UAC bypasses easier, too.

      • booty [he/him]@hexbear.net
        link
        fedilink
        English
        arrow-up
        2
        ·
        12 hours ago

        I never used a password on Windows because I’ve never seen a reason for one. No one touches my computer. That’s what the physical locks on my doors are for.

        I only use a password in Linux because it forces me to. The first thing I tried to do was disable it.

        • HelloRoot@lemy.lol
          link
          fedilink
          English
          arrow-up
          4
          ·
          edit-2
          7 hours ago

          Thats fine until it isn’t.

          Remember all the small folk people the government or other powerfull institutions fucked over in unjust ways for a wide range of reasons (sometimes down to personal grudges other times completely random)?

          Yeah, it would be super easy to put some incriminating files on your computers and lock you up for years. Your grandma would be really sad.

          Also on linux you can set everything to passwordless in polkit/sudoers or a blank password - it doesn’t actually force you and I’ve done that where it made sense (not on a PERSONAL computer)

          • booty [he/him]@hexbear.net
            link
            fedilink
            English
            arrow-up
            2
            arrow-down
            1
            ·
            5 hours ago

            If the government wants to fabricate a reason to prosecute me they’ll just bring some drugs to my house, the idea that they would go in with the plan to plant incriminating files on my computer (instead of just lying that there were incriminating files / showing a completely fake computer???) and then be foiled by a fucking password box and go “damn, he’s too clever for us, I guess we have to let him go” is just BEYOND ridiculous

        • oscardejarjayes [comrade/them]@hexbear.net
          link
          fedilink
          English
          arrow-up
          3
          ·
          edit-2
          11 hours ago

          Nobody lives with you? Or visits you? You don’t use a laptop ever? What if someone does get through your locks?

          You can set empty password up pretty easily, so you’ll just press enter to get through password prompts, just like how you’d click through password-less UAC prompts. Richard Stallman used to recommend that way back in the 80’s, on the big shared University machines.

          I highly recommend a full-disk-encryption password even if you don’t have a traditional computer password, it’ll keep your data extra safe. Imagine the feds raid your house because Hexbear got designated a Foreign Terrorist Organization, the feds couldn’t get any Hexbear data off of the disk if it’s locked.

          But it really feels like even if a password doesn’t add much security-wise, there’s basically no downside to it. My password is pretty long by conventional standards, but it takes a small fraction of a second to type it all out and login.

          • booty [he/him]@hexbear.net
            link
            fedilink
            English
            arrow-up
            2
            ·
            edit-2
            11 hours ago

            Nobody lives with you?

            My grandmother, who has no interest in my computer.

            Or visits you?

            No

            You don’t use a laptop ever?

            No

            What if someone does get through your locks?

            What if someone guesses your password? Why don’t you keep your computer in a custom built safe bolted to the floor? There’s always another level of security you could hypothetically require, I just live in reality where the truth is no one is touching my computer.

            there’s basically no downside to it.

            It takes a second or so every time (sometimes a couple of seconds, I’m not always booting my computer with the intent to type shit immediately) which adds up over time. Sometimes I mistype, wasting 10+ seconds. And the benefit of this mild inconvenience is nothing.

            • oscardejarjayes [comrade/them]@hexbear.net
              link
              fedilink
              English
              arrow-up
              4
              ·
              7 hours ago

              What if someone guesses your password?

              It’s randomly generated, brute forcing it should take years.

              Why don’t you keep your computer in a custom built safe bolted to the floor?

              I mean, I do keep it locked to stuff with a Kensington lock.

              Sometimes I mistype, wasting 10+ seconds

              Fair, sometimes caps lock will do that to me.

              I’m not saying you have to use a password, I’m just curious. I don’t think I know anyone IRL that doesn’t use a password with their computer.

              • booty [he/him]@hexbear.net
                link
                fedilink
                English
                arrow-up
                1
                arrow-down
                1
                ·
                4 hours ago

                It’s randomly generated, brute forcing it should take years.

                Cool, so they use any number of exploits to simply go around the password. The point isn’t that a password is easy to get through (just like a locked door isn’t easy to get through) it is that if you’re facing a determined attacker it doesn’t matter how secure it is. If they have physical unsupervised access to your PC, you’ve already lost.

                Fortunately for us all, these determined attackers do not exist. Nobody’s breaking my windows to boot up my fucking PC. The situation in which a password would help you is if someone has gone to the effort to bypass the physical security on your home, and then has no plan to deal with a password locked computer. They just take one look at it and go “welp, that’s it, everybody crawl back through the window then, watch the glass shards” Instead of picking up the entire PC and walking off with it, or yanking out the hard drives, or booting into their own preferred OS on a USB, or whatever else would actually happen if these made up attackers were real.

                • oscardejarjayes [comrade/them]@hexbear.net
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  44 minutes ago

                  I mean, that’s why full disk encryption (FDE) is more important than a normal user password, so when someone successfully has access they can’t get your data. The US government can’t force you to decrypt data, since passwords are considered protected by the 5th amendment.

                  Most crimes are crimes of opportunity, it’s unlikely that someone is robbing a house specifically for whats in your computer, so if they can’t mess around with your computer they’ll just try to steal anything else valuable in a home. If they do just take the whole computer, with full disk encryption I wouldn’t have to worry about them looking through my files, or impersonating me on the internet, or whatever.

                  I guess with your threat model having no user password just isn’t a big deal for you, it’s probably fine. FDE though…

    • hades@feddit.uk
      link
      fedilink
      arrow-up
      2
      ·
      11 hours ago

      UAC on Linux would require an almost fundamental architecture change, in a way contrary to most of how Linux is used now.

      I would say the challenge is not in the architecture, but in the general fragmentation of the ecosystem. PolicyKit is basically an equivalent to UAC, but it’s not used universally by everything that needs elevated access.

      • oscardejarjayes [comrade/them]@hexbear.net
        link
        fedilink
        English
        arrow-up
        5
        ·
        7 hours ago

        PolicyKit

        Technically polkit now, after the breaking change. It’s really not equivalent to UAC, because UAC does this “secure desktop” thing. Y’know how it becomes just the UAC prompt and a background sometimes? With no taskbar or other programs? It does that to restrict access to UAC.

        With polkit prompts, there’s nothing stopping a mouse automation tool from accepting the polkit elevation request, so passwordless would be a guaranteed escalation attack, I tested software clicking the polkit buttons. A tool can’t do that now only because it doesn’t now your password. Implementing a “secure desktop” in polkit would be a big change in the architecture of security for Linux.

        • hades@feddit.uk
          link
          fedilink
          arrow-up
          4
          ·
          6 hours ago

          Yeah, you’re not wrong. What I meant was that polkit is conceptually equivalent to UAC (at least it is supposed to solve the same problem). However it’s not really a fair comparison, as “polkit on Linux” isn’t one concrete thing you can analyse, it’s more of a pile of Lego blocks, which you could assemble any which way. In theory, with Wayland you could build a secure polkit agent that would not allow the malware to interact with it.

          In reality this is a moot point, as most privilege elevation is still done via sudo anyway.

  • dohpaz42@lemmy.world
    link
    fedilink
    English
    arrow-up
    11
    ·
    15 hours ago

    This may or may not help, but here’s my two cents:

    Windows was originally built to be as user-friendly as possible because its target audience are non-tech-savvy people. It then evolved into being a business OS. So security was never its first priority.

    UNIX was built for tech savvy people to do business-sensitive stuff, and required sophisticated security models. Linux was modeled after UNIX (Minix specifically), and thus inherited those same principles. It evolved to become more user friendly. But security remained a priority.

    Now, that said, both Windows and Linux are configurable. You can make Windows more secure with effort, just like you can make Linux less secure with effort (and I don’t mean simply using root all the time).

    There are diehards on both sides , and they will make excellent (or terrible) arguments for their favored OS. So you need to decide what works best for you and your use case and go with that. 😊

  • monovergent@lemmy.ml
    link
    fedilink
    arrow-up
    6
    ·
    edit-2
    13 hours ago

    It’s there to protect you from crimes of opportunity. Like if your car is locked, a thief could decide to pick the lock, smash the windows in, or find another victim, but they would have no second thoughts if your car were already unlocked. The password deters a casual hacker and buys you some time to notice and deal with anyone seriously trying to break in.

    In an ideal case of disk encryption and a well-designed lock screen, the password forces a would-be intruder to either spend lots of time guessing it or shut down the computer, thereby discarding the encryption key from memory and thwarting the attack.

  • I don’t use Windows often, so I might be missing some context - every Windows computer I’ve used has an account with a password that I need to type in sometimes, though admittedly not for every privileged operation. They prevent most people with physical access from doing anything, in the same way that the locks on your doors or windows do. Opportunistic actors are prevented from access.

    Most Linux distros probably tend to prompt you to actually type in your password more often, but:

    • SSH: if you aren’t connecting to your computer via SSH you have no reason to be running an SSH Server. In most cases, you should be using a key pair for auth, and the password for the key (if set) is what you’re typing in. This provides a layer of security beyond what a password-less key pair offers because physical access to your private key no longer grants access to the remote system without the password.
    • Encrypted drives: similarly adds a layer on top of physical access necessary to decrypt the data
    • Keyrings: password re-use is a bad thing, and re-using your login password for what amounts to a password manager is also not great practice, though admittedly relatively common