LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Adding a user for clamav (https://www.linuxquestions.org/questions/linux-newbie-8/adding-a-user-for-clamav-323543/)

NNP 05-14-2005 06:23 PM

Adding a user for clamav
 
Hey, im installing clamav and in the documentation there's this instruction

Quote:

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

Consult a system manual if your OS has not groupadd and useradd utilities. The account should be locked in /etc/passwd or /etc/shadow.
I typed that in but i have a few questions.

1)How is the password set in this?
2)In the GUI system admin it says beside the user clamav that its status is locked. What does that mean
3)Where it says the account should be locked in /etc/password or /etc/shadow, what part of the command did this?

Thanks,

NNP

btmiller 05-14-2005 09:13 PM

1) The password is set to be some invalid field so the user can't login.
2) It means the account is not allowed to login.
3) The -s /bin/false flag set the account's shell to /bin/false. As this is not a valid shell, it effectively locks the account.

NNP 05-14-2005 09:17 PM

so whats the point of making the account?

Do i not have to switch to the clamav user to start clamd?

btw, whats the point of clamd. I cant figure out why i have to configure ports etc for it as i wont be accessing it remotely.

btmiller 05-14-2005 10:01 PM

Stuff can run as a particular user without that user being required to login. Many daemons will start as root to perform priviliged operations (bind to priviliged ports, write state files, etc.) and then drop to a less priviliged user such as the one you created. Obviously, these users have no reasons to be allowed to login.

Spamassassin, like a lot of *nix software, is designed flexibly so it can be used in large and small environments, hence clamd runs as a daemon so you can separate the machine that does spam filtering from your mail server. If you have a big site with high mailtraffic, this can be critically important. If you don't need the functionality, set clamd to bind only to the local interface and/or firewall off the ports it uses to all but local traffic.

NNP 05-15-2005 06:56 AM

will this bind it only to my own PC. I edited the clamd.conf file

Code:

# TCP address.
# By default we bind to INADDR_ANY, probably not wise.
# Enable the following to provide some degree of protection
# from the outside world.
# Default: disabled
TCPAddr 127.0.0.1


btmiller 05-15-2005 11:42 AM

That should do it, since 127.0.0.1 is the loopback interface.


All times are GMT -5. The time now is 05:31 AM.