Simplest way to authenticate users based on system account?

Hello, which is the simplest way to authenticate users based on system accounts (i.e. all users of group “users” on the server) ?
I saw SSO solutions like LDAP, OAuth, OpenID, but they all look overcomplicated, while products like JupyterHub or RStudio Server by default authenticate versus user accounts (I read something “PAM” ??), would it be possible to do it also for NextCloud ?

Best regards,
Antonello

Ubuntu 16.04