1

Myself is Divya.. i am new to Linux/Unix.. i have a question on user and group management..

I read that for deleting a group a group must be empty..

I want to delete a primary group without deleting the users(as they belongs to other groups which is their secondary group)

for example I want to delete a group called ABC which contains the users U1,U2,U3,U4 whereas U1 and U4 belongs to another secondary group called DEF and GHI respectively.

ABC is the primary group for U1 and U4. let me know he command/s..

Thanks

1 Answers1

0

If the group is a primary group for them - you'll have to change the primary group for those users. If no particular primary group is needed for them you can assign each of them their own group - the same as their username. Up to you. Of course you may have to create those groups (or another group for them)

Anyway - to change group (primary or secondary) you can use usermod command. You can also edit password/group files as necessary, if you want.

To create new group you will use groupadd.

Jacek
  • 1,911
  • 12
  • 10