Whenever I open the zsh shell, it outputs these 3 lines:

compaudit:148: unknown group
compaudit:148: unknown group
compaudit:148: unknown group

When I run the compaudit command, it outputs this line:

compaudit:148: unknown group

My suspicion is that this has something to do with my corrupted /etc/group file (which caused my admin account to lose sudo privilege, but I have fixed that with recovery mode; however, that corrupted file also caused a lot of group-related error that I'm unable to fix). I used to backup my system on a hard drive, but it has recently failed and I haven't replace it.

Is there anyway to fix this, and if it's because of the corrupted /etc/group file, is there any way to recover it? I'm using Ubuntu 16.04

  • You can ran compaudit via strace and it shows to you more specific info about your problem. Apr 3 '18 at 20:35
  • @YurijGoncharuk Thanks, can you tell me the specific command for that?
    – PyGeek03
    Apr 5 '18 at 13:06
  • I wrote about it. The command name is strace. If you don't have it, the install it from repository. Apr 5 '18 at 13:08
  • 1
    @YurijGoncharuk, compaudit is a zsh function, you can't run it under strace (other than by straceing a new zsh instance that runs that function, but that wouldn't be helpful). Apr 15 '18 at 16:37
  • I didn't know that compaudit is ksh component. I just suppose what could happens and gave advice. It was wrong. Sorry @PyGeek03. Apr 15 '18 at 22:19

That's an error message that is output by for instance:

echo *(g:nosuchgroup:)

The compaudit function does do this kind of thing when checking the permissions and ownership of the $fpath components.

For instance, for Debian derivatives (like Ubuntu), at one point, it expands the ${^_i_ulwdirs}(Nf:g+ws:^g:staff:,f:o+w:,^u0) glob.

Debian systems normally have a staff group, but if your /etc/group is corrupted and doesn't have one, you'd get that error message.

I get the exact same error message if I rename the staff group to something else on a Linux Mint 18.3 system (based on Ubuntu 16.04).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.