Wednesday, January 31, 2007

solving stucked debian package


If we tweak alot with our system, apt-get install this apt-get remove that, we might bumped into this error :

No override present.
dpkg: error processing cyrus-common (--remove):
subprocess post-removal script returned error exit status 2
Errors were encountered while processing:
cyrus-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
m


I was installing cyrus, and then removing, and then reinstalling again. And then want to remove again, then I bumped into this error.

I can't remove cyrus-common. I tried it with apt-get, dpkg, dselect, aptitude, synaptic, kpackage. It just stucked as installed, but when I tried to remove, it gave me that error.

Googled for a while. Find no paticular solution for my error, but found a tip that I should peek into /var/lib/dpkg/info/
Checked out cyrus-common.postrm file, commented out the first two of dpkg-stateoverride line. Save the postrm file. Run apt-get remove cyrus-common.
The command executed and exited gracefully, and deregister cyrus-common from dpkg list.

This is a quick and dirty solution. Basically I commented out the commands so that postrm will exit gracefully.

Monday, January 29, 2007

Postfix NIS lookup error



If you install postfix in debian (3.1) by using apt-get install postfix, then most likely there will be an NIS lookup error such as :

Jan 30 09:48:01 localhost postfix/smtpd[11719]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled

To eliminate the error, go to main.cf and erase or comment out any references to nis: such as aliases = nis:alias.name

Postfix postdrop error



I installed Postfix mail server on Debian 3.1. Pretty straight forward installation and run with no problem.

Then I add 10+ user using webmin and "user and group" application from the GUI itself (gnome). Suddenly, somehow, postfix failed.

The error msg was :

Jan 29 17:02:03 localhost postfix/smtpd[2238]: fatal: file /etc/postfix/main.cf: parameter setgid_group: unknown group name: postdrop

Searched the google, but couldn't find a solution for the problem.

I sent a question to the local postfix mailing list, but somehow, the email didn't went thru (the mail server kept rejecting my mail).

Anyway, I dpkg reconfigure the postfix

dpkg-reconfigure postfix

And it fixed the problem!! The error dissapeared and postfix started perfectly.

Wednesday, January 10, 2007

Adding an alias to an ethernet interface using ifconfig


To add an address to an ethernet interface :

ifconfig ethx:n [ipaddress]

where :
x = ethernet number
n = alias number

example

ifconfig eth0:1 10.0.0.10
will add 10.0.0.10 to eth0 in addition to the existing ip address [eth0]

Link : Setting up IP Aliasing on A Linux Machine Mini-HOWTO