Posts

Showing posts from 2013

Microsoft DirSync on Windows 2008

After setting up the office365 domain and configured almost everything I tried to setup dirsync in order to synchronize my local Active Directory with the one on Windows Azure. Microsoft stated that I did not have to install it on a Windows 2008 R2 SP1 computer as the article with the minimum system requirements says so I fired up a brand new Windows 2008 Standard server for which I have the necessary license. After installing the updates to the .NET 3.5 and .NET 4 I installed dirsync and set it up. Everything seemed to be working fine, all the users could login to office365 portal with their credentials and they could  set up outlook without a problem. When the users started changing their passwords the changes were not reflected back to Windows Azure! I changed some attributes for a test user account (Name, Department) and the changes were reflacted to Windows Azure. After many full sync and imports and pulling my hair out for a bit, I enabled logging using the Enabl...

Outlook 2007 Not Connecting to Office365

I had a couple of users yesterday that have Office 2007 Standard SP3 on their computers and they couldn't setup their office365 account. I checked the software requierements for office365 where Microsoft Office 2007 SP3 is listed. I had automatic updates enabled and there were no pending updates. When the user tried to setup their account the credentials used were not accepted. The user was able to login to office365 portal though. As is turns out there is a necessary update, kb2687404 , that has to be installed if not installed automatically. The updated states to fix a problem with expired passwords but fixed the issue for me. I also checked on other two machines with a fresh install of Microsoft Windows and  Microsoft Office with Service Pack 3.

Office365 Account Password Never Expires

I have my second Office365 setup finished for a month or so and today my goal was to set the "password never expires" attribute on two of the cloud administrator accounts. I use dirsync to synchronize the local AD with the Windows Azure AD so I've set up an administrator account for that perpose. Since I do not want to run the dirsync setup every three months I decided to set the password never to expire. I also have a second global administrator cloud account in case there's something wrong with the sync. In order to set the attributes on the cloud users you have to connect to the Online Directory Service. Before you start you need to check the system requirements and install and import the necessary powershell module from  http://technet.microsoft.com/library/jj151815.aspx Then you just have to open powershell and run the following commands: Connect-MSOLService -Credential $cred  to connecto to the service  and Get-MSOLUser -UserPrincipal...

File Delete Dialog

I've had many cases of accidental file and folder deletion the past months and every time I had to search and restore the files/folders from the backups. Restricting the permissions on t he directories didn't seem to be helpful so I did some research. As it turns out, the dialog to confirm the deletion was not displaying. I fired up Group Policy Management Console, opened the group policy object and navigated to: User Configuration - Administrative Templates - Windows Components - Windows Explorer . There's a setting there named Display confirmation dialog when deleting files.  I set it to enabled and now users have to confirm when deleting a file or folder.

Website Offline Copy

Ever wanted to have an entire website available as a local copy? I did yesterday. There's a website with a forum that is about to be closed and that contains lots of useful info. So I thought: "Why not save it?" I gave some tools a try but I could not get them to get all the files. Then I decided to use the good old wget. I logged in on an old linux machine and after reading the man page for a while I used the following command to download the site: $ wget \ --recursive \ --no-clobber \ --page-requisites \ --html-extension \ --convert-links \ --restrict-file-names=windows \ --domains example.com \ --no-parent \ www. example.com In case the part of the site is protected with a log on page you may use cookies to access the content. Firstly get the cookie with the following command:  $ wget \           --save-cookies cookies.txt \           --post-data 'user=your...

Windows User Profile Path

I'm developing a small windows application that manages the profiles on my Windows computers and I observed that many profiles, although they were on se correct folder, the name of the folder was not the same with the username. I found an article on Microsoft KB that is about temporary profiles but is mentions that there's a registry key that holds that information for all users. The key is the: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList I used that key to map the usernames to the directories.  

Backup Exec 12.5 Manually Check For Updates

I've been having strange errors with my servers lately, my Exchange Backup was failing and I got blue screens that were caused by VirtFile.sys I found out that the problem was caused by Backup Exec. The first thing I always do is check for updates but I would like Live Update to function interactively. I went to the Control Panel, opened up Live Update and selected Interactive Mode. When I opened up Backup Exec and tried to check for updates I got a strange error that stated that there are no products to check for updates for. I searched the Symantec KB for a while and I found a command that re-registers Backup Exec to Live Update. The command is: "C:\Program Files\Symantec\Backup Exec\BeUpdateOps.exe -AddBE -OptOut" After that I managed to update my server and I have no problems so far. I switched it back to Express Mode after I fixed the problem with my Live Update server.

Windows Forms Application Icon

I've been developing a windows forms application for a while now and today I decided to add an icon to it. I went to the Application tab of the project's properties window and set the icon. I could see the new icon for the .exe file but when I started the application the icon on the task bar was the standard icon. After googling around for a bit I found out that I had to set the icon for all the forms in the project. I added a resource for the icon file on the resources tab of the properties window and then used the following code in the Form_Load funtion to set the icon:  System.Drawing.Icon ico = Properties.Resources.icon;  this.Icon = ico; You'll have to change the "icon" to the name of the resource you've added.

