You are not logged in.

#1 2015-09-03 15:55:36

svalmont
Member
From: Londonderry, NH
Registered: 2013-04-05
Posts: 81
Website

Deleted Groups file

I've accidentally deleted my groups file.  What can I do to regenerate it?

Offline

#2 2015-09-03 16:18:48

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: Deleted Groups file

Check if you have a /etc/group- backup file, you can restore from that.

If not, I think what you could do is reinstall the filesystem package to get the default /etc/group file back. Then run grpck as root - that will check the group file against the /etc/gshadow file and that should inform you of any missing groups which were added later on. You can then re-add any groups mentioned.

I might be wrong on this though so please wait for somebody else to confirm/deny.

Offline

#3 2015-09-03 16:19:25

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,718
Website

Re: Deleted Groups file

If you don't have an external backup, you may have still have a local backup: /etc/group-.

If you don't have that, then reinstalling the filesystem package will get you the default file, you will then need to check your /etc/gshadow file and see what groups you are still missing, and who should be members of which group for your system.

EDIT: I second Chazza's recommendation of using grpck.

Last edited by WorMzy (2015-09-03 16:20:47)


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB