Oh boy, I never expected root in guest mode, GNU/Linux Mint

I have no idea if this is well known or not, if not then

this site can claim it…
Yes I know the passwords - but - and a big BUT - I should not be allowed in guest mode access to root of ANY kind AT ALL.
Even consoles, (Ctrl - Alt), F1 - F6 are seriously difficult if you don’t know the who the users are.
Well using either the GUI’s ‘Open as root’ in Nemo which only asks for an admin’s password allows this state, but even worse so does the terminal. One can do anything from there.
I have two images that were created in guest mode on my GNU/Linux box.
I was able to easily transfer them to my account and allocate them as me as the owner and user.
I consider this a major flaw as many people use ridiculously easy passwords to crack.
So be aware of guest mode it is not as bullet proof as I thought…

Strange.
My Mint box does not allow su (and neither sudo)
image

Is user barry a sudouser? If so, he can access superuser and become root.

Sure.
The point is, the su to barry should not be granted at all.
My box asks for the target user's PW, then gives the "cannot set groups" error. Still a bit strange, but there is a second barrier.
A first barrier would make more sense, e.g. configure the PAM su to require the "wheel" group.

Ok, then, is guest a sudoser?

Please post content of sudoers file.

Misconfiguration can be the cause.

No, guest is not a sudoer (i.e. member of "sudo" group), may not run sudo.

su is different.
In my Mint 21.3 I can make the "sudo" restriction for su in /etc/pam.d/su with

# auth       required   pam_wheel.so
auth       required   pam_wheel.so group=sudo

Then the error message changes to

Password: 
su: Permission denied

Still first it asks for the PW, so it's another secondary barrier.
This is my advice for @wisecracker

@MadeInGermany, thanks for that, I will try it later…
And @hicksd8 ‘guest’ in my Mint 22.3 does not appear as a temporary /home/guest directory but in the /tmp directory as /tmp/guest-xxxxxx where xxxxxx are six random numbers and letters, relying on the POSIX requirement that /tmp is cleared during shutdown…

Not a POSIX requirement but a convention.