Monday, March 14, 2016

Diagnosing Windows File and Printer Share

When we find that the Windows File and Printer Share does not work as we desire, e.g., you may observe an error as follows,

System error 53 has occurred.

The network path was not found.

many factors can contribute to the problem, commonly,
  • Name resolution including both Domain Name Resolution (DNS) and NetBIOS Name Resolution
  • Windows Firewall
I find that it is efficient to follow the steps below to diagnose the problems, where we assume that a resource, "MYSHARE" is shared on a remote host with DNS name "MYHOST.MYDOMAIN.COM", NetBIOS name "MYHOST", and IP address ""
  1. Disable Windows Firewall on the remote host
  2. Check any of special hidden administrative shares is accessible on the client host using the remote host's IP address, e.g.,
    net use \\\Admin$

    If the resource is accessible, you will be prompted for username or password, e.g.,
    C:\>net use \\\admin$
    The password is invalid for \\\Admin$.
    Enter the user name for '':

  3. If Step 2 fails,it is likely that you have forgotten to share the resource. Follow the Microsoft's guideline to share the resource.
  4. If Step 2 succeeds, check if the remote host's NetBIOS name registered and resolved on the client host,
    C:\>nbtstat -a myhost

    Depending on the number of interfaces that the client machine has, it may take a while. Regardless, it should show that the NetBIOS Name "myhost" should be registered on the network interface via which the remote machine is accessible, e.g.,
    Ethernet 3:
    Node IpAddress: [] Scope Id: []
               NetBIOS Remote Machine Name Table
           Name               Type         Status
        MYHOST         <20>  UNIQUE      Registered
        MYHOST         <00>  UNIQUE      Registered
        WORKGROUP      <00>  GROUP       Registered
        WORKGROUP      <1e>  GROUP       Registered
        MAC Address = 66-11-22-33-44-55
    where we assume the client host's IP address is

  5. If Step 4 fails, you must set up the NetBIOS name properly on the remote host by following Microsoft's guideline. You may also refer to this article on NetBIOS naming.
  6. Then, you can now try to access the shared resource on the remote host using the resource name and the remote host's NetBIOS name. The resource should be in the form of "\\MYHOST\MYSHARE".
    net use \\MYHOST\MYSHARE

    Or, if you need to provide a different Windows credential,

  7. Now enable Windows Firewall and repeat Step 6. If Step 6 is successful, the Windows Firewall has already been configured to allow the Windows File and Printer share. If not, allow the Windows File and Printer Share in the Window Firewall, following the Windows guideline.

Thursday, March 3, 2016

Extra Fonts for LaTex using Texlive on Ubuntu

One day, when I compiled a LaTex file, I encountered the following error,

-- Verifying Times compatible math font.
** Times compatible math font not found, forcing.
** No Times compatible math font package found. newtxmath is required.

! LaTeX Error: File `newtxmath.sty' not found.

It appears that others also encountered similar. The solution is simple. It is just to install additional fonts that are Times compatible. I am using Texlive on a Ubuntu system. On Ubuntu, perhaps, other Debian-based Linux system, you can install additional fonts for LaTeX as follows,

sudo apt-get install texlive-fonts-extra

The error went away after I installed the package.

Wednesday, March 2, 2016

Yahoo Calendar on Mozilla Thunderbird with Lightning and on Android Devices

I have had plenty of difficulties to put Yahoo Calendar on Mozilla Thunderbird with Lightning and on Android Devices.

If you still want to use Yahoo! Calendar and have difficulties to put it on Mozilla Thunderbird and on Android Devices. This post may be helpful to you.

Yahoo! Calendar on Thunderbird

It appears straightforward to put Yahoo Calendar on Thunderbird. As documented in Mozilla documentation entitled "Thunderbird and Yahoo" and  Yahoo documentation entitled "Sync Yahoo Calendar with Mozilla Lightning", it appears that it is well established that Thunderbird with Lightning add-on should work with Yahoo Calendar.

However, you may notice two issues.
  • If you follow Yahoo's instruction in  "Sync Yahoo Calendar with Mozilla Lightning" to use  iCalendar as the means to access Yahoo Calendar on Thunderbird with Lightning, you only get read access, that is, you cannot create or change any events in Yahoo Calendar on Thunderbird with Lightning. Therefore, a better approach is to use Yahoo CalDAV services as instructed in "Sync Yahoo Calendar on Multiple Devices". However, the Yahoo CalDav URL is actually in the following format, 

  • If you set up Lightning to access Yahoo Calendar via its CalDAV service, you may encounter authentication problem. I encountered the authentication problem myself. Many others also encountered the same problem, for example, this and this. A few suggest that you should change your Yahoo password after you encounter the password authentication problem. I have tried it, and it worked for a while and the problem always reappeared. Finally, I realize that Thunderbird with Lightning has yet to support two-factor authentication (sometimes called two-step authentication) and have to treat Thunderbird with Lightning as an "old app" that does not support two-step authentication. 
Below is what Google says about the apps that do not support two-step authentication,

" When you sign up for 2-Step Verification, we normally send you verification codes. However, these codes do not work with some apps and devices, like Gmail on your iPhone or iPad, Thunderbird, and Outlook. Instead, you’ll need to authorize the app or device the first time you use it to sign in to your Google Account by generating and entering an App password. "

Below is what Yahoo says about the apps that do not support two-step authentication,

" Some 3rd party apps, such as iOS Mail, Android Mail, and Outlook, don't work with two-step verification, on-demand passwords (ODP) or Account Key enabled. To use these apps, you'll need to generate an app-specific password. This isn't a new password for your account. It's a one-time password to validate you're authorizing access to your account from a non-Yahoo app."
Therefore, the solution to put Yahoo Calendar on Thunderbird on Lightning is to follow the steps below,

  1. Following Yahoo's instruction, enable two-step authentication and generate an 16-character app password. Note the password. You will not be able to view it again.
  2. Following Mozilla's instruction, add Yahoo Calendar to Lightning using the 16-character app password.
I have not encounter any synchronization problem and authentication problem after I have done the above setup.

Yahoo! Calendar on Android Devices

The Google Play store has a few CalDAV clients. I use a free calendar app called SolCalendar that supports CalDAV services.

The only issue that I had was that it often encountered password authentication issue with Yahoo CalDAV service.

The solution is that you treat the SolCalendar as an old app that does not support two-step authentication and create an 16-character app password for it, following Yahoo's instruction.