kha7iq/kc-ssh-pam

Add Group Support

saandre15 opened this issue · 1 comments

Is your feature request related to a problem? Please describe.

I want to add the user group into the Linux system when a new user logins to the system. However, the PAM script only adds the user without the group. I need to setup group permissions for thing like admin access.

Describe the solution you'd like

The PAM script needs to query the IAM URL and get the group id given the username and realm location. Once the group id is queried it needs to create the group if it does not exists and add the user to the new group. There should also be a policy feature that allows only certain groups to have SSH access such as sysadmins, but not the customer group.

Describe alternatives you've considered

I use Ansible to add an admin user to the sudoer file, but that solution doesn't work for all admin user. I would need to add the group to the suoder file and add users to that group with the PAM script to get the best solution.

Hello,
User or group creation is not a part of the module, this is just a helper bash script you can use to create users automatically if you want.
The script included is just an example how you can do so.

Never the less it is something i will look into and see if can be integrated with the module it self in future.