Sudo and sudoers

Fresh leap 16 install.

Right now when doing a sudo, leap asks for my password. I’m trying to change it to ask for the root password.

Before, in leap 15.x, I just needed to add the following line to /etc/sudoers

Defaults rootpw

Now with leap 16, etc/sudoers doesn’t exist anymore, it’s a /etc/sudoers.d/

I’ve looked at https://www.sudo.ws/docs/man/1.8.13/sudoers.man/

It’s way, way, beyond what my old brain can comprehend.

How do I just change from my password to the root password for sudo?

Thanks

Why? That configuration makes sudo pointless.

It is now under /usr/etc/sudoers

The package description states:
“Sudo reads either /etc/sudoers or /usr/etc/sudoers
(in that order, whichever one it finds first), to determine what users have
access to sudo and which commands they can run.”

So copy the file to /etc/sudoers.d/, adapt it and you are ready to go as it can’t get overwritten with a package update.

Simply uninstall and lock package sudo-policy-wheel-auth-self:

sudo zypper rm sudo-policy-wheel-auth-self
sudo zypper al sudo-policy-wheel-auth-self

And since this came as a surprise to you, you might also be surprised about the other changes that were also explained in the Leap 16.0 release notes, so do yourself the favor and read them:

This time it’s not just a “let’s just install and see where that gets us” release. There were real changes that you should be aware of.

I already did not see anything that related to me. I did not understand:

configurations that used the primary or secondary users group as a condition need to have the users group manually added to these user accounts in order to continue to work, for example, to for @users in the sudoers file

I didn’t realize the differences.

Thanks

No, not in my case:

In root, I use nano (which I do not like, I mostly use emacs) and my bash prompt is completely different from my user one.

For me, it’s one more step to make me realize: Don’t screw up!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.