you are viewing a single comment's thread
view the rest of the comments
[–] 50 points 1 day ago (10 children)

I already found another one!

echo $USER prints my current user name. Once I do USER=root it shows im running as root. And I wasn't even asked for my sudo password! :O :O :O

  • source
  • hideshow 10 child comments
  • [–] [S] 17 points 1 day ago (2 children)
  • [–] 18 points 1 day ago (1 child)

    You joke but at work our security office mass reset passwords because they saw a list of users in the pwd file. Even after others pointed out it was just a list of usernames not their credentials AND that it couldn't be the actual credentials as we're an AD shop

    They would definitely fall for that 😭

  • source
  • parent
  • hideshow 1 child comment
  • [–] 5 points 1 day ago (3 children)

    Huh. It is worth bearing in mind not to trust $USER before doing something based on it, though, if that thing is important.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 2 points 22 hours ago (2 children)

    The interesting thing is that bash allows writing this variable. I would've expected it to be readonly for obvious reasons.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 16 hours ago

    Right? And while Linux generally seems to let you shoot yourself in your foot if you'd really like to, things like --no-preserve-root mean they do put SOME guardrails out there. lol. $USER seems worth making immutable. heh

  • source
  • parent