customize sudo prompt

Table of Contents

Intro

I am writing a wrapper that executes sudo anyconnect. I am then asked for a sudo password, then asked for the password that goes with my anycnonnect destination. Doing this repeatedly, especially where it might not ask the sudo password again because you are already logged in to SUDO for this session, it can be confusing which password it really wants. The answer1 can be installed in your .bashrc:

export SUDO_PROMPT="SUDO password:"

Now it is easy to recognize which of the two password is being requested.

Footnotes

1 Found at https://www.techrepublic.com/article/how-to-customize-your-sudo-password-prompt/

Tory Anderson avatar
Tory Anderson
Full-time Web App Engineer, Digital Humanist, Researcher, Computer Psychologist