Koozali.org: home of the SME Server

Error ?? WARNING: Can't get information about user clamav.

Offline steve288

  • *
  • 336
  • +0/-0
Error ?? WARNING: Can't get information about user clamav.
« on: April 24, 2007, 06:00:13 PM »
I have installed a new server gateway 7

When I type freshclam I get:
WARNING: Can't get information about user clamav.

The log files for squid when I going through the panel and click the most recent log file eg freshclam/2007-04-24 10:13:06.527147500.s
also says :


2007-04-23 11:40:47.548500500 WARNING in /etc/e-smith/templates//etc/freshclam.conf/MaxAttempts: Use of uninitialized value in concatenation (.) or string at /etc/e-smith/templates//etc/freshclam.conf/MaxAttempts line 3.
2007-04-23 11:40:47.611645500 WARNING: Template processing succeeded for //etc/freshclam.conf: 4 fragments generated warnings
2007-04-23 11:40:47.611654500 at /sbin/e-smith/expand-template line 45
2007-04-23 11:40:47.637279500 ERROR: Parse error at line 11: Option Checks requires numerical argument.
2007-04-23 11:40:47.638836500 WARNING: Can't get information about user clamav.
2007-04-23 11:40:50.043299500 WARNING: Can't get information about user clamav.
2007-04-23 11:40:52.408090500 WARNING: Can't get information about user clamav.
2007-04-23 11:40:53.625006500 WARNING: Can't get information about user clamav.
2007-04-23 11:40:55.260927500 WARNING: Can't get information about user clamav.
2007-04-23 11:40:55.985664500 WARNING: Can't get information about user clamav.
2007-04-23 11:40:58.652402500 WARNING: Can't get information about user clamav.

I have pasted from where it started just to show the previous messages.

Now the Log only says the WARNING: message above over and over and over.  Nothing else in this log file.

There was one post about this error some time ago.

http://forums.contribs.org/index.php?topic=34950.0

The person had moved his files from sme6 to sme7.
In fact this is what I did also.

I used the backup utility in sme 6 to to backup the system and then restored it to the SME 7 computer. Things for the most part seem to be working nicely. Even the Ibays seemed to be copied over nicely. This error did not start imedietely, but rather sometime when I added more addon yums (which IM not sure have any bearing on it.) The error message seems to have something to do with a login problem ??? Does anyone have any insights into this.

IM not even sure what the Repercussion of the error are accept that I think Im not downloading any new virus tables anymore

Thank you.

Offline steve288

  • *
  • 336
  • +0/-0
Error ?? WARNING: Can't get information about user clamav.
« Reply #1 on: April 24, 2007, 08:20:07 PM »
Just to update the info so far. I have found this note in a clamAV note.
http://www.ifi.uio.no/doc/clam/clamdoc.pdf

Which gets me closer to a solution.

60: Can’t get information about user clamav. User clamav (default unprivileged user) doesn’t exist in /etc/passwd.

However I still dont realy know what to do, I could create a user I suppose called clamav but IM sure that I dont know all the right user permissions etc that are needed.

Does anyone know how to resolve it?

Regards

Offline steve288

  • *
  • 336
  • +0/-0
Error ?? WARNING: Can't get information about user clamav.
« Reply #2 on: April 25, 2007, 04:04:08 PM »
Well in my continuing adventure of talking to myself, :)

I have discovered the following which has moved me a little further along.

I have found a document on setting up clamav that talked about creating a user for clamav

If you are installing CA for the first time, you have to add new user and group to
system - clamav:

# groupadd clamav
# useradd -g clamav -s /bin/false -c "Clam Antivirus" clamav

I did this and it seems to have removed the error message . (see below)

Note how the message magically goes away below and new error message magically starts…..

I will try to see if there is anything I can find out about this new error message. Of course anyone that wants to jump in feel free to jump in.

Regards

2007-04-24 16:28:43.064817500 ERROR: Can't get information about user clamav.
2007-04-24 16:28:43.064954500 ERROR: Can't get information about user clamav.
2007-04-24 16:28:44.102281500 ERROR: Can't get information about user clamav.
2007-04-24 16:28:44.102431500 ERROR: Can't get information about user clamav.
2007-04-24 16:28:45.122846500 Running as user clamav (UID 5013, GID 402)
2007-04-24 16:28:45.123054500 clamd daemon 0.90.1 (OS: linux-gnu, ARCH: i386, CPU: i386)
2007-04-24 16:28:45.123111500 Log file size limited to 1048576 bytes.
2007-04-24 16:28:45.123160500 Reading databases from /var/clamav
2007-04-24 16:29:48.021874500 Loaded 111194 signatures.
2007-04-24 16:29:48.164771500 ERROR: Socket file /var/clamav/clamd.socket could not be bound: Permission denied
2007-04-24 16:29:48.218156500 Running as user clamav (UID 5013, GID 402)
2007-04-24 16:29:48.218343500 clamd daemon 0.90.1 (OS: linux-gnu, ARCH: i386, CPU: i386)
2007-04-24 16:29:48.218400500 Log file size limited to 1048576 bytes.
2007-04-24 16:29:48.218463500 Reading databases from /var/clamav
2007-04-24 16:31:01.429934500 Loaded 111194 signatures.
2007-04-24 16:31:01.443324500 ERROR: Socket file /var/clamav/clamd.socket could not be bound: Permission denied
2007-04-24 16:31:01.672005500 Running as user clamav (UID 5013, GID 402)

