Hello
This problem seems to be on NoMachine side. We are not aware which Pam modules you use on your Linux. But what you described looks like one of the Pam modules doesn’t have proper rights to work correctly. To make it easier to resolve that issue please send Pam stack configurations to us. Below you can find paths to required files. You can attach them here or forward on to forum[at]nomachine[dot]com.
/etc/pam.d/nx
/etc/pam.d/su
/etc/pam.d/system-auth