Saturday, October 23, 2010

Install Clamav on Fedora

I decided this morning to install antivirus on my desktop running Fedora 13.
I had to do some looking around before I finally got it installed.
yum install clamav-scanner
yum install clamav-update

cp /usr/share/doc/clamav-server-0.96.1/clamd.conf /etc/clamd.conf

vim /etc/clamd.conf /etc/freshclam.conf

Follow the instructions in the file where it says:
# Comment or remove the line below.

If you see errors like below refer to above.
ERROR: Please edit the example config file /etc/freshclam.conf.
ERROR: Please edit the example config file /etc/clamd.conf.
ERROR: Can't parse the config file /etc/clamd.conf

Saturday, October 16, 2010

Adding a Superuser Account to Linux

I have been testing a Linux Application and found it useful to create a second superuser account on the box besides the root account. Below are the list of commands that I used:

Check the current root account's user ID, group ID and group memberships:
    id root

Create account with superuser privileges (this is for CentOS 5.5):
    adduser -u 0 -o -g 0 -G 0,1,2,3,4,6,10 LOGIN
    passwd LOGIN

Verify change:
    id LOGIN
    less /etc/passwd
    less /etc/shadow
    less /etc/group

To change the account properties:
    usermod [options] LOGIN

To delete the account if you don't care about the home directory:
    userdel -r LOGIN

If you chose not to delete the home directory and need to go back and do it later:
    rm -rf /home/LOGIN

A better way of doing this that aligns with best practice is to create a user and assign it to the wheel group and use 'sudo' instead:
    adduser -G 10 LOGIN
    Use 'visudo' to uncomment the below line:
# %wheel ALL=(ALL) ALL