Subject: change password prompt

From: Tony Baldwin <[email-masked]>
Date: Mon, 19 Sep 2016 09:59:03 -0400

I had, on a prior machine, changed the password prompt for sudo by 
adding something (it was "ENTER NUCLEAR LAUNCH CODE:" in fact) to the 
sudoers file, but at the moment I can not recall what/how I did it, but 
I'd like to do it again.
Anyone?

TIA
Tony

-- 
http://tonybaldwin.me
all tony, all the time

---

From: Reco <[email-masked]>
Date: Mon, 19 Sep 2016 17:25:33 +0300

Hi.

On Mon, Sep 19, 2016 at 09:59:03AM -0400, Tony Baldwin wrote:
> I had, on a prior machine, changed the password prompt for sudo by adding
> something (it was "ENTER NUCLEAR LAUNCH CODE:" in fact) to the sudoers file,
> but at the moment I can not recall what/how I did it, but I'd like to do it
> again.
> Anyone?

sudoers(5) says that you should change 'passprompt_override' setting.

Reco

---

From: Tony Baldwin <[email-masked]>
Date: Mon, 19 Sep 2016 11:01:33 -0400

> sudoers(5) says that you should change 'passprompt_override' setting.
I'm trying, but failing to find an example of how to use that, like the 
precise syntax to use.
The man page doesn't give any example, so it's not clear how to use it.

Thanks,
Tony

-- 
http://tonybaldwin.me
all tony, all the time

---

From: Reco <[email-masked]>
Date: Mon, 19 Sep 2016 18:21:16 +0300

Hi.

> The man page doesn't give any example, so it's not clear how to use it.

This line in /etc/sudoers works for me:

Defaults passprompt_override,passprompt="ENTER NUCLEAR LAUNCH CODE:"

Of course you should use visudo, not edit /etc/sudoers directly.

Reco

---

From: Cindy-Sue Causey <[email-masked]>
Date: Wed, 21 Sep 2016 14:53:02 -0400

On 9/19/16, Reco <[email-masked]> wrote:
>> >> adding

Having played along while lurking, I am so leaving that in there for
right now. The "for right now" disclaimer is that I'll likely forget
it's there when I overhaul things soon. That whole thing about our
/etc tweaks becoming a little more set off to the side during upgrades
(e.g. finding a more static permanent home), this is a silly example,
but it reminds me of being a part of chatting that topic up quite a
while back now.

There is so much out there that can be personalized in this way. Doing
so often inspires learning more about the internal developer side of
things, too, once one silly little tweak like this works.

Life Lesson Learned the Very Hard Way: My experience has been that
playing along with these things also easily leads to breaking things
beyond repair. If anyone else is thinking of quietly playing along
while lurking, make sure you back things up first.

May this thread trigger many more minds to dig deep, deep, deeper into
their Debian.....

Cindy :)

-- 
Cindy-Sue Causey
Talking Rock, Pickens County, Georgia, USA

* runs with duct tape *

---

From: Elimar Riesebieter <[email-masked]>
Date: Tue, 20 Sep 2016 12:08:22 +0200

* Reco <[email-masked]> [2016-09-19 18:21 +0300]:

[...] 
> Defaults passprompt_override,passprompt="ENTER NUCLEAR LAUNCH CODE:"

Try this:
Defaults passprompt_override,passprompt="^[[41;33;01mENTER NUCLEAR LAUNCH CODE:   ^[[00m"

Elimar
-- 
  "Talking much about oneself can also
   be a means to conceal oneself."
         -Friedrich Nietzsche

---

From: Hugo Vanwoerkom <[email-masked]>
Date: Mon, 19 Sep 2016 17:05:35 -0500

> Of course you should use visudo, not edit /etc/sudoers directly.

True. But I use mc, have done so for years and that seems to work. What 
am I endangering?

Hugo

---

From: Sven Hartge <[email-masked]>
Date: Tue, 20 Sep 2016 01:02:29 +0200

> True. But I use mc, have done so for years and that seems to work. What 

visudo locks the file against other edits at the same time. It also
syntax checks the file at the end to prevent errors resulting in lock
outs. And it sets the right and secure permissions on the file.

S°

-- 
Sigmentation fault. Core dumped.

---

From: Tony Baldwin <[email-masked]>
Date: Mon, 19 Sep 2016 11:37:06 -0400

> Defaults passprompt_override,passprompt="ENTER NUCLEAR LAUNCH CODE:"

Thanks, this was exactly what I needed!
and I'll use visudo, of course.

Tony

-- 
http://tonybaldwin.me
all tony, all the time