Neo_78 wrote: Wed Feb 02, 2022 9:50 pm
Thanks @jamesbond. I am basically looking for a way to implement the behaviour of most Debian-based distributions: When you create a new non-root user and you try to use sudo
or su
, the attempt will be rejected and logged. Privilege escalation is only possible if that non-root user has been added specifically to the sudo / su group. So you have fine-grain control if a specific non-root user can or cannot escalate privileges. Not sure if that's possible?
Debian has a lot more going behind it than just su
and sudo
But anyway, on to your question: It is possible, but you will have to configuring / experiment with it yourself.
I told you previously that Fatdog's standard login
does not have all the features, and you can use the "FULL" version of login by deleting /bin/login
and replacing it with /bin/login-FULL
(either by copying, or by symlinking). This "login-FULL" is the same login used by everybody else in the world.
Now, Fatdog's standard su
also does not have all the features. You can use the "FULL" version of su in the same way - delete /bin/su
, and replace it with /bin/su-FULL
. Remember to chmod 4755 /bin/su-FULL because it is not suid by default.
And since you're doing this, you may as well use the FULL version of passwd
too, just in case. Process is the same, delete /bin/passwd
and replace it with /bin/passwd-FULL
.
These "FULL" version of login, su, and passwd are the same versions used by Debian and everybody else, so you should be able to configure it the way you do it in other systems. It supports the "wheel" group, login.defs, securetty ... the usual stuff that you read about elsewhere.
But you will be on your own. Please do, however, record and share your experience here, so that in the future, other people who have similar needs to you, can learn from your experience.
As for sudo - we don't have sudo. So that's one insecurity loophole that you can cross off your mind.
Our compatibility "sudo" script uses "su", so if you have "secured" su, then you don't need to worry about it anymore.
But if you need the real sudo's functionalities, however, you will have to compile it yourself. We don't have it in gslapt.
I am not happy with gtksu
but I also don't want to break a fat dog...
You can chmod 0755 /usr/bin/gtksu, just like what you did to su, to neuter its power.
Or you can just delete it.
Or you can just delete it and replace it with a symlink to /bin/false.
Or you can write a replacement script for gtksu that pops-up an error message.
So many possibilities.