Discussion Locked

Group account ?

0 helpful
13 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi.
How do you remove one group from one user, and still have that one group active for other users?
Also. How do you change a group ID# or GID?
Thanks,
Pat

13 replies

by marshallkeithusa

Actually you have it kind of backwards. Remove the user from the group. Go to the /etc directory and edit the group file.

Remove the name of the user that you know longer want from the line with that group name. You can also use linuxconf to edit the group. Or download webmin from www.webmin.com which is a web based Administration tool.

Hope this help

by schannachie

Hi.

You can do this in tree steps

1.- Delete the user you want to with the command userdel (on most distributions) or manualy using an editor and the user file (don't forget the passwd file).

2.- Create the new group. see man group

3.- Create the new group.

If you use the distributions administrating soft it's much better and you will type only a few minutes.

Good luck !

by schannachie

Sorry !!

At step 3 must say...

3. You must add the users to the new and delete the old one. And remember to change the group number.

by cpfeiffe

To delete a user from a group you can edit /etc/group and remove the username from the line end field of the line the group is identified on.

If it is the user's primary group you will have to go in the /etc/passwd file and change the primary group for that user. The primary group is identified as the number in the fourth field in the /etc/passwd file.

To change a group ID# simply edit the /etc/group file and change the number corresponding to the group. You will need to verify that no users in /etc/passwd listed this as their primary group. If they did you will have to change the primary group to the new group number.

Hope this is a clear enough explanation to accomplish your tasks.

Charles

by shanghai sam

Hi.
Yes that did help, but I thought there was a command that you could use to do this. Apparently not. I was thinking groupdel or groupadd, along that thought.
Thanks, and if you have any other suggestions, that would be helpful.
pat

This discussion is closed to new replies.