howto use passprompt_override in sudoers file?

0

I had, on a prior machine, used passprompt_override in the sudoers file to change the prompt to:

ENTER NUCLEAR LAUNCH CODE: (instead of the old boring enter password:) But now, for the life of me, I can't recall how to do it, like what to actually add to/write in the file, and the man page isn't particularly forthcoming with examples, does anyone know how to use this feature?

If it's relevant, I'm on Debian/Jessie 8.5

tonybaldwin

Posted 2016-09-19T15:11:22.777

Reputation: 111

Try searching for "prompt" in man 5 sudoers. – Arnold Beiland – 2016-09-19T15:48:25.657

Answers

1

I would recommend adding and alias to your .bashrc file instead of modifying your sudoers file. you can accomlish this by doing the following:

1.open your .bashrc file

2.go to the section that has ls alias's

3.at the bottom of the list type the following:

 alias sudo='sudo --prompt="ENTER NUCLEAR LAUNCH CODE:"'

4.save and close the file

5.Test

Make sure you add the last single quote or else it wont work.

thesoundman20

Posted 2016-09-19T15:11:22.777

Reputation: 359

That is super interesting. I'd have never thought of this. – CoreyJJohnson – 2018-01-30T18:50:40.910

0

Use visudo to modify your sudoers policy; add the following line.

Defaults passprompt="ENTER NUCLEAR LAUNCH CODE:"

You may have to also add the following line.

Defaults passprompt_override

https://www.sudo.ws/man/1.8.16/sudoers.man.html

CoreyJJohnson

Posted 2016-09-19T15:11:22.777

Reputation: 126