Blog Archive

Wednesday, September 28, 2011

Pending restart operation SQL server installation

if you  have tried to install SQL Server 2008  and cannot install, because of  the errormessage the prerequistite "Restart the computer is required".

But every time you restart  computer and try to execute the setup of SQL Server 2008, you get the same message

Then you have change a registry entry in computer
  • Open Regedit
  • Find the key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager"
  • Rename the "PendingFileRenameOperations" value to "PendingFileRenameOperations2"
  • Try again
This will solve the Restart Problem

Friday, September 16, 2011

vsftpd virtual users

Installing vsftpd using text file for virtual users

vsftpd is a secure, fast and stable FTP server. In this tutorial we'll install the server and make it check in a flat text file for virtual users allowed to login.

1. Install required packages

sudo apt-get install vsftpd libpam-pwdfile

2. Configure vsftpd (sudo pico /etc/vsftpd.conf)

Edit these variables in the config file and leave everything else with the default value.

anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
chroot_local_user=YES
virtual_use_local_privs=YES
guest_enable=YES
user_sub_token=$USER
local_root=/var/www/$USER
hide_ids=YES

Set the local_root to the parent directory where the user's home directories are located

3. Configure PAM to check the passwd file for users (sudo pico /etc/pam.d/vsftpd)

auth required pam_pwdfile.so pwdfile /etc/ftpd.passwd
account required pam_permit.so

Make sure you remove everything else from the file

4. Create the passwd file containing the users

sudo htpasswd -c /etc/ftpd.passwd user1

You can later add additional users to the file like this:

sudo htpasswd /etc/ftpd.passwd user2

5. Restart vsftpd

sudo /etc/init.d/vsftpd restart

6. Create user's home directory since vsftpd doesn't do it automatically

sudo mkdir /var/www/user1

7.Create Appropriate Permissions for that folder for user ftp for uploads

chown 775 ftp:ftp /var/www/user1

 

Tuesday, September 13, 2011

Change Virtualbox UUID of Virtual Disk Vdi

Simply copying the .vdi file into another location will make a verbatim copy of the virtual disk, including the UUID of the disk. If you try to add the copy in the Virtual Media Manager, you will get an error like this:

virtualbox-error.png



In this case, you have to do the following:

giannis@giannis-laptop:~$ VBoxManage internalcommands setvdiuuid /path/to/virtualdisk.vdi
VirtualBox Command Line Management Interface Version 2.2.2
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

UUID changed to: 9e89fe14-d010-469e-a737-cd65218c4acb


Since the old UUID is replaced with a new one, you can now add and use the virtual disk.

Please note, that you wouldn't have to follow this procedure if you had used the clonevdi function to copy the virtual disk image, in the first place. The clonevdi function makes sure that the new disk image will have its own unique UUID.

The syntax of the clonedvi goes like this:

$ VBoxManage clonevdi Master.vdi Clone.vdi

Source: http://www.giannistsakiris.com/index.php/2009/05/06/virtualbox-how-to-change-the-uuid-of-virtual-disk-vdi/

Rescue locked SQL Server 2008

Reset Forgotten Sa password

To configure startup options

  1. Fist Login computer using administrator Account
  2. In SQL Server Configuration Manager, click SQL Server Services.

  3. In the right pane, right-click SQL Server (<instance_name>), and then click Properties.

  4. On the Advanced tab, in the Startup Parameters box, type the parameters separated by semicolons (;).

    For example, to start in single-user mode, insert -m; in front of the existing startup options, and then restart the database. (When you start SQL Server in single-user mode, first stop SQL Server Agent. Otherwise, SQL Server Agent might connect first and prevent you from connecting as a second user.)

    Important noteImportant

    After you are finished using single-user mode, you must remove the -m; from the Startup Parameters box before you can restart the server instance in the normal multi-user mode.

  5. Click OK.

  6. Restart the Database Engine.

  7. Change security authentication mode (You may not require this step if you have already enabled sa user)

    1. In SQL Server Management Studio Object Explorer, right-click the server, and then click Properties.

    2. On the Security page, under Server authentication, select the new server authentication mode, and then click OK.

    3. In the SQL Server Management Studio dialog box, click OK to acknowledge the requirement to restart SQL Server.

    4. You can change password here.
  8. Enable the sa login by using Management Studio(You may not require this step if you have already enabled dual authentication )
    1. In Object Explorer, expand Security, expand Logins, right-click sa, and then click Properties.

    2. On the General page, you might have to create and confirm a password for the sa login.

    3. On the Status page, in the Login section, click Enabled, and then click OK.

  9. Now you can logon with sa user and password .You can also set permission of the local user account from that.


Followers