Windows 2008 EventID 513

For a few days now I was getting error with id 513 on my Windows 2008 Domain Controller. The error had the following details: Cryptographic Services failed while processing the OnIdentity() call in the System Writer Object. Details: AddCoreCsiFiles : BeginFileEnumeration() failed. System Error: Access is denied. I searched for the System VSS writer and it was missing. In that case you might be having problems with the permissions on the winsxs folder under the windows folder. You may run the following commands to rough check: cd /d c:\windows\system32 icacls %windir%\winsxs\filemaps\* > C:\acls.txt In case the above command fails, you may run the following script in order to restore the necessary permissions: takeown /f %windir%\winsxs\filemaps /a icacls %windir%\winsxs\filemaps /grant "NT AUTHORITY\SYSTEM:(RX)" icacls %windir%\winsxs\filemaps /grant "NT Service\trustedinstaller:(F)" icacls %windir%\winsxs\filemaps /grant "BUILT...

Perl Installation Path

Yesterday I was trying to configure a website under lighthttpd on a linux box. The site actually was CGIProxy so I could access sites that the office firewall was blocking, and browse a bit safer using a linux nas I've got at home. After the necessary adjustmens to the web server I found out that I had to adjust the path to the perl interpreter on the lighthttpd configuration file. There were many perl installantions and I was a bit confused... Thankfully, there is a very easy way to get the path that perl installation is located by executing the following command on a terminal:  perl -le 'print $^X'  

Microsoft Outlook Text Selection via Cursor Problem

I saw a very strange (to me aleast) problem today. A user could not select text by dragging the cursor on Microsoft Outlook. It turns out that some updates for the Office platform may cause that behaviour and all you have to do is delete the  HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Data key. The problem appeared in Outlook because it was set as the default message editor. You can find the relevent article on  Microsoft KB .

Optimizing IIS server

After searching the web for a while, I found some useful tips for optimizing Microsoft IIS performance. The first thing to do is disable logging for your sites. Since you're interested in performance you have to be on a production server and there's no reason to have logging enabled. One other thing to do is adjust the CPU that every application pool can use. You can even have the server terminate an address pool if it's using to much CPU. You may also set the keep alive limit so you'll have less sessions. I've also excluded the inetsrv directory (located in system32) from antivirus scans. In my occasion there was no need to limit the bandwith for a website since there was no problem with it. You can always speed the server up by improving the overall performance by disabling unused services or excluding application folders from antivirus scans (only when it is absolutely needed, like on MS SQL or Exchange servers).

Multilingual Sites with drupal 7

For those of you who are struggling with the multilingual features of drupal 7 (like myself) and can't get it to work give the following article a try: https://drupal.org/node/1268692 . I managed to get a multilingual site up and running with no problems very easily. You'll have to tweak it a bit but at least you won't struggle to get things working. I didn't install many of the optional modules since they are not essential, like the custom administration toolbar.

Drupal with clean urls on Apache

