Koozali.org: home of the SME Server

Groups are broken...can I fix?

David Trask

Groups are broken...can I fix?
« on: August 28, 2002, 07:14:15 AM »
I'm getting messages on startup like "invalid group utmp" and when I try to do updatedb...I can't because slocate is missing and so forth.  How can I fix this stuff in groups without having to redo the whole server.  I'm finding that ibays won't work correctly and so forth so I'm assuming there's an issue with groups....can anyone help?  Any ideas?

One of my errors is:
Could not find the group: slocate in the /etc/group file.
fatal error: This is a result of the group missing or a corrupted group file.

here's my /etc/groups file if that helps

root:x:0:root,admin
bin:x:1:root,bin,daemon
daemon:x:2:root,bin,daemon
sys:x:3:root,bin,adm
adm:x:4:root,adm,daemon
tty:x:5:
disk:x:6:root
lp:x:7:daemon,lp
mem:x:8:
kmem:x:9:
wheel:x:10:root
mail:x:12:mail
news:x:13:news
uucp:x:14:uucp
man:x:15:
games:x:20:
mysql:x:27:
gopher:x:30:
dip:x:40:
ftp:x:50:
dns:x:53:
ldap:x:55:
lock:x:54:
nobody:x:99:
users:x:100:
admin:x:101:www
www:x:102:admin
public:x:103:
shared:x:500:public,admin,www,jaddy,anallen,ballen,jallen,aalthenn,eamelotte,narmstrong,darnold,haudet,bbailey,jbailey and so forth for all my users
dlylunchcnt:x:5004:

Is it possible to rebuild this file?


David

Damien Curtain

Re: Groups are broken...can I fix?
« Reply #1 on: August 28, 2002, 12:09:23 PM »
David Trask wrote:
>
> I'm getting messages on startup like "invalid group utmp" and
> when I try to do updatedb...I can't because slocate is
> missing and so forth.  How can I fix this stuff in groups
> without having to redo the whole server.  I'm finding that
> ibays won't work correctly and so forth so I'm assuming
> there's an issue with groups....can anyone help?  Any ideas?



> here's my /etc/groups file if that helps
>
> root:x:0:root,admin
> bin:x:1:root,bin,daemon
> daemon:x:2:root,bin,daemon
> sys:x:3:root,bin,adm
> adm:x:4:root,adm,daemon
> tty:x:5:
> disk:x:6:root
> lp:x:7:daemon,lp
> mem:x:8:
> kmem:x:9:
> wheel:x:10:root
> mail:x:12:mail
> news:x:13:news
> uucp:x:14:uucp
> man:x:15:
> games:x:20:
> mysql:x:27:
> gopher:x:30:
> dip:x:40:
> ftp:x:50:
> dns:x:53:
> ldap:x:55:
> lock:x:54:
> nobody:x:99:
> users:x:100:
> admin:x:101:www
> www:x:102:admin
> public:x:103:
> shared:x:500:public,admin,www,jaddy,anallen,ballen,jallen,aalthenn,eamelotte,narmstrong,darnold,haudet,bbailey,jbailey and so forth for all my users
> dlylunchcnt:x:5004:
>
> Is it possible to rebuild this file?

Your missing alot of groups, all the qmail groups, apache, ntp etc. did you just forgot to paste the rest of the file or is that actually it?

Lets say something has blown these groups away from the groups file post install, then hopefully theres a copy of all system groups in the file /home/e-smith/accounts

egrep 'system.+Gid' /home/e-smith/accounts

will tell you all the groups you should have,

You can then add them back, using groupadd -g Guid groupname
--
 Damien

David Trask

Re: Groups are broken...can I fix?
« Reply #2 on: August 28, 2002, 05:51:38 PM »
> Your missing alot of groups, all the qmail groups, apache,
> ntp etc. did you just forgot to paste the rest of the file or
> is that actually it?

That's actually it....I grepped for the /home/e-smith/accounts  and many more do exist, but when I go to add them...they won't stick....any ideas?  I think the fact that they won't stick is what is adding to my iBay problem.  Should I blow away the server and redo it?  I'd rather not....

>
> Lets say something has blown these groups away from the
> groups file post install, then hopefully theres a copy of all
> system groups in the file /home/e-smith/accounts
>
> egrep 'system.+Gid' /home/e-smith/accounts
>
> will tell you all the groups you should have,
>
> You can then add them back, using groupadd -g Guid groupname
> --
>  Damien

Dan W

Re: Groups are broken...can I fix?
« Reply #3 on: September 18, 2002, 06:31:25 PM »
I too am having the same problems with the groups being missing. Every morning, I receive an email with this content:

/etc/cron.daily/slocate.cron:

warning: updatedb: Could not find the group: slocate in the /etc/group file.
fatal error: This is a result of the group missing or a corrupted group file.

When I try to add the the groups manually, I get this:

groupadd -g 401 qmail=system
groupadd: gid 401 is not unique

What is the problem? I cant seem to get it to work. I did a fresh install to 5.5. I never had this problem under previous versions (goes way back to 3.0).
Do I need to reinstall, or is there a way to add these back in that will stick???
Many thanks in advance!
Dan