LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-21-2008, 03:16 PM   #1
bArT8472
LQ Newbie
 
Registered: Aug 2004
Distribution: Debian
Posts: 1

Rep: Reputation: 0
Question I *LOST* /etc/group (damaged)


Hi all,
I just logged in to my box via SSH and saw a message:
Code:
id: cannot find name for group ID 0
I started investigating, before I could do anything at all, I noticed that apache is dead.

I've tried the following:
Code:
root@nixion:~# /etc/init.d/apache2 force-reload
apache2: bad group name www-data
   ...fail!
root@nixion:~# /etc/init.d/apache2 restart
 * Restarting web server apache2
* We failed to correctly shutdown apache, so we're now killing all running apache processes. This is almost certainly suboptimal, so please make sure your system is working as you'd expect now!
apache2: bad group name www-data
It didn't start. Bad group name? What's going on? So I immediately took a look at /etc/group. Before I have even pressed the F3 key which is View in Midnight Commander I noticed that the file is WAY to small (39 bytes). It had only one user inside. This wasn't cause of hacking or anything, I know the probable cause (ISPConfig). Anyway... I just found out that I don't have a recent backup of /etc/group file. I'm using suPHP, so it's a must for me (error 500 otherwise). I recovered a file from October 2007 but many newer sites I have created don't work. Not to mention some other broken stuff. So... is there a way to recreate the /etc/group file, or at least to fetch the user list?

Have a nice day. Thanks in advance!

Last edited by bArT8472; 04-21-2008 at 03:17 PM.
 
Old 04-21-2008, 07:48 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
The base-passwd package has a basic /etc/group but how basic that is I don't know. You could (back up your old /etc/group and then) 'awk -F':' '{print $1":x:"$4":"}' /etc/passwd > /etc/group', that will be missing some mappings and users but hey, it's a start. Do you by any chance have any /etc/*group* (group-, group.OLD) and gshadow?
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to give access rights to one group to the home-dirs of another group Peter@KKVS Linux - Networking 2 11-09-2006 12:38 AM
group: add complete group into other group max_mad SUSE / openSUSE 1 04-12-2006 01:43 AM
well, there's info written inside /etc/group. accidentally del /etc/group in RedHat9 karmakid Red Hat 1 07-27-2005 10:27 PM
Group Admin, Group Root, or God over Group crickett Linux - General 5 07-12-2004 04:01 PM
[alert] (22) Invalid argument : setgid : unable to set group id to Group 4294967295 Niraj Linux - Networking 1 12-13-2001 06:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration