netopeer2.conf and pam_nologin.so does not exist in Yocto Scarthgap
In my system (Yocto Scarthgap) there are the following files:
ls -la /usr/lib/security/
total 87 drwxr-xr-x 2 root root 1024 Mar 9 2018 ./ drwxr-xr-x 29 root root 8192 Mar 9 2018 ../ -rwxr-xr-x 1 root root 67176 Mar 9 2018 pam_deny.so* -rwxr-xr-x 1 root root 67408 Mar 9 2018 pam_permit.so* -rwxr-xr-x 1 root root 67408 Mar 9 2018 pam_umask.so* -rwxr-xr-x 1 root root 67480 Mar 9 2018 pam_unix.so* -rwxr-xr-x 1 root root 67400 Mar 9 2018 pam_warn.so*
https://github.com/CESNET/netopeer2/blob/1e639fe18a70b06111ad9c3ea261f27794f25f0e/pam/netopeer2.conf
says at least
pam_nologin.so
which does not exist. When I replace the 2 lines by pam_permit.so, I seem to be able to execute first commands. But is it correct???
Does the file netopeer2.conf need updating? Or is it just a template and must be customized for each system?
I assume the same is for pam_loginuid.so, pam_keyinit.so, pam_lastlog.so and pam_motd.so, which are also not existing...
There's no generic PAM config, unfortunately, so your best bet is to become your system integrator (which you really are on embedded, anyway) and adjust this application's PAM setting as you see fit.
Yes, not much we can do about this, you best use your own netopeer2.conf if you want to use PAM.