Offline Confucius

  • ****
  • 235
  • +0/-0
Error ?? WARNING: Can't get information about user clamav.
« Reply #3 on: April 25, 2007, 04:08:57 PM »
does this help you solving this problem ?

ls -lad /var/clamav/
drwxr-xr-x  3 clamav clamav 4096 Apr 25 15:55 /var/clamav/

Offline steve288

  • *
  • 336
  • +0/-0
Error ?? WARNING: Can't get information about user clamav.
« Reply #4 on: April 25, 2007, 06:06:33 PM »
Oh inscrutable one …
True to your namesake I believe you are offering me a riddle wrapped in an enigma.

But I think I have un-wrapped it. Basically the directory and files need to be owned by clamav and in the group clamav.

Once I ran;
# chown clamav clamav
from /var  and then ran
#chown clamav *
On all files in the /var/clamav directory and all directories under /var/clamav the freshclam worked.

Thank you my Chinese(?) friend.

I offer below my little adventure that I hope will help others who have the same problem.

Signed

Grasshopper.

PS last time my dad was in Appledorn they were fighting the Natzis.

Here are my notes I hope they are correct to help others.

----------------------------------------------------------------------------------

Resloving "Can’t get information about user clamav." error after upgrading from SME6 to SME7

Got error messages on clamav
****************************
ERROR: When you type freshclam at command prompt or you see this message inlogs.

"Can’t get information about user clamav."

MY NOTES:
*********
It appear that some of the ownerships/groups that clamav use have changed between sme6 and sme7. When I  restored the files from sme6 to sme7 changes need to be made on those ownerships on the new computer sme7. I think that there needs to be a group called clamav which on sme6 there was not. You may see for yourself by opening up /etc/group and seeing if there is a line like
clamav:x:402:
If there is then you will probably not have a problem transfering things over from sme6 to sme7. But if  there is not a line like this then I hope my expereinces will help. Its actually quite simple once you know how.


Preamble:
A clamdoc on the net on this message says:
60: Can’t get information about user clamav. User clamav (default unprivileged
user) doesn’t exist in /etc/passwd.

The Same pdf says :

If you are installing CA for the first time, you have to add new user and group to
system - clamav:


# groupadd clamav
# useradd -g clamav -s /bin/false -c "Clam Antivirus" clamav


The above method works in Linux and Solaris, if you don’t have groupadd,
useradd please contact your system manual section about creating new users and
group. If you are not system administrator, and won’t be using Clam Antivirus
in superuser mode, you may omit this step with option –disable-clamav passed to
configure:
$ ./configure --disable-clamav

This disables test for clamav user and group. Clam Antivirus still requires clamav
for superuser mode. Please don’t set password on this account. This must be
normal, unprivileged user. Don’t add it to any special groups.
Hint: If your system uses quotas it’s good idea to set bigger quota on this account.
clamscan will extract compressed files to temporary directory (default /tmp
or user selected) with clamav priviledges. I strongly advise you using filesystem
quota for clamav if you want to avoid security problems. Some protections have
been implemented in 0.14, check clamscan(1) manual for details.   

******
If you run 'ls -lad /var/clamav/' and get ....

drwxr-xr-x  3 qmailscan clamav 4096 Apr 24 16:39 /var/clamav/

It appers that the owner of the directory must be clamav. Right now it looks like it is
qmailscan that owns them. You need to make clamav the owner. So go to /var and run:

#chown clamav clamav

Next cd to /var/clamav and run #chown clamav * (Change ownership of files to clamav)

Next there may be a directory's in /var/clamav they too need to have their ownership
changed. Go into each directory eg /var/clamav/daily.inc and run the command
# chown clamav * in each directory. (Again this changes all the files to the clamav
ownership.)

Check all files by using the ls -l command, and directories with the ls -lad command.

They now should be owned by clamav and have the group as clamav eg.

srwxrwxrwx  1 clamav clamav       0 Apr 25 11:14 clamd.socket
-rw-r--r--  1 clamav clamav  912250 Apr 24 16:38 daily.cvd.rpmnew
drwxr-xr-x  2 clamav clamav    4096 Apr 25 11:25 daily.inc
-rw-r--r--  1 clamav clamav 9351789 Apr 18 13:24 main.cvd
-rw-r--r--  1 clamav clamav 8189490 Mar  2 04:23 main.cvd.rpmnew
-rw-------  1 clamav clamav     104 Apr 25 11:25 mirrors.dat


Now run #freshclam

Watch as the magical files are updated.

Summary of what to do:
***********************
Add the group clamav. (I think you can check to see if there is one by checking the /etc/group
file, but presumably your getting this error because ther is none.)

# groupadd clamav
# useradd -g clamav -s /bin/false -c "Clam Antivirus" clamav

Check the ownership of the files and directories
ls -lad /var/clamav/

If they are not then use chown command as described above to make clamav the owner of files.

Run #freshclam to update files.