Tuesday, September 23, 2008

Finding spammers in the Plesk server having mailenable as mail server

Yup. Finding spammers in the Plesk server having mailenable as mail server is a easy(?) task, if you know what you are doing. I am never a good windows admin, but I understand something. Often now a days, I find windows permissions to be more cumbersome than Linux, making me using the Sysinternal's (now Microsoft's) swiss knife tools every time.

So here the issue was that, my client was not able to identify the spammer. I enabled Debugging (which was off) and then logging level was increased.

regedit and went to the below location to add a debug logging level.

[HKEY_LOCAL_MACHINE\SOFTWARE\Mail Enable\Mail Enable\Connectors\SMTP]
"Debug Logging Level"=dword:0000000a

And finally disabled the admin user of the default domain in mailenable. They were sending 1 email per 10 secs and that that details logging helped. Confirmed from mailenable.msc -> System -> localhost -> Connectors -> SMTP -> queue

Sunday, September 21, 2008

cPanel postgresql update sql statements

A Update statement from a postgresql db user created from the cpanel interface will result in an error similar to below.

Warning: pg_query() [function.pg-query]: Query failed: ERROR: permission denied for relation listing in /home/username/public_html/pg_error.php on line 4

The only solutions (may be due to security aspects) available now, if you dont want to login as postgresql user and give the user more permissions is to use the cpanel username and password to update the database.

Wednesday, August 20, 2008

Plesk Windows 2003 - One website asking for password

This post is actually associated with the last post I made. But instead of editing the last post, I decided to go with a new post, since the issue happened before. After I change the password of an account, website on accessing on a browser, keeps on asking for username and password. It can be fixed by executing the following command from the cd %plesk_bin% directory.

websrvmng --update-anon-password --domain-name=domainname.com

Plesk Windows 2003 - 530 FTP user cannot login

Plesk Windows 2003 - 530 User username cannot log in. A plesk user after a server move was not able to log in.

My first attempt was to change the password which resulted in the error as below

Error: Unable to activate/deactivate domain: User or role 'username2' does not exist in this database.


As you can see that didn't fix the issue. Now I went on to change the username which resulted in the below error

Error: Unable to update hosting preferences: Unable to rename FTP user: ftpmng --rename-user failed: User "username1" doesn't exist


So that put me in the track. Before entering to the plesk database and manually updating it on, I gave it a try to use the following command (which worked!) and saved me from further hassles.

"%plesk_bin%\ftpmng.exe" --reconfigure-all

Tuesday, August 19, 2008

IIS 6.0 ASP or ASP.NET 404 Page Not found error

First of all, before telling about the issue, let me apologize to the blogger god for blogging about Windows issues too, on a Unix only blog. I currently support a windows client as well. It is a learning process and I must say that I am enjoying that too.

Okay the issue was this

I am moving a domain from a Plesk 7.6 installed server to Plesk 8.4 installed server - a relatively new one. Everything except the domain contents are moving. I didn't try to fix at the source. Instead I tarred the httpdocs and moved to the new server and extracted it there. And there began the permission issue, as expected.

Issues
--------

* Permission issue was making the website to ask for the password. Ran the Plesk permission fix from the Plesk reconfigurator and it did fix the issue.

* Once that permission was fixed, came another issue which was returning 404 on a asp page which is actually there. I asked the Sergey's google, but it was saying many things but all answers were addressing the serverwide issues, like Allowing the ASP in Web Service Extension and so on, which was already enabled.

My issue was domain specific. So had to do something with the IIS and the website in specific. Made sure that it had permissions for all users, just as any other website. So not any permission issue. And after two hours of scratching, I found that it was because there was nothing configured to process the files with .asp extension.

Steps to follow is this

1. Start -> Run -> inetmgr
2. Websites -> domain.com -> Right Click permissions
3. Home Directory --> Application Settings --> Configuration
3. Add -> Executable -> C:\WINDOWS\System32\inetsrv\asp.dll and LIMIT the verbs to GET,HEAD,POST,TRACE.

And voila that fixed the issue. Now some database connectivity is missing. Let me go back and work on that.

Thursday, June 19, 2008

cPanel compiling apache - No method to auto repair package system

My friends who use cPanel as their control panel, let me advise you first and foremost, don't use WHM to do sysadmin tasks. It will mess up the system once in a while and will leave you in dark. Similar situation happened with my friend, who was trying to compile PHP enabling the experimental PDO support through WHM. It messed up and all he could see was


!! No method to auto repair package system !!

!! Please visit http://www.cpanel.net/support/could_not_ensurepkgs.htm for help with this error. !!

!! Restoring original working apache !!


Apache stopped working. Examined a bit around 15 minutes to find out the solution. I was blindly looking around the httpd.conf and other similar configuration. But it was when I ran /scripts/easyapache, I could sniff the issue.

cPanel was not able to update the packages and problem lied in the yum updating the PDO package.A "ps -auxww | grep yum" told me the same. Process was having the status of T (or stopped). I continued the process by passing the signal 18 to it and everything and niffy after that "kill -18 PID"