Tuesday, May 18, 2010

Hard reset password on asp.net membership provider (applied to DNN)

I just moved a DNN (DotNetNuke) installation from a computer to another and restored the database in order to be able to work locally. DNN uses asp.net Membership as its default security provider thus I could not login to the web site (all passwords are encrypted using the local machine key). In order to override the password I wrote the following lines of code:
Dim mu As MembershipUser = Membership.GetUser("MyUserName")
mu.ChangePassword(mu.ResetPassword(), "mytoughpassword")
In the default page’s init event. This is the way to programmatically change any membership account’s password.

Happy coding and don't forget to delete the above mentioned lines after reseting the passwords!

Thursday, April 8, 2010

Επιδιόρθωση του MBR

Όσοι έχουν dual boot windows με Linux με boot loader το grub έχουν σίγουρα αντιμετωπίσει το φαινόμενο να μην ξεκινάει ο υπολογιστής και να πετάει κάποιο σφάλμα ο grub. Σε αυτές τις περιπτώσεις, μια επανεγκατάσταση του grub μπορεί να επιλύσει το πρόβλημα που αντιμετωπίζεται. Για αυτό μάζεψα παρακάτω τις οδηγίες που επιτυγχάνουν την επιδιόρθωση του boot sector.

Monday, March 8, 2010

OpenVPN 2.1.1 with save-password enabled (VPNUK Edition)

A couple of days ago, I received an email from VPNUK asking whether I could compile the latest openvpn (2.1.1) with save-password enabled and if I could make a setup that would include their pre-configured config files in the config folder.
I accepted the challenge and not only did I build the latest version of openvpn with save-password enabled, I also modified the openvpn-gui application in order to provide the end users the means to set their connections’ credentials.

In the beginning I added a new menu item that said “Change credentials…” but later on I decided to modify the build-in “Change password” menu item. The modified version will detect whether or not you have the auth-user-pass in you .ovpn file and if you have it, it will display the following dialogue:
I also modified the installation a little bit in order to fix a couple of bugs (uninstalling while openvpn –gui is running etc) and add a few extra things (reboot at the end of the setup, autostart openvpn-gui etc).
If you are interested in downloading this modified version you can download it from VPNUK’s website by clicking here.

By the way, you should totally check out VPNUK.info! They provide cheap, amazingly fast vpn access to hundreds of remote servers all around the world. While testing the application I was able to stream TV episodes from a well know USA channel that only streams inside the US. So if you need to fake your ip and let others think that you are in another country, don’t miss VPNUK (you can even ask for a free trial).

PS: This build includes both the x86 and x64 TAP drivers

Saturday, February 6, 2010

Unwanted languages in the language bar.

A few days ago, i noticed that i had in my language bar 5 language options, instead of 2 that i had configured for my English Windows 7. I checked it out and i had, for no obvious reason, Japanese (JP), Chinese (CH) and Korean (KO). I looked in my "Text Services and Input Languages" where i could only see the Greek and English keyboards that i had installed. Reboot didn't help so in order to get rid of them, i had to manually add them and after applying the changes i removed them. That worked for me and now i only have my original keyboard settings. I have no idea how i got them there in the first place...

Just for reference, the steps where:
  1. Open "Text Services and Input Languages"
    • Right click on the Language bar → Settings...
      OR
    • Control Panel → Region and Language → Keyboards and Languages → Change Keyboards... 
  2. Click Add...
  3. Select the Keyboards you want to add. In my case:
    • Chinese (Simplified, PRC) → Chinese (Simplified) - US Keyboard
    • Japanese (Japan) → Japanese
    • Korean (Korea) → Korean
  4. Click OK
  5. Click Apply
  6. Select and click Remove each language you don't want.


Update [16/03/2011]:

According to Sinsoul's comment below, the reason appears due to installed MS Office profiling tools. He suggested that you should also remove all unwanted languages from the language options in office profiling tools. Here's how:

Start -> Microsoft Office -> Microsoft Office Tools -> Microsoft Office 2007 Language Settings
On the right list (labeled "Enabled editing languages") select each language you don't want and click Remove.

Tuesday, November 17, 2009

SINERGIJA 09, Βελιγράδι, Σερβία – Ημέρα 0

Ξεκινάει σήμερα το ΙΤ συνέδριο SINERGIJA 09 της Microsoft στο Βελιγράδι της Σερβίας. Το ταξίδι ήταν πολύ καλό και η πόλη ακόμα καλύτερη. Τεράστιοι δρόμοι, τέλεια ρυμοτομημένη αστική περιοχή και άφθονο πράσινο είναι τα βασικά χαρακτηριστικά της άκρως φιλικής παραποτάμιας πόλης στην οποία θα γίνει το συνέδριο.

Η πόλη χωρίζεται σε δύο βασικές περιοχές: το κέντρο ή «παλιά πόλη» και το νέο Βελιγράδι. Στο νέο Βελιγράδι υπάρχουν κυρίως γραφεία εταιριών και από ότι μας είπαν οι ντόπιοι, δεν έχει κάτι να δεις. Το δωμάτιο μου έχει την ακόλουθη θέα από το νέο Βελιγράδι:

Tuesday, October 27, 2009

Windows Vista Service pack 2 cleanup tool (Compcln.exe)

Recently, I was trying to free up some disk space on my C:\ drive. Back in the windows XP era, I used to delete the hidden blue folders (compressed folders with funky names like $NtUninstallKB975025$) in c:\windows\ that contained the uninstall information of each and every update. In windows Vista SP2, Microsoft provided a cleanup tool to do so. Simply open a command prompt (start+R, type “cmd” and press enter) and run “Compcln”. If you have UAC enabled you will get a prompt to allow the program to run. Click continue and then answer “Y” in the command window that will pop up. This will delete all the unnecessary files that are required to uninstall the SP2 (what’s the point of doing so since SP2 increased tremendously the OS’s performance?), freeing up a lot of disk space.

Enjoy!

PS: For windows vista sp1 you can use the vsp1cln.exe tool.

Wednesday, October 7, 2009

Automatically Print Both Sides with HP LaserJet P2015dn and Window 7

Since i upgraded my laptop with Windows 7, i couldn't figure out how to automatically print in both sides with my office's HP LaserJet P2015dn. On windows XP and Vista that had "HP LaserJet P2015 PCL5 Plug and Play Print Driver Package" HP drivers installed, there was an easy-to-find-and-understand option (Two-sided Printing) on Print → Preferences → Printing Shortcuts tab. Unfortunately, on Windows 7 the only driver available is the one coming with Windows 7 but there is no such tab and the closest option to it, is to print duplex manually.
Today i tried to fix this, but having spent allot of time using the good old fashion way of trial and error, I decided to call HP's support. They tried to help (not that effectively) but i managed to find the solution by my own while i was waiting for reply...

So here are the steps to fix this: