Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a number of users, categorised into various groups. I would like one of those groups ("developers") to be in the wheel group as well. I don't want to just copy the people from the developers group into wheel, because then when that group changes I'll have to change it in two places. Is there a way to specify that anyone in developers is in wheel, and have that be dynamic?
Sure there are ways, using scripting and
cron, but you are talking about some nasty ad-hockery. Occam would suggest you save "developers" for a time when you need a separate group for non-wheel developers, and just add people to wheel for now.
Sure there are ways, using scripting and
cron, but you are talking about some nasty ad-hockery. Occam would suggest you save "developers" for a time when you need a separate group for non-wheel developers, and just add people to wheel for now.
There are already many structures/permissions/etc... in place for that developers group, though, and changing them all would be brutal. Plus it's an NIS group. Basically, it has many purposes other than this...
Maybe a good use for FUSE then, but I haven't yet played with it myself, so I'm not sure if it would work. The steps ought to be: write a Python script using python-fuse to output the group file dynamically; rename /etc/group to be /etc/group.fuse; have your script create and handle /mnt/fuse/group based on /etc/group.fuse; and symlink /mnt/fuse/group to /etc/group.
I have a number of users, categorised into various groups. I would like one of those groups ("developers") to be in the wheel group as well. I don't want to just copy the people from the developers group into wheel, because then when that group changes I'll have to change it in two places. Is there a way to specify that anyone in developers is in wheel, and have that be dynamic?
Thanks!
There is an alternative way to archive: grant all permissions of 'wheel' group to 'developers' group ('/etc/sudoers', ...), I think.
There is an alternative way to archive: grant all permissions of 'wheel' group to 'developers' group ('/etc/sudoers', ...), I think.
MT.
Holy crap...nice! One of those things where I'd never think of it, but it seems so simple I kick myself for having missed it. I'm giving this a try first thing tomorrow.
Holy crap...nice! One of those things where I'd never think of it, but it seems so simple I kick myself for having missed it. I'm giving this a try first thing tomorrow.
I tried this and it didn't work - however, I did try doing it in /etc/pam.d/su (changed the line "auth required pam_wheel.so use_uid" to "auth required pam_wheel.so group=developers use_uid" and it worked. I did a reference to possibly doing this through pam_access instead, but I need to look into that more. It might be the way to go though, since I think with pam_wheel.so I can only send one group as a parameter, and there might be an occasion where more than one needs to be added...
I tried this and it didn't work - however, I did try doing it in /etc/pam.d/su (changed the line "auth required pam_wheel.so use_uid" to "auth required pam_wheel.so group=developers use_uid" and it worked. I did a reference to possibly doing this through pam_access instead, but I need to look into that more. It might be the way to go though, since I think with pam_wheel.so I can only send one group as a parameter, and there might be an occasion where more than one needs to be added...
Thanks for putting me on the right track!
Which command did not work, 'sudo' or 'su'? I prefer to use 'sudo' command so I just modified 'sudoers' config file.
By the way, try modify your '/etc/pam.d/su' look like:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.