Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1261112 > unrolled thread

Bug#1114986: sudo: Strange Defaults regarding mail

Started bySven Geggus <lists@fuchsschwanzdomain.de>
First post2025-09-12 15:30 +0200
Last post2025-09-18 17:00 +0200
Articles 5 — 4 participants

Back to article view | Back to linux.debian.bugs.dist


Contents

  Bug#1114986: sudo: Strange Defaults regarding mail Sven Geggus <lists@fuchsschwanzdomain.de> - 2025-09-12 15:30 +0200
    Bug#1114986: sudo: Strange Defaults regarding mail Marc Haber <mh+debian-packages@zugschlus.de> - 2025-09-12 17:20 +0200
      Bug#1114986: sudo: Strange Defaults regarding mail Alexander Reichle-Schmehl <alexander@schmehl.info> - 2025-09-15 18:30 +0200
        Bug#1114986: sudo: Strange Defaults regarding mail Marc Haber <mh+debian-packages@zugschlus.de> - 2025-09-16 09:40 +0200
        Bug#1114986: sudo: Strange Defaults regarding mail Sven Geggus <sven-debian@geggus.net> - 2025-09-18 17:00 +0200

#1261112 — Bug#1114986: sudo: Strange Defaults regarding mail

FromSven Geggus <lists@fuchsschwanzdomain.de>
Date2025-09-12 15:30 +0200
SubjectBug#1114986: sudo: Strange Defaults regarding mail
Message-ID<Luc0F-eLYx-9@gated-at.bofh.it>
Package: sudo
Version: 1.9.16p2-3
Severity: minor

Hello,

looking at the default Email options in sudo I was wondering about the
rationale behind them.

Currently we have this:
Defaults	mail_badpass

On multi user systems with an MTA configured in a way that mail to root will
end up somewhere reasonable this will Email the Admin everytime a user
enters a false password but will not Email the Admin in case some automated
script checks if something like "sudo -s" works.

This is why I use mail_no_perms on my systems.

Regarding the sudo manpage *mail_badpass* is off by default so this seems to
be a Debian default to enable this option.

My personal opinion is that all mail should be off by default (like e.g.  in
the package unattended-upgrades) because nowerdays most systems do likely
not even have an MTA configured in a way which will direct mail to root to a
reasonable target.

However with real multi-user systems in mind where such mails are probably
desired for security reasons the better default whould then be arguably
mail_no_perms instead of mail_badpass.

Regards

Sven


-- System Information:
Debian Release: 13.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armel

Kernel: Linux 6.12.41+deb13-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages sudo depends on:
ii  init-system-helpers  1.69~deb13u1
ii  libapparmor1         4.1.0-1
ii  libaudit1            1:4.0.2-2+b2
ii  libc6                2.41-12
ii  libpam-modules       1.7.0-5
ii  libpam0g             1.7.0-5
ii  libselinux1          3.8.1-1
ii  libssl3t64           3.5.1-1
ii  zlib1g               1:1.3.dfsg+really1.3.1-1+b1

sudo recommends no packages.

sudo suggests no packages.

-- Configuration Files:
/etc/pam.d/sudo-i [file not found]
/etc/sudoers [Errno 13] Keine Berechtigung: '/etc/sudoers'
/etc/sudoers.d/README [Errno 13] Keine Berechtigung: '/etc/sudoers.d/README'

-- debconf-show failed

[toc] | [next] | [standalone]


#1261125

FromMarc Haber <mh+debian-packages@zugschlus.de>
Date2025-09-12 17:20 +0200
Message-ID<LudJ7-eNbs-11@gated-at.bofh.it>
In reply to#1261112
Hello Sven,

thanks for filing this.

On Fri, Sep 12, 2025 at 02:39:06PM +0200, Sven Geggus wrote:
> looking at the default Email options in sudo I was wondering about the
> rationale behind them.
> 
> Currently we have this:
> Defaults	mail_badpass

I think that's just a case of "we have always done it that way". Bdale 
commited that back in 2012.

> My personal opinion is that all mail should be off by default (like e.g.  in
> the package unattended-upgrades) because nowerdays most systems do likely
> not even have an MTA configured in a way which will direct mail to root to a
> reasonable target.

I can follow you here. I am inclined to remove that Defaults line (in 
unstable and therfore in forky) and put in a debian/NEWS item 
documenting the change.

What does the rest of the team think?

Greetings
Marc

[toc] | [prev] | [next] | [standalone]


#1261567

FromAlexander Reichle-Schmehl <alexander@schmehl.info>
Date2025-09-15 18:30 +0200
Message-ID<Lvkfw-fxuY-13@gated-at.bofh.it>
In reply to#1261125
Hi!


Am 12.09.25 um 17:17 schrieb Marc Haber:

>> Currently we have this:
>> Defaults	mail_badpass
[..]
>> My personal opinion is that all mail should be off by default (like e.g.  in
>> the package unattended-upgrades) because nowerdays most systems do likely
>> not even have an MTA configured in a way which will direct mail to root to a
>> reasonable target.
> 
> I can follow you here.

I don't know how often someone asked me, what that message about 
notifying the admin about some sudo stuff actually meant.  Isn't there 
even an xkcd comic about it?

 > I am inclined to remove that Defaults line (in> unstable and therfore 
in forky) and put in a debian/NEWS item
> documenting the change.
> 
> What does the rest of the team think?

In favour of it.  May I prepare a MR for that for practice? Would be 
soonest Wednesday.



Best regards,
   Alexander

[toc] | [prev] | [next] | [standalone]


#1261650

FromMarc Haber <mh+debian-packages@zugschlus.de>
Date2025-09-16 09:40 +0200
Message-ID<Lvys9-fHya-3@gated-at.bofh.it>
In reply to#1261567
On Mon, Sep 15, 2025 at 06:27:06PM +0200, Alexander Reichle-Schmehl wrote:
>In favour of it.  May I prepare a MR for that for practice? Would be 
>soonest Wednesday.

Go ahead please! It is good for everybody to practise such workflows 
with simple things.

Greetings
Marc



-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421

[toc] | [prev] | [next] | [standalone]


#1262079

FromSven Geggus <sven-debian@geggus.net>
Date2025-09-18 17:00 +0200
Message-ID<Lwoh3-gk0K-5@gated-at.bofh.it>
In reply to#1261567
Alexander Reichle-Schmehl schrieb am Montag, den 15. September um 18:27 Uhr:

> I don't know how often someone asked me, what that message about notifying
> the admin about some sudo stuff actually meant.  Isn't there even an xkcd
> comic about it?

https://xkcd.com/838/

Regards

Sven


-- 
Threading is a performance hack.
(The Art of Unix Programming by Eric S. Raymond)

/me: Fediverse: @giggls@karlsruhe-social.de Web: http://blog.gegg.us/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.bugs.dist


csiph-web