this post was submitted on 30 Sep 2024
826 points (97.7% liked)

linuxmemes

20986 readers
1785 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack members of the community for any reason.
  • 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.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 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. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.

  • Please report posts and comments that break these rules!

    founded 1 year ago
    MODERATORS
     
    (page 2) 50 comments
    sorted by: hot top controversial new old
    [–] [email protected] 4 points 2 weeks ago (1 children)

    Can't programs steal sudo access if the timeout isn't 0?

    [–] [email protected] 1 points 2 weeks ago (1 children)

    If on a brand new rig, it's allowed.

    [–] [email protected] 1 points 2 weeks ago (1 children)
    [–] [email protected] 2 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

    Oh, sorry, I misread programs as programmers 😁.

    And no, I don't think so. Credentials need to be cleared before exectution.

    [–] [email protected] 1 points 2 weeks ago (1 children)

    Okay. So you must invoke sudo fr on the exact same shell? It cant be taken from a subsequent script?

    [–] [email protected] 2 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

    Credentials are inherited by every child process that the parent process invokes. Thus, if you give root credentials to a command, every subsequent command that the original one invokes will have root credentials.

    There are some exceptions, but these are special case scenarios and are literally only a few.

    [–] [email protected] 1 points 2 weeks ago (5 children)

    That doesnt at all answer my concern but I'll interpret the answer as no it doesn't do that.

    load more comments (5 replies)
    [–] [email protected] 3 points 1 week ago

    I'm partial to sudo bash myself 👌

    [–] [email protected] 3 points 1 week ago

    Use Sudo -i instead. Sudo su is like cat file | grep pattern vs grep pattern file. You're wasting resources.

    [–] [email protected] 1 points 2 weeks ago

    sudo su - ?

    load more comments
    view more: ‹ prev next ›