• 1 Post
  • 15 Comments
Joined 1 year ago
cake
Cake day: June 11th, 2023

help-circle






  • Yeah, you’re quite correct, it’s not exactly equivalent, I just went on auto-pilot because it’s used so much for that purpose 🤖

    It’s much closer to being a true null-coalescing operator than ‘OR’ operators in other languages though, because there’s only two values that are falsy in Ruby: nil and false. Some other languages treat 0 and "" (and no doubt other things), as falsy. So this is probably the reason Ruby has never added a true null-coalescing operator, there’s just much fewer cases where there’s a difference.

    It’s going to drive me mad now I’ve seen it, though 😆 That’s usually the case with language features, though, you don’t know what you’re missing until you see it in some other language!






  • zero_gravitas@aussie.zonetoLinux@lemmy.mlI F*cked up and I need help.
    link
    fedilink
    English
    arrow-up
    26
    ·
    edit-2
    11 months ago

    New to Linux so I’m sorry if I’m being ignorant, but it does seem crazy you can get access to a machine without the password.

    This is always the case, no matter what OS you use, unless you use full-disk encryption. User credentials are all just data on a disk, so if someone has physical access to your machine, and your disk isn’t encrypted, then they can access (and change) those credentials or any other data.

    See also: https://ostechnix.com/reset-windows-password-with-linux-live-cd/

    What’s even the point of having a password

    As you say, preventing remote access is one, but also a password will slow someone down a bit, and stop low-knowledge adversaries entirely, possibly. Also you will at least know someone has messed with your machine if they change the password.

    Really, though, there’s nothing malicious someone can do to an unencrypted computer by changing the password that they couldn’t do without changing the password (copy all your files, delete all your files, install malicious software). Except I guess annoying you by making you change your password back. 😆