7 Dec 2009 22:17
pam_group: group-based access
Dimitris Glynos <dimitris <at> census-labs.com>
2009-12-07 21:17:10 GMT
2009-12-07 21:17:10 GMT
Hello all, I've been looking for a way to dynamically add groups to users belonging to a certain user-group. For example, I would like to dynamically add to the group 'plugdev', all users belonging to the 'Domain Users' group. >From a quick look at the pam_group module I see that it supports netgroups but not regular user groups (the kind you get from /etc/groups). To this end, I'm attaching a short patch that enables group-based access in pam_group. Since the ' <at> ' sign is reserved for specifying netgroups, I'm using the '%' sign to specify user-groups in the config file, like this: xsh; tty* ; %users ; Al0000-2400 ; disk Also, some tweaking has been done on the code that parses the config file. To be able to specify user-groups containing spaces, but still retain backwards compatibility with space-delimited lists, I've introduced the escaped space '\ ' sequence, which is used like this: gdm ; * ; %Domain\ Users ; Al0000-2400 ; plugdev Documentation files, along with the sample config file have been updated to reflect these changes. A few words regarding the implementation:(Continue reading)
RSS Feed