Friday 7 December 2012

Accessing Windows file shares from Ubuntu

I've been using Ubuntu on my home laptop for about a month now with the intention of giving it a good run as my main OS before deciding whether or not I should continue on with my previous Windows XP installation.

One of the problems I've been having is with accessing Windows file shares. It's been kind of on and off for a while whether I would be able to access files on my home server or not. I've setup my fstab configuration file to connect on startup, my Samba configuration for the correct Windows workgroup and tried various other tips and tricks. But all to no avail.

However I think I've finally fixed the problem! Many thanks to the author of the blog Boinst for this tip. The solution that worked for me was a registry edit on my Windows box. I needed to change two registry keys to setup this fix:

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache

Change this key to '1'.

HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size

Change this key to '3'.

The first key tells Windows to enable enough cache memory for large file sharing and the second key tells Windows to prioritise file sharing over memory saving.

So far this has sorted my file sharing problem with Ubuntu. Hope this helps others.

Monday 19 November 2012

Take ownership and change permissions from the Windows 7 command line

I discovered a unique 'feature' of Windows 7 offline files today; It turns out that when offline files are created they are stripped of ownership and all permissions.

This little gem of knowledge I discovered when I had a client who made edits to an offline file, during which time the offline file service was stopped in the domain the computer was part of. When the laptop was returned to the domain the offline files and syncronisation were disabled, rendering all changes lost. Or were they?

I tracked down the offline files, hidden away in %systemroot%\CSC, and copied them all to a safe location on the desktop so that they could be opened and saved to the network again. However, this is when I made my discovery! I was unable to open any of the folders or files as the user account or the administrator account. I was also unable to request permission or change permissions.

After some scrutiny I discovered that I was able to retake ownership of files and begin my trek through the maze of folders and files in a very large offline files collection. Unfortunately by using explorer I had to take control and give myself permission to open every folder in the directory tree individually. This was going to be a long process and a major headache. So I went hunting in Googleland.

During my searches I found a wonderful command line tool built into Windows 7 for taking ownership and granting permissions on a whole directory. The first command allows the logged on user to take ownership of all the files and folders:

takeown /f directory_name /r /d y

The second command allows you to grant full permissions to any user account to all of the files and folders in the directory:

icacls directory_name /grant administrators:F /t

These commands were life savers for me and I give credit to eset_boy on
The Windows Club Forum for his wonderful advice.

Thursday 14 June 2012

Recover iPad from failed OS update (error 1604)

Recently I've been setting up a set of iPads for a client and Apple released the latest update to their iOS. So as part of the setup I installed the update to each iPad. Unfortunately three of them failed and refused to start afterwards. When I connected them to the laptop with iTunes on it, a message popped up informing me that there were several iPads in a recovery state that needed to be restored from a backup (error 1604). I attempted this several times and each time it failed.

After some time spent on Google hunting around for a solution, I finally found an answer to my problem. It turns out that iPads have two recovery modes; standard recovery mode and DFU (Device Firmware Upgrade) mode. In DFU mode the iPad doesn't load any operating system or boot loader when it connects to iTunes. This enables you to restore a working version of iOS to the iPad and then complete a restore through iTunes.

In order to get your iPad into DFU mode you need to follow the steps below:


  1. Load iTunes on your laptop/PC/Mac
  2. Connect your iPad via the USB connector
  3. Press and hold the power button and home button on your iPad for 10 seconds. It must be 10 seconds precisely or this will not work.
  4. After 10 seconds release the power button but continue to hold down the home button for a further 5 seconds.
If done correctly your iPad screen should remain blank and iTunes will report a device in recovery mode. Under Windows you will also get a notification that the DFU recovery driver has been installed for your device. You can then complete a restore of the device and settings through iTunes. If your iPad screen does not remain blank then you haven't done it properly and need to try again. It's fiddly but it does work once you get the knack of it.

Thursday 23 February 2012

Windows Vista/7 unable to connect to wireless network after the connection goes down

My other half's laptop has for some time had a problem with our home wireless network. When booted up it connects happily to the network and everything works fine. But if the wireless network goes down (which it has frequently because of some issues with our wireless router) or if her laptop is left to go to sleep or standby mode, the wireless will not reconnect. The only thing that will fix it is a reboot.


I figured that there must be a solution to this problem. My Windows XP laptop quite happily drops and reconnects the wireless connection without any issues. So I turned to my friend Google for help... And the first link I see holds the answer to my question:


Apparently the problem is caused by a missing registry entry in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters. It should contain a DWORD (32-bit) value called ArpRetryCount and the value should be set to '0'. Apparently this has been proven to fix this problem under Vista and Windows 7.

Many thanks go to kileyferguson on www.techsupportforum.com for this answer.

Monday 20 February 2012

Worst Phishing Email... Ever!!

I received this email from a concerned client today and I just can't believe how blatantly obvious this is as a fake. They didn't bother to disguise their email address, they sent an warning about deleting an inactive account to an active account (I know this particular client uses their hotmail address daily) and worst of all they ask you to reply to the email with your username, password and year of birth!!! Are phishers really getting this lazy!? :)

Here's the content of the email:

From: phanptv49@hotmail.com
To: phanptv49@hotmail.com
Subject: Service Alert
Date: Sun, 19 Feb 2012 10:21:11 +0700

undefined

Dear Account User,

This email is from Windows Live Customer Care®. We are sending it to all account owners for account upgrade. We are experiencing network congestion due to anonymous registration of email accounts. To prevent this, we are shutting down inactive accounts and your account is scheduled to be deactivated. 

We sent this email to you so that you can verify and let us know if your account is still valid. Click on the reply button and fill in your information:

User Name:.......................................................

Password:..........................................................

Year of Birth:
......................................................
Country Or Territory:.........................................

After following the instructions in the sheet, your account will not be interrupted and will continue as normal. Thanks for your attention to this request. We apologize for any inconveniences.

Warning! Account owners who refuse to update their accounts after 24 Hours of receiving this warning will lose their accounts permanently.
Sincerely,
The Windows Live Team
Microsoft Corporation. Microsoft respects your privacy. Please read our online privacy statement. Microsoft Corporation, One Microsoft way, Redmond, WA 98052, USA ©

Tuesday 7 February 2012

Unable to edit netlogon in Windows Server 2008

I needed to make a change to a login script that was stored in the netlogon folder on a Windows Server 2008. However I discovered that I couldn't save any changes when logged on as an administrator accessing the share or even when I followed the correct path to the netlogon folder.

After many failed attempts to resolve this problem, I decided to have a search on Google. I eventually came across this thread on the petri.co.il forums.The solution was amazingly simple yet crazy that it was needed. In order to be able to edit files in netlogon you need to navigate to the correct path for netlogon, go up one level to the 'scripts' folder and modify the permissions for this folder. Make sure that the administrator account has the correct permissions for editing the contents of the folder.

Simple. Yet why Microsoft should feel that by default no one (including the administrator) can modify the contents of this folder is beyond me.