Похожие чаты

I have a doubt... I'm writing a shell script which

automate the installation of packages and other things (you know, when reinstalling the OS to clean it up) and sometimes I need sudo privileges, but not always (sometimes it's even required to be a non-root user). If the shell script contains more than one sudo command, regardless of how many commands are in-between or how much time passes from one sudo command to the other, may the script prompt the sudo password again during its execution or it's enough to just type it for the first sudo command?

Tell me if I should explain it more clearly

2 ответов

18 просмотров

Technically it should not and if it doesn't work you can try piping password to sudo command for automation

Yes, it will prompt again after some time, unless you launch the script itself with sudo.

Похожие вопросы

Обсуждают сегодня

Карта сайта