Suppose I change some user settings like its initial login group or add it to a new group. I now can do
su user and work with these new settings. But all the previously running processes will still have the same permissions as before.
How can I force a specific running process to re-read
/etc/group to reinitialize its user and group settings, without terminating any activity it was doing? I've tried attaching to the process with
gdb and do
print setuid(MY_USER_ID), but despite the result was
0 (i.e. success), the process still remained with the same data (checked on
groups to see whether additional group has appeared).