can't remove primary group in linux
Greeting to all;
Completely rearranging my local server. i can't remove existing primary group. we don't need existing primary group. how can i remove it ? already i checkedhttp://="http://www.linuxquestions.o...-group-541476/also . kindly provide me how can i forcely removed oinstall group. |
Hi,
If the group is the primary group of any one of the user, system willn't allow you to remove the group. if your old group is "Y" and that is the primary group of some users, create a new group "X" and move all the users from the group "Y" to the new group "X" and remove "y" 1) groupadd <new group> 2) egrep -i <old group> /etc/group # this will find out the users, who belongs to the group 3) then run 'id username' or 'groups usename' # this will show the users group info, if you find anyone of the users primary group is '<old group>' move that users to the new group using 'usermod -g <new groupname> user' 4) After moving users primary group to the new group, run groupdel <old groupname> PS: If you want to disable the automatic groups creation while creating one user, check the /etc/login.defs file and comment out the gid section(Not recommended), but after that you need to specify the group manually while creating the account using useradd -g groupname -- Thanks, Bijo |
Hi bijo ;
Thanks for reply . Quote:
|
All times are GMT -5. The time now is 08:57 PM. |