Allow RDP for a User Account on Windows Server

Recently, I was unable to RDP on a Win 2012 R2 machine. I could directly log in to the machine, but the same credentials were failing for Remote Desktop Connection. The following error was thrown:

To sign in remotely, you need the right to sign in through Remote Desktop Services. By default, members of the Administrators group have this right. If the group you're in doesn't have this 
right, or if the right has been removed from the Administrators group, you need to be granted this right manually.

Error Message

First thing, I added the user to the Remote Desktop Users group.

Remote Desktop Users

Still, same error. 😐

Solution

Following are the steps to fix this issue:-

  • Run gpedit.msc.
  • Go to Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> User Rights Assignment -> Allow log on through Remote Desktop Services (on the right pane).
    Step to Fix-1
  • Add the group, Remote Desktop Users to it. Remember, I had already added my user to this group. Now I am only specifying that apart from the Administrators, users of this group are also allowed to connect remotely.
    Step to Fix-2Fixed
  • Done. I could now remote log-in using this new user account. 🙂
Advertisements

Unpublish a blog on Blogger

This is actually pretty straightforward. By default, when we create a post in Blogger, it gets automatically saved as draft. But what if we want to save a live post as draft again i.e., to remove the post from the internet without actually deleting it.

Like I said, it’s pretty simple. Just hit the button, “Revert to draft“, when your corresponding blog is in the Edit mode, and your post will be converted to draft again. Any attempt to view it will result in 404! Ofcourse, you can still edit it in your blogger.

My personal preference here will be to have some sort of versioning system. It would allow us a lot more flexibility in terms of maintainance and at no point, we will be forced to unpublish a live blog.

Restart Stuck Windows Update

Once in a while I usually face this issue when my windows update will remain stuck at 0%.

When it’s clearly obvious that something is wrong, it’s good to force a re-start of the update. Below are the steps to do the same:

* Open command prompt with highest privilege.

* Type the following commands sequentially and do ensure that they get executed successfully.

net stop wuauserv
net stop bits
net stop  cryptsvc

These commands will stop the Windows Update, Background Intelligent Transfer Service, & Cryptographic Services.

* Rename the associated folders.

ren %systemroot%\SoftwareDistribution SoftwareDistribution.old
ren %systemroot%\System32\Catroot2 Catroot2.old

* Start all the three services that were stopped earlier.

net start wuauserv
net start bits
net start  cryptsvc

* Finally, go to windows update and manually hit, ‘Check for updates’. You will be prompted for a fresh download, which when started, will run to completion.

Key Takeaways

  • Windows, by default, will resume the updates on machine start. So this should be tried when you’re absolutely certain that, Something indeed went wrong!
  • This process will invoke a fresh download. So if a large update gets stuck in the middle, it will start the update all over again.
  • If everything went well, don’t forget to delete the folders, SoftwareDistribution.old and Catroot2.old to reclaim the disk space.

Extend VmWare Disk Space

Allotting more disk-space to a Windows OS running inside a VmWare is a two-step process.

  • First you need to extend the disk space from the VmWare setting. This will allocate more space to the OS. However, it still will be Unallocated memory.
  • Second, from within the OS, whose space is to be increased, you have to extend again this unallocated memory.

Following is the step-by-step illustrations of the same:

* Open the Settings of the OS whose space is to be increased. Select Hard Disk, navigate to ‘Expand disk capacity’ and hit Expand.

* Enter your preferred value and click Expand.

Part 1 is done. The size has been increased from the VmWare settings. The increased size though, is available to the OS but, as an umallocated memory. So this has to be inherited from within the OS.

* Run the OS (ensure that the virtual machine is not running on snapshots, as this prevents the VMDK from being extended). Go to Administration Tools > Computer Management and select Disk Management. As you can also see in the following image, highlighted in green is the unallocated space and in red is the allocated space which remains the same despite the expansion from the settings.

* Rt-click the drive where you would assign this unallocated memory. In this case, it’s C:, and select Expand. Following wizard will open.

* Hit Next. Since I have only one drive, I want to allocate all the unused memory to this drive. I am simply selecting Next and then Finish. If you want to distribute this space to multiple drives instead of allocating it all to a single drive, specify the number you want for the current drive.

* As you can see in the following snapshot, total space has finally shot up from 40GB to 80GB and there’s no unallocated space.

Reference

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1004071

Include Images from Google Drive to External Sites [Blogger]

I can directly add any external image to Blogger (Google) using its “insert image” option, either by uploading it or by providing an url. Similarly, I should also be able to share my Drive (Google) images to the external sites, including the blogger. Turns out there’s no one-click solution to it.

Google does provide a shared-link of the item. However, it cannot be directly used inside an image tag. In order to properly incorporate the image in an external site (& Blogger), some custom modification needs to be applied to the url. Following are the steps to achieve the same:

* Assuming the image is already residing on the Drive, right-click the file and select Share.

* Click Advanced

* Click the Change option for “Who has access”

* Select, Anyone with the link then, Save and Done.

* “Get Link” of the shared file.

* It will look something like this:

https://drive.google.com/open?id=0Bxf6OgYtsdUgRkgzMDB2RW9seGM

Unfortunately, you cannot directly use this url. Copy the id value from the above url and place it in the following format:

http://drive.google.com/uc?export=view&id={id}

So in this case, the url will be,

http://drive.google.com/uc?export=view&id=0Bxf6OgYtsdUgRkgzMDB2RW9seGM

That’s it. Use this new url anywhere i.e., in any external site and the image will get rendered directly from the Drive.

I strongly believe that Google should provide a get-Html kind of option where the above link should get generated automatically along with the IMG tag. As of now, it still remains an unfulfilled wish!

Android adb not found on 64 bit Ubuntu

When I tried to build my first project on a 64 bit Ubuntu using the latest Android Studio, I encountered the following error:

Cannot run program “/home/piyush/Android/SDK/platform-tools/adb”: error=2, No such file or directory.

Following are the two screen-shots of the same error,

The reason for this error is that on Linux, we need to install the IA32 library. This is because of the fact that Linux 64-bit ADT bundle comes with a 32 Bit adb under adt-bundle-linux/sdk/platform-tools/adb…

To do this, simply run the following in the terminal, and we’re all good.

sudo apt-get install lib32ncurses5 lib32stdc++6

Unable to locate adb within SDK

Recently, after installing the new Android Studio on my Ubuntu machine, I encountered this error.

This error simply states that we need to first install the Android SDK Platform-tools before we can build any project using the Studio. Now, why it wasn’t bundled together with the studio itself is still a mystery to me! Anyways, to explicitly download and install the platform tool, follow the below mentioned steps:-

* Open the Android Studio.

* Go to, Tools => Android => SDK Manager.

* There navigate to Android SDK from the left panel and select the SDK Tools tab. Under this tab, find the option, Android SDK Platform-tools. This option will not be selected by default.

* Check the corresponding checkBox and hit the Apply button.

* The component will be downloaded and installed automatically.

That’s it!!!