I’ve upgraded my system from Leap 15.2 -> 15.3 and after that I’ve done an extensive update with zypper up. Now whatever zypper command I execute as a regular user and prefix it with sudo hangs on the terminal and gives no output. For example sudo zypper ref.
Whatever zypper commands run fine when run as root, or when ran as a regular user and prefixed with su -c which suggests there might be some problem with sudo but other programs executed as a regular user and prefixed with sudo run fine too.
I’ve tried to force-reinstall the zypper & sudo pkgs and have replaced the */etc/sudoers *file with the default one just in case but to no avail.
Also, when running a zypper command as a regular user and with no command elevation like su or sudo, it works fine as well.
I just tried it with a new regular user and the situation is the same. zypper commands w/o elevation (no sudo nor su) work, su -c “zypper …” commands work too, but sudo zypper… commands hang.
By a regular user I mean a user with the default “users” group and maybe wheel but no other membership.
We believe you (in this case), but please do not tell stories like this, but show what you have on the terminal. Same as @nrickert showed: prompt/command line, all output and best even the next prompt (to show it is complete), all copied/pasted between CODE tags (the # button in the tool bar of the post editor).
Sometimes people see details you are not aware of. In any case, what the computer tells is true, the stories you tell are nice or interesting at the most.
Thanks, but it was for the future (I said " we believe you ;)).
BTW, LANG=C is shorter (and maybe better, I am not sure).
I hope you do not think I am only thinking about how you post, for you to find a solution is of course more important. But until now I am out of ideas :(.
Something with PAM maybe? Did you ever configure or added plug-ins into PAM?
It seemed to be working for a while until I ran some sudo zypper command which was a bit later so I didn’t realize the correlation there.
If I move the pam_rootok.so PAM module back on its own line in the su-l config file, sudo zypper commands start to work.
It’s strange though that the su-l config can break the sudo behavior while it should only affect the su behaviour. There’s a specific sudo config in /etc/pam.d which I would guess should be intended for the sudo behaviour.
I never took the trouble to meddle with PAM, so most of what you did there and why is a bit beyond my understanding (and avoiding root password security is also beyond my understanding).
In any case, su and sudo are not related at all. They are different programs. Both can switch to another user, but that is the only thing they have in common.
I never use sudo. I have no use for it. Using su -l (or short su -) works for me and avoids trouble with sudo (I even saw security updates for sudo once, which means that it is complicated enough to let it’s programmers make errors).
And starting from the KDE main menu: Terminal in Superuser mode does use su -. Thus I mostly use that in the few cases that I need to manage my system (or when I need root to re-create problems posted in the forums ;)).