#1012276 sudo: Usefulness of the --enable-admin-flag configuration option in Debian

Package:
sudo
Source:
sudo
Description:
Provide limited super user privileges to specific users
Submitter:
Vincent Blut
Date:
2022-07-05 13:27:03 UTC
Severity:
minor
#1012276#5
Date:
2022-06-02 17:39:39 UTC
From:
To:
Hi,

sudo 1.9.10-1 has adopted some changes from Ubuntu, including the activation of
the --enable-admin-flag configuration option.

At the moment, it does not seem valuable to have it enabled in Debian since all
it does is creating the empty sudo_as_admin_successful hidden file in the home
directory of the user calling sudo.

What makes this option interesting in Ubuntu is this code snippet in
/etc/bash.bashrc:

if [ ! -e "$HOME/.sudo_as_admin_successful" ] && [ ! -e "$HOME/.hushlogin" ] ; then
    case " $(groups) " in *\ admin\ *|*\ sudo\ *)
    if [ -x /usr/bin/sudo ]; then
		cat <<-EOF
		To run a command as administrator (user "root"), use "sudo <command>".
		See "man sudo_root" for details.

		EOF
    fi
    esac
fi

Until bash in Debian provides this, I propose that we drop this configuration
option (setting 'Defaults !admin_flag' in /etc/sudoers would work too). If this
is acceptable to you, I can send a merge request.


Thanks for your work on sudo,
Vincent
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQSRJQjHKbAUfuoc+DAQn1qAt/bgAQUCYpj12wAKCRAQn1qAt/bg
AShHAQCWXBDkaGr9XZPgNOz9ii1mgNwIbOj9clrHrWGWx+ExAgEAwWI1KKjxLSFE
94B2e6FleH9+DdDut1ojgglgyWLrVwA=
=vOFd
-----END PGP SIGNATURE-----

#1012276#10
Date:
2022-06-03 10:07:19 UTC
From:
To:
I'd rather add some more documentation what this does, so that people
can add code to their respective scripts. What is the harm done by the
option?

Greetings
Marc