From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT) Description of problem: 'newgrp' not listed in your bug list! I know problem is not with 'release' file. The problem with 'newgrp' is that when executed it causes functions defined in /etc/bashrc and .bash/profile files to become undefined. The man page does not describe this as a feature, so I assume it is a bug. It is annoying! The execution of 'newgrp' should only change a user's group ID, nothing more. Thank you. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. create a simple function in /etc/profile if there is not one already defined 2. logon as user with permission to be in two or more groups 3. test use of function 4. newgrp {alt-group from login group} 5. test use of function [it will fail] Actual Results: The function no longer works Expected Results: I would think that all functions defined previous to execution of 'newgrp' would continue to be defined after assigned to the new group. Additional info: This applies to RH 6.2 and RH 7.2. The man page does not mention this behavior as being a feature of the program.
It's part of the util-linux package. I'm changing the component and assigning to the owner of that package. Tim
newgrp does not change the group of the current shell, but runs a new shell with the new group, as a subprocess of the current shell. This new shell is not a login shell and won't behave the same way.
May I respectfully suggest that the man page be updated to reflect this information. The current man page refers to "login." Thanks. John Kjellman