Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

After editing /etc/group, How this update starts functioning without restarting the system in Unix?
Is there any command we need to run?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

Any changes to /etc/group will be made immediately.

That file is parsed when looking for access.

If you are trying to modify membership for a user already logged in though, that user may need to log out and back in for the membership changes to take effect.

share|improve this answer

If you are modifying real-person group affiliations, they need to just log out and log back in.

If you are changing group permissions for a system-like account (e.g. mysql, httpd) you'd have to restart the relevant daemons, but it is sometimes hard to know all the processes that need the new GIDs which are only applied when the process is started. Rebooting will ensure that all the proper processes are started with the new GIDs.

share|improve this answer
    
It may be hard to know which processes need the new supplementary group but at least it's easy to find out which are still missing it: ps -o pid,supgrp -u username --no-headers | awk '$2 !~ "(^|,)newgroupname($|,)" {print $1}' –  Hauke Laging May 8 '13 at 16:18
1  
That reminds me of the old joke about programmers counting all the elephants on the earth: first you count all in the northern hemisphere and all those in the southern hemisphere; to count the northern hemisphere, you count all in the NW quadrant... Q.E.D. –  msw May 8 '13 at 17:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.