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.
The answer to the text of the question is: that would continue to work.
sudodoesn’t re-auth while a child process is still running, which in this case issu. Untilsuterminates,sudodoesn’t have anything to say about it. To be a bit more precise, the time limit for reauth would expire, butsudodoesn’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 -iinstead.