I noticed an interesting thing. I use OpenSUSE, where the SUDO command is issued by default by the root password by default. This can be changed in the SUDOERS file and you need to add that user to the WHEEL group and uncommented this line: #% Wheel All = (All) All Thus, after the SUDO command is issued, the user requests the user’s own password for root privileges.
I asked the OpenSUSE forum why it was, I got the answer that this is natural. I was not lazy, I was looking at this for EOS and I was surprised to see that although after Sudo the user has root privilege but in the Sudoers file
#% WHEEL ALL = (ALL) ALL entry is commented.
My question: How can Root permit a member of the Wheel Group after issuing the Sudo command?
That is a little confusing so I am not entirely sure what you are asking.
If you are asking, “Why does EOS let a user in the wheel group use sudo as root when that line is commented out?”, the answer is that there is a drop-in file in `/etc/sudoers.d" that overrides that line.
You fell on the point. I did not think of override. Lesson: All distributions have a little different philosophy. At that time, for example, in the installation of the EOS I wondered why the first user is not automatically a member of the WHEEL group like Ubuntu /Mint. This is also a similar issue in which the distributions may differ from one else.
Of course, then I can also ask you what the reason for this overwrite is.
If you mean “Why use a drop-in file to override a default setting instead of directly modifying the file itself,” there are a couple of reasons. Most importantly, it allows the original file (in this case, /etc/sudoers) to remain unmodified. On an Arch-based distro, this means that upstream changes to the file will not result in a pacnew file being created.
Also, having a separate drop-in file for each user can make it simpler and generally quicker for a sysadmin to manage multiple users, as opposed to entering each user in the sudoers file. (This is not relevant on a single-user computer.)
Finally, I see that one of the distributions allows a member of the wheel group to have root privileges after the sudo command by default, and the other does not, and by default expects to know the root password after sudo. Alsó flavors and slaps are different.
As far as modern distros go, opensuse is philosophically different than the rest. Opensuse generally wants things run as root and wants the user to use the root password for administrative actions including sudo.
Most other distros are the opposite, use root as little as possible and instead rely on the user account and sudo/pkexec.
yes, i realized that now too. For example, there is a difference between today’s modern distros in that the first user created during installation has root privileges by default and the other does not.