Thursday, 19 May 2016

Turning on/off Windows firewall on remote PC

While trying to fix one of our user’s IT issue remotely, I had to turn off Windows firewall which was set to Public. Users account does not have appropriate permission to make any changes to the system or run a command prompt. When I tried to make a RDP connection, it failed due to Public firewall is enabled.

I tried below Netsh command to turn off firewall on remote PC but it didn’t work.

Netsh –r 192.168.1.15 –u admin –p Password –c advfirewall set allprofiles state off

Then, I learnt about PsExec command. PsExec is a light-weight telnet replacement that allows users to run programs executable files on remote machines. First, you will have to download PSTools. Click Here to download it.

Once you’ve downloaded PSTools, unzip the file and copy PsExec to executable path. I copied file to C:\.

Run following command to turn off filewall on remote PC using PsExec:

C:\> psexec ComputerName –u username –p password cmd

  • ComputerName  - replace it with the remote computername
  • Username – replace it with your admin user name
  • Password – enter your admin user account password
This will open a command line for that remote PC; enter this command to disable firewall:

C:\Windows\System32>Netsh advfirewall set allprofiles state off

This command will turn off all firewall profiles. If you want to turn off only current profile, replace allprofiles with currentprofile. Type “ON” instead of “OFF” if you want to turn ON firewall.

I hope you find this article informative.

Disclaimer: www.TechieTalks.co.uk does not conceal the possibility of error and shortcomings due to human or technical factors. www.TechieTalks.co.uk does not bear responsibility upon any loss or damage arising from conduct or activities related to the use of data and information contained in this blog.

Monday, 2 May 2016

Converting Ubuntu Core server to GUI - Error: E: Unable to locate package update

Today, I installed a Ubuntu server 16.04 LTS on my test lab. I installed it as a virtual machine on my Hyper-V host. When installation finished, I was presented with the server Core edition. As I am fairly new to Linux OS, I wanted to have Graphical User Interface (GUI).

I went on Internet to find a way to convert my Core server to GUI. I learnt that I need to install ubuntu-desktop package to have GUI.

sudo apt-get install ubuntu-desktop

When I ran this command, I got a following error message:

E: Unable to locate package update

After doing a bit of a research, I found out that I will have to run some more commands to upgrade current package list before trying to install desktop version. I used following command to have GUI version of Ubuntu server.

Use following command to upgrade packages installed on your PC or update your all system. When Prompted, type Y and press Enter key.

Sudo apt-get upgrade

Once you've upgraded your system, run this command to install desktop version, When Prompted, type Y and press Enter key.

Sudo apt-get install ubuntu-desktop

It will install required packages. You can use same command to install other packages. Replace ubuntu-desktop with the name of package you would like to install.

I hope you find this post informative. The more I will learn about Ubuntu server and its administration, I will share further information on it.

Disclaimer: www.TechieTalks.co.uk does not conceal the possibility of error and shortcomings due to human or technical factors. www.TechieTalks.co.uk does not bear responsibility upon any loss or damage arising from conduct or activities related to the use of data and information contained in this blog.