You are not logged in.

#1 2007-08-20 00:04:18

mrbug
Member
Registered: 2007-07-17
Posts: 221

sudo fortune?

At some point recently, my shell has begun insulting me if I type my password wrong while using sudo. I'm assuming that sudo now works with fortune-oneliners, but I'm not sure.

Is this a normal thing for sudo now? It seems to have happened with the last sudo upgrade. It used to say something like "Sorry, try again." Now it says stuff like this:

~$ sudo /etc/rc.d/httpd start
Password:
You type like i drive.
Password:
Are you on drugs?


Very weird, I must say, since it came out of nowhere.


dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)

Offline

#2 2007-08-20 00:12:51

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: sudo fortune?

I just looked through the CVS history; this seems to be new behaviour in 1.6.9p1 - it's built into sudo and enabled with --enable-all-insults in the ./configure line.

Interesting...

Offline

#3 2007-08-20 00:22:09

Jessehk
Member
From: Toronto, Ontario, Canada
Registered: 2007-01-16
Posts: 152

Re: sudo fortune?

Password:
You speak an infinite deal of nothing
Password:
My pet ferret can type better than you!

Isn't it great? wink

Offline

#4 2007-08-20 00:36:24

mrbug
Member
Registered: 2007-07-17
Posts: 221

Re: sudo fortune?

It caught me by surprise!

I'm not sure if I'll keep it enabled or rebuild it, though... It makes my brain have to process more than it should!


Honestly, though.. I keep expecting to see "Sorry, try again," and get caught by surprise every time. Maybe this will help me learn how to type my password without messing up a few times each time =-)


dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)

Offline

#5 2007-08-20 01:06:57

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,410
Website

Re: sudo fortune?

I can remember seeing a bug report asking for the insults to be enabled but it still came as a surprize when I first saw them

Offline

#6 2007-08-20 12:54:45

tom5760
Member
From: Philadelphia, PA, USA
Registered: 2006-02-05
Posts: 283
Website

Re: sudo fortune?

If you add the following line in your sudoers file:

Defaults !insults

That will disable the insults.  I don't really know why they had to be enabled by default, I probably would have preferred to make them optional.

Offline

#7 2007-08-20 12:59:50

harlekin
Member
From: Germany
Registered: 2006-07-13
Posts: 408

Re: sudo fortune?

I think it's a great feature. It doesn't really matter what's standing there as you expect your program to run or you expect an error message.
But this way, the error message is hilarious. (:

Maybe it's worth considering if it shall be made optional. But I think it's good that it was mandatory for some time as I didn't know sudo has such a feature. I'd enable it if it becomes optional.

Last edited by harlekin (2007-08-20 13:01:06)


Hail to the thief!

Offline

#8 2007-08-21 00:19:00

mrbug
Member
Registered: 2007-07-17
Posts: 221

Re: sudo fortune?

I wonder if fortunes can be injected into any other programs... I do know that Linux Mint gives you a fortune whenever you start a terminal [session].

(Yeah, I know that this isn't just "sudo || fortune" ...)


dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)

Offline

#9 2007-08-21 13:49:34

tom5760
Member
From: Philadelphia, PA, USA
Registered: 2006-02-05
Posts: 283
Website

Re: sudo fortune?

If you wanted fortunes for each terminal session, you could add 'echo `fortune`' to the end of your .bashrc.

Offline

#10 2007-08-22 12:10:08

bones
Member
From: Brisbane
Registered: 2006-03-24
Posts: 322
Website

Re: sudo fortune?

Just noticed this myself. The only problem is now is I delibrately type my password wrong to see what pops up.


"When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return."

Offline

#11 2007-08-22 13:08:17

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: sudo fortune?

bones wrote:

Just noticed this myself. The only problem is now is I delibrately type my password wrong to see what pops up.

ahah, nice big_smile

I think I'll disable NOPASSWD just for that.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#12 2007-08-23 10:51:56

mezoko
Member
Registered: 2005-03-26
Posts: 310
Website

Re: sudo fortune?

ditto ^^ big_smile


"The only thing we have to fear is fear itself." - Franklin D. Roosevelt

Offline

#13 2007-08-23 14:51:02

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: sudo fortune?

Hm... maybe we should turn this off by default...  I don't like it when my computer talks back.

Offline

#14 2007-08-23 15:21:21

STiAT
Member
From: Vienna, Austria
Registered: 2004-12-23
Posts: 606

Re: sudo fortune?

Heh, i had a great laugh with this insults today big_smile.
It's not as boring as the other common version big_smile

Password:
Are you on d_rugs?
Password:
Your mind just hasn't been the same since the electro-shock, has it?
Password:
I can't hear you -- I'm using the scrambler.

Last edited by STiAT (2007-08-23 15:21:55)


Ability is nothing without opportunity.

Offline

Board footer

Powered by FluxBB