|Perl: the Markov chain saw|
Re^5: Greetings and salutations | sudoby afoken (Canon)
|on Mar 03, 2020 at 21:04 UTC||Need Help??|
How about sticking to the original unix ideal, with a root account. Only root can modify the system.
That simply does not scale. Yes, it's ok if you have exactly one admin. Maybe if it's your own single-user machine. But if you have a bunch of servers, perhaps distributed across more than one location, this will not work. You don't want to have a biological single point of failure, and you do not want to share the root password. That's why Unix has a wheel group, and the Debian people decided that it is better to have a sudo group. You need several admins, and you need to have a log who messed up which parts of the system. That's why sudo can log so much information. And that's why sudo can be tweaked to grant only limited root access.
Slackware still runs that way.
That's not correct. Out of the box, Slackware demands a root password, and installing sudo is optional. In the default setup, sudo is installed, but you have to adapt it to your local policies. You have to do that anyway, and as usual, Slackware does not enforce a specific configuration.
In the most simple case, uncomment one of the three group configurations from /etc/sudoers, and add one or more users to either the wheel or the sudo group:
Starting from the last line, this is the Debian way of configuring sudo. Admins are members of the sudo group, and have to enter their password to gain root privileges.
In the middle, you find the classic Unix setup. Admins are members of the wheel group, and get root privileges without entering a password.
And the first variant is the secure way of the classic Unix setup. Admins are members of the wheel group, but they have to enter their password. That's what Debian should have done.
Any user with sudo can become root and backdoor a system
No. It depends on the configuration of sudo, and in the out-of-the-box configuration of Slackware, adding users to the wheel and/or sudo groups does not grant any privileges. If you choose one of the all-or-nothing group setups from the default configuration, yes, any user that is member of the respective group has full root privileges. This is the common setup for a single-user machine.
In a multi-user, multi-server setup, you will use more complex sudo configuration, granting various privileges to various users. You can select applications, hosts, users, and you can even choose if sudo requires a password for each and every of the combinations. The sudoers man page has examples, but it was probably the inspiration for the right-hand side of https://xkcd.com/1343/. Scroll down to the "EXAMPLES" section. And in such a setup, there are probably several users who can use to gain limited root privileges, but only a few or even none can get sufficient privileges to install a backdoor or simply get a shell with root privileges.
Oh, and by the way: Slackware also installs su (in the required package "shadow"), setuid root and prompting for the root password, this will give anyone knowing the root password an unlimited root shell. That's why you don't share root passwords. People are very bad at keeping secrets. See also Rubber-hose cryptanalysis.
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)