Pages

Thursday, September 13, 2007

Steps to register the DLL in COM+ Applications Component Services.

Steps to register the DLL in COM+ Applications Component Services are:

1. Stop Website to prevent use of site
2. Shutdown the Website application in Component Services
- Start -> Settings -> Control Panel-> Administrative Tools -> Component services
- Under Component Services -> My Computer -> COM+ Applications you must see 'Website'

3. The ‘example.dll’ is Unregistered from the appropriate folder. The dll is found in the folder 'website' under Inetpub
Regsvr32 /u

4. Take the backup of the example.dll and delete the unregistered DLL from the 'website' folder under Inetpub
5. Also, delete ‘exampledll.Report’ from the MTS package COM + application of component services
6. Copy the dll form Source and Paste the modified DLL into 'website' DLL lcoation folder on the destination (Prod) webserver.
7. Register the modified DLL
Regsvr32

8. Drag and Drop the DLL into the COM+ application of component Services window
9. Start the Website COM+ application
10. Start the website in the 'IIS' manager.

Saturday, September 8, 2007

Forgot mysql root password change Mysql root password in a Unix environment,

In a Unix environment, the procedure for resetting the root password is as follows:

MySQL Enterprise. For expert advice on security-related issues, subscribe to the MySQL Enterprise Monitor. For more information see http://www.mysql.com/products/enterprise/advisors.html.

1. Log on to your system as either the Unix root user or as the same user that the mysqld server runs as.

2. Locate the .pid file that contains the server's process ID. The exact location and name of this file depend on your distribution, hostname, and configuration. Common locations are /var/lib/mysql/, /var/run/mysqld/, and /usr/local/mysql/data/. Generally, the filename has the extension of .pid and begins with either mysqld or your system's hostname.

You can stop the MySQL server by sending a normal kill (not kill -9) to the mysqld process, using the pathname of the .pid file in the following command:

shell> kill `cat /mysql-data-directory/host_name.pid`

Note the use of 'backticks' rather than forward quotes with the cat command; these cause the output of cat to be substituted into the kill command.

3. Create a text file and place the following command within it on a single line:

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPassword');

Save the file with any name. For this example the file will be ~/mysql-init.

4. Restart the MySQL server with the special --init-file=~/mysql-init option:

shell> mysqld_safe --init-file=~/mysql-init &

The contents of the init-file are executed at server startup, changing the root password. After the server has started successfully you should delete ~/mysql-init.

5. You should be able to connect using the new password.

Alternatively, on any platform, you can set the new password using the mysql client(but this approach is less secure):

Stop mysqld and restart it with the --skip-grant-tables --user=root options (Windows users omit the --user=root portion).
Connect to the mysqld server with this command:

shell> mysql -u root

Issue the following statements in the mysql client:

mysql> UPDATE mysql.user SET Password=PASSWORD('newpwd')
-> WHERE User='root';
mysql> FLUSH PRIVILEGES;

Replace “newpwd” with the actual root password that you want to use.

6. You should be able to connect using the new password

Forgot Mysql root password change Mysql root password using mysqld

If you have never set a root password for MySQL, the server does not require a password at all for connecting as root. However, it is recommended to set a password for each & every account.

If you set a root password previously, but have forgotten it, you can reset old password. The following procedure is for Windows systems. The procedure under Windows:

1. Log on to your system as Administrator.

2. Stop the MySQL server if it is running. For a server that is running as a Windows service, go to the Services manager:

Start Menu -> Control Panel -> Administrative Tools -> Services

Then find the MySQL service in the list, and stop it.
If your server is not running as a service, you may need to use the Task Manager to force it to stop.

3. Create a text file and place the following command within it on a single line:

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPassword');

Save the file with any name. For this example the file will be C:\mysqlchpwd.txt.

4. Open a console window to get to the DOS command prompt:
Start Menu -> Run -> cmd

5. We are assuming that you installed MySQL to c:\mysql If you installed MySQL to another location, adjust the following commands accordingly.

At the DOS command prompt, execute this command:

C:\> C:\mysql\bin\mysqld-nt --init-file=C:\mysqlchpwd.txt

The contents of the file named by the --init-file option are executed at server startup, changing the root password. After the server has started successfully, you should delete C:\mysqlchpwd.txt.

If you install MySQL using the MySQL Installation Wizard, you may need to specify a --defaults-file option:

C:\> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt.exe"
--defaults-file="C:\Program Files\MySQL\MySQL Server 5.0\my.ini"
--init-file=C:\mysql-init.txt

The appropriate --defaults-file setting can be found using the Services Manager:

Start Menu -> Control Panel -> Administrative Tools -> Services

Find the MySQL service in the list, right-click on it, and choose the properties option. The path to executable field contains the --defaults-file setting.

6. Stop the MySQL server, then restart it in normal mode again. If you run the server as a service, start it from the Windows Services window. If you start the server manually, use whatever command you normally use.

You should be able to connect using the new password.

Different tricks: How to Change the MySQL Password using command prompt

Setting up mysql password is one of the essential tasks. root user is MySQL admin account. Remember Linux/UNIX login root account for your operating system and MySQL root are different. They are separate and have nothing to do with each other (indeed some admin removes root account and setup admin as mysql super user).

Method # 1
If you have never set a root password for MySQL, the server does not require a password at all for connecting as root. To setup root password for first time, use mysqladmin command at shell prompt as follows:

$ mysqladmin -u root password NEWPASSWORD

However if you want to change (or update) a root password, then you need to use following command:

$ mysqladmin -u root -p oldpassword newpass

Enter password:

To change a normal user password you need to type (let us assume you would like to change password for pcsmitpra):

$ mysqladmin -u pcsmitpra -p oldpassword newpass

Method # 2:
MySQL stores username and passwords in user table within MySQL database. You can directly update password using following method to update or change password for user pcsmitpra:

1) Login to mysql server, type following command at shell prompt:

$ mysql -u root -p

2) Use mysql database (type command at mysql> prompt):

mysql> use mysql;

3) Change password for user pcsmitpra:

mysql> update user set password=PASSWORD("NEWPASSWORD") where User='pcsmitpra';

4) Reload privileges (very important), this method you need to use while using PHP or Perl scripting.:

mysql> flush privileges;
mysql> quit

Your comments are valuable for me.

Thursday, September 6, 2007

Script to change the https to http for PASSWORD change page

By default the password change pages require SSL.

You can change the PasswordChangeFlags to enable non-secure password changing:

cscript c:\inetpub\adminscripts\adsutil.vbs set w3svc/passwordchangeflags 1
The value defaults to 6 which means password change is disabled and no advance notice is given.
A value of 1 means allow non-secure password change and give notice prior to password expiring.