It's been a long time since I've tried to enable clean urls on my testing server, mainly because I use it for development purposes only. Today I decided to enable it because I'm tired of using the "?q=". First of all I enabled the rewrite module using the command "a2enmod rewrite". The above command enables the rewrite module for apache. You still have to enable the use of the module for your site. This can be done in two ways. You can add the configuration on your site file (/etc/apache2/sites-available) or you can configure apache to override it's settings using the .htaccess file. You may have to use the second method in case you're using a hosting environment and you do not have access to apache's configuration. Your provider is most likely using the override settings of your .htaccess file. After enabling the rewrite module, add the following on the <Directory> section of the configuration file of your site (e.g. /etc/a...

Drupal Commerce Kickstart 2 AJAX error

I've been working with drupal for a long time now and I've always used Ubercart when creating stores. Last night I decided to give Drupal Commerce a try. I grabbed a copy of the Commerce Kickstart 2.0 and tried to install it but I got an AJAX error when installing demo store every time. After some searching around I found out that I may had to increase the memory limit for PHP script... I decided to increase the limit from 128MB to 256MB and everything worked like a charm!

Office 365 Send As

We've been using Microsoft Exchange 2007 and 2010 for many years now and I've always used the add-receipientpermission command to give the users the SendAs permission. Today I had to do it for a company that is using Office 365. After a google search I found out that I could load a session and connect to the server that's hosting the mailboxes: First of all you have to create a variable for the credentials that you're going to use with the following command:     $cred = get-credential Then you have to create a session object for Microsoft Exchange using the following command:     $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $cred -Authentication Basic -AllowRedirection And import it using:     Import-PSSession $Session After that you're ready to configure the appropriate permissions:     Add-RecipientPermission -Identity target@exa...
Having a multilingual drupal website always troubled me a lot. A run across a very interesting tutorial the other day that made the process of creating a multilingual site very clear. You may find the tutorial at the following address: http://www.ostraining.com/blog/drupal/multi-lingual-drupal/  

Symantec BackupExec 12.5 and Microsoft Exchange 2007 Error

I had a very strange error last Saturday where the full backup of an exchange server failed with the code "Error querying the writer status". I knew there had to be something with the Volume Shadow Copy Service so I tried to restart it and then run the backup job but it failed again. After a short search on the Symantec forums, I found a solution... First of all I stopped the agent service on the target computer. Then I renamed the file "C:\program files\Symantec\backup exec\raws\bedsshadow.dll" to something else and started the agent service. The job failed again but this time due to a communications failure. I then stopped the agent service, gave the file it's original name and started the agent service again. This time the job completed successfully!

Microsoft Office SaveAsPDFandXPS Addin and transparent images

A user complained about the SaveAsPDFandXPS addin functionality today, because there was a problem with transparent images. The transparent part of the images was converted to black instead. After a google search I discovered that if one enables the option to create a PDF/A file, the above problem appears because transparent images are not supported in that format. After disabling the option for PDF/A everything worked great.

How to publish multiple WSS 3 sites using ISA 2006

Microsoft IIS allows you to publish multiple sites on the same port (usually 80) using host headers. You can have many different Windows SharePoint Apolications that listen on the same port by just changing the host header. Usually after creating a website with a host header I create a DNS alias with the host header that points to the server that hosts the site. With ISA 2006 you can publish the web application but if you try to publish it using https and the web server uses http you may run into some problems with the Alternate Access Mappings. After you create the Web Listener on the ISA server and publish the web application you have to make sure that the publishing rule forwards the original host header and listens for the specific site. You must also configure the bindings on the IIS and the AAM on the SharePoint site. Go to AAM menu and configure the public URLs for each zone of each site. Most times I set up Default and Internet. Add the correct address for each zone ...

Windows Sharepoint Services 3.0 Send Email to external addresses

I run across the following problem today: I have a sharepoint site that is working fine and I had to add five new users that do not have an Exchange mailbox. I created the users on Active Directory, configured their email address on AD with the address they have on their organization but the users did not get the emails sent from the site. Since the users that have an exchange mailbox receive this kind of mails without any problems I decided to create five contacts, one for each new user, on the Exchange server and add their external email address as the primary SMTP and External address. After that I changed the email address on Active Directory to the email address that the exchange added according to the email address policy it has (any internal email address may be fine too). Now when Sharepoint sends a message to the user, the message is handled by Exchange and is delivered to the external address of the user.

HTML Image Trasparency

I've been developing a new drupal site recently and I came across the following problem: The font of the logo of the site is not a web font and I didn't want to change the CSS and have the users' browsers download the font, so I created an image with the font (I know this is not what I should have done because of SEO). When I uploaded the image to the site I noticed that the background color of the header (where the image is) is set to be fading... I had set the background color on the image but there was a problem because of the effect. I thought that I may solve the problem by turning the background of the image to transparent and so I did. When I uploaded the new image on the site the result was not what I was hopping for... The transparent part of the image was converted to white. After searching the web for a while I discovered that you have to save the image file as PNG or GIF in order to use the transparency of the image file. So I fired up Photoshop aga...

Microsoft Outlook, IMAP account and Contacts

When using Microsoft Outlook with an IMAP account, because the account does not support contacts, tasks and notes those items are not stored in the PST file that belongs to the account but in an other PST file. So if you want to recover those items, after a system failure for example, you have to search your profile for any PST file and then open the right file, the one that contains your contacts and notes. Notice that you may have to select the folders view in order to see the contacts and notes folder.

File Check with MD5 Hash Using Linux

There are many times that you need to be sure that a file you downloaded from the internet or copied from a location is the same as the original. There are many tools that can help you with that but my favorite is md5sum (and md5deep when it comes to comparing directories). The usage is very simple. The command md5sum FILE will show you the hash for the file and the file name. So the only thing you have to do is get the sum of the original file, the sum of your file and compare them. If they are the same, your file is not corrupted or tampered with. Comparing the hashes your self may not be very easy but there is a way to do it using a hash file. Simply save the result of the above command to a file, like md5sum FILE > hashfile.md5 and then use the option -c to compare the hash of your file to the hash in the hashfile. I always use relative paths because that way you can export the hash of the file to a hash file that is on the same directory with the original file for exam...

Windows 2008 R2 Activation Period Extension

There have been many times that I needed to use a Windows 2008 R2 operating system in a virtual inveronment for testing and writting guides. But after the activation period ends you have to enter a valid serial in order to continue using the OS. In case that period has expired and you do not have the time to set up a new VM or your working on a production server that need to be activated you can just rearm it. To rearm you just have to run the command slmgr.vbs -rearm  on a command prompt with elevated priviedges. After that restart the server and you'le have 30 days left to activate. Be vary carefull because you can only do this three times... Below are some keys: Windows 2008 R2 Web: KBV3Q-DJ8W7-VPB64-V88KG-82C49 Windows 2008 R2 Standard: 4GGC4-9947F-FWFP3-78P6F-J9HDR Windows 2008 R2 Enterprise: 7PJBC-63K3J-62TTK-XF46D-W3WMD Windows 2008 R2 Datacenter: QX7TD-2CMJR-D7WWY-KVCYC-6D2YT