minrk / pamela

Python PAM interface
Other
34 stars 10 forks source link

pamela fails for non-current user #7

Closed csbrown closed 7 years ago

csbrown commented 7 years ago

python3 -m pamela -a '[other_user]' fails with [PAM Error 7] Authentication failure , but python3 -m pamela -a '[current_user]' succeeds. Not sure where to start debugging this.

sudo python3 -m pamela -a '[anyone]' works as expected.

minrk commented 7 years ago

It's generally a permission issue. For basic PAM, you need to have read permissions on /etc/shadow to check other users' passwords. On Ubuntu, this means adding yourself to the shadow group. On other distros, you may have to grant the permissions in other ways (e.g. creating a shadow group and making that group the owner of /etc/shadow)

csbrown commented 7 years ago

Thanks!