Search

Blogroll

Meta:

Audit still logging even when stoped

November 10th, 2009 by vicky

I had strange problem on one of my CentOS 5.4 servers. I stoped auditd service and disables SElinux, the server, however, was still logging all those annoying things like

Nov 10 18:27:01 server kernel: type=1105 audit(1257874021.909:87975): user pid=27986 uid=0 auid=0 msg=’PAM: session open acct=”root” : exe=”/usr/sbin/crond” (hostname=?, addr=?, terminal=cron res=success)’
Nov 10 18:27:02 server kernel: type=1104 audit(1257874022.828:87976): user pid=27986 uid=0 auid=0 msg=’PAM: setcred acct=”root” : exe=”/usr/sbin/crond” (hostname=?, addr=?, terminal=cron res=success)’

into /var/log/messages log, filling it up with garbage.

After some time spent investigating I  fixed it. I edited /etc/audit/audit.rules  and replaced line

-D

with this line

-e 0

After that I started auditd service, stopped it and no more logs in /var/log/messages

Posted in General linux admin | 1 Comment »

Show line numbers in vi or vim

November 5th, 2009 by vicky

Have you ever wondered how to show line numbers in vi or vim while editing file? I do that always when I patch some software or install MODs that come with “go to line xxx and rewrite this…”. And the solution is really simple.

In vi/vim type :set number to show line numbers and :set nonumber to hide line numbers.

Posted in General linux admin | No Comments »

EnsimX maintenance mode

July 3rd, 2009 by vicky

After OS upgrades and updates it is needed to run EnsimX through maintenance mode. Here is info how to do it:

/usr/local/sbin/set_maintenance
/usr/local/sbin/set_pre_maintenance
/usr/local/sbin/set_post_maintenance
/etc/init.d/epld restart

If you encounter any problems you can exit the maintenance mode by issuing this command:

/usr/local/sbin/exit_post_maintenance

Posted in Ensim | No Comments »

Vhimport failing to restore site backup

April 26th, 2009 by vicky

When you experience error during EnsimX import script like this:

Unknown Error: Traceback (most recent call last):
File “vhbackuplib.py”, line 54, in call_backend_import
File “virtualhosting/virthost.py”, line 4575, in vhimport
File “virtualhosting/virthost.py”, line 4730, in __do_import
File “virtualhosting/virthost.py”, line 5030, in __site_import
File “virtualhosting/virthost.py”, line 3300, in handle_remaining_files
File “virtualhosting/virthost.py”, line 3380, in link
OSError: [Errno 17] File exists

the cause may be in X11 symlink on OS other than FC6. The cure is as follows:

mv /home/virtual/FILESYSTEMTEMPLATE/siteinfo/usr/lib/X11{,XTEMP}
vhimport site_backup.tar.gz
mv /home/virtual/FILESYSTEMTEMPLATE/siteinfo/usr/lib/XTEMP{,X11}

Basicaly what is does it renames /home/virtual/FILESYSTEMTEMPLATE/siteinfo/usr/lib/X11 and after the restore is successful it renames it back to original name.

Posted in Ensim | No Comments »

Rebuild sendmail.cf file in EnsimX (Parallels Pro)

April 24th, 2009 by vicky

The file to rebuild is located in /usr/lib/opcenter/sendmail/install/sendmail.mc

Make sure you do backups first:

cp /usr/lib/opcenter/sendmail/install/sendmail.mc /usr/lib/opcenter/sendmail/install/sendmail.mc.bak

After editing the file /usr/lib/opcenter/sendmail/install/sendmail.mc you need to rebuild it to macro format which will be located in /etc/mail/sendmail.cf

m4 /usr/lib/opcenter/sendmail/install/sendmail.mc > /etc/mail/sendmail.cf

voila! it is done, now restart sendmail by “service sendmail restart” and your changes are applied.

Posted in Ensim | No Comments »

proftpd show hidden files

March 8th, 2009 by vicky

Not seeing hidden linux files ( dot beginning files) in your ftp you can enable this option in your ftp client. (show linux hidden files). It it does not work you can force your linux ftp server to show them via this command in /etc/proftpd.conf

ListOptions -a

Put it into the conf file and restart proftpd service.

Posted in General linux admin | No Comments »

Turn on syntax highlighting in vi/vim

March 1st, 2009 by vicky

I recently got to administer a few linux boxes and wondered why vi does not show colors when I edit files. Some servers did it, some did not. It was differently set up by datacenter images and I really did not have time to investigate.

Now it just annoyed me because I could not find few syntax errors on one server and here is the solution.

Open up some file in vi or vim and hit ESC, then type “:syntax on”  and the magic happens… let there be color :-)

If you do like it without color, type “:syntax off”

Posted in General linux admin | No Comments »

Speeding up apache by mod_deflate and mod_expires

November 5th, 2008 by vicky

Here is how I speed up apache by compressing pages with mod_deflate module and setting higher cache expiration times in mod_expires module. Here is how… Read the rest of this entry »

Posted in General linux admin | No Comments »

Display mysql root password on Ensim server

October 22nd, 2008 by vicky

Ever wondered how to find out your mysql root password? Well, on Ensim server it is easy to find out.

ensim-python -c “import sys;sys.path.append(\”/usr/lib/opcenter/mysql\”);import mysqlbe;print mysqlbe.read_mysqlpass()”

It it one line command. Execute it from shell logged in as root. Works well :-)

Posted in Ensim, Mysql | No Comments »

Disable cron email alert

October 14th, 2008 by vicky

Ever wondered how to disable the email alert sent when cron is executed? Easy help, there are various ways to achieve this, so feel free to use the one you like the best. :-) They all work, though. Read the rest of this entry »

Posted in General linux admin | No Comments »

« Previous Entries Next Entries »