• Thurstylark@lemmy.today
    link
    fedilink
    English
    arrow-up
    14
    ·
    4 days ago

    The answer to the text of the question is: that would continue to work. sudo doesn’t re-auth while a child process is still running, which in this case is su. Until su terminates, sudo doesn’t have anything to say about it. To be a bit more precise, the time limit for reauth would expire, but sudo doesn’t ask for authorization, and therefore wouldn’t check if that timeout has elapsed, until the next invocation.

    To answer the spirit of the question: you should probably be using sudo -i instead.