Old 25th April 2013, 20:12
ronee ronee is offline
HowtoForge Supporter
Join Date: Oct 2006
Posts: 42
Thanks: 0
Thanked 2 Times in 2 Posts
Default /etc/group damaged


This has been discussed extensively however have not found an answer that addresses our specific issue.

We have an ispconfig 2 server that has been running for years without issue and that we have not yet had time to migrate to ispconfig 3. This morning users were reporting issues receiving email and we found a wide variety of system problems stemming from the /etc/group file being mostly empty. We found one line in it only listing one group and that's it.

This caused numerous issues with apache, postfix, etc. To get things basically functioning, we copied the system portions of /etc/group from a similar server and that helped quite a bit, we were able to restart apache and postfix successfully.

We have tried a variety of solutions mentioned in other threads, such as observing the ispconfig.log for issues, making minor changes in all the sites on that server in hopes that the /etc/group will be properly written back out, as well as running this query on the ispconfig database and then modifying users:

update isp_isp_user SET status = 'u' where status = '';

We have managed to get some users back up and running by manually adding them back to their respective group entry (many are still missing) and then re-saving their user properties including their password.

But we have not yet found the underlying cause of the problem and it seems that our manual changes in /etc/group are being overwritten by ispconfig.

Any rapid input would be greatly appreciated.
Reply With Quote
Sponsored Links
Old 25th April 2013, 20:40
ronee ronee is offline
HowtoForge Supporter
Join Date: Oct 2006
Posts: 42
Thanks: 0
Thanked 2 Times in 2 Posts

update to this - we ran pwck and fixed a variety of corrupt lines and so forth with /etc/passwd and /etc/shadow, in some cases some users began magically working again without issue and in other cases user passwords must be re-established by resaving the password for a given user in ispconfig

Any recommendations on how this can happen and how to prevent would be extremely appreciated.
Reply With Quote
Old 12th July 2013, 22:31
bpmee bpmee is offline
Join Date: Aug 2006
Posts: 86
Thanks: 3
Thanked 7 Times in 6 Posts
Thumbs up

Sorry I just happened upon your post facing a similar problem.

My /etc/group file had been emptied. The only file with *most* of the correct group info was /etc/group- (the "-" on purpose).

I did the following:
]# cp /etc/group- /etc/group
Then I manually ran ISPConfig 2's writeconf.php script, using ISPConfig 2's own php:

]# /root/ispconfig/php/php /root/ispconfig/scripts/writeconf.php
If the writeconf.php script produces an error even after copying the group- file to group, you might have to rebuild some elements manually.

I had this problem happen before and started running a backup script for /etc/group, /etc/shadow, etc files to avoid disruption. It can be run via Cron daily, hourly, or whenever

Warning: This script force copies the respective files to a [filename]-bak-[current date] copy. If you run it daily, your /etc folder will fill up with many days worth of backup copies. If disk space is low, you should probably add some code that erases backup copies older than x days....


# Backup Passwd and Shadow Files

cp -f /etc/passwd /etc/passwd-bak-$(date +%Y%m%d%H%M%S);
cp -f /etc/shadow /etc/shadow-bak-$(date +%Y%m%d%H%M%S);
cp -f /etc/group /etc/group-bak-$(date +%Y%m%d%H%M%S);
cp -f /etc/gshadow /etc/gshadow-bak-$(date +%Y%m%d%H%M%S);

echo Finished;

Reply With Quote


config, email users, group file damaged

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
help needed; xen file damaged lrdro Technical 9 10th September 2011 01:03
ISPConfig Users Permissions guimnk Installation/Configuration 14 14th April 2011 19:26
/etc/group playcraft General 5 17th September 2010 16:14
ISPConfig damaged my /etc/group ! :-/ NIXin General 4 22nd April 2008 00:18
ISPConfig blew away /etc/passwd and /etc/group digerata General 3 24th August 2007 22:26

All times are GMT +2. The time now is 18:34.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.