Thursday, November 29, 2018

How to Enable SSH root login on Ubuntu Server


  • Change your root user password :-
        ==> sudo passwd root

  • Open the sshd_config file :-
        ==> sudo nano /etc/ssh/sshd_config

  • Find the following line in sshd_config :-
        ==> PermitRootLogin prohibit-password
  • Change the following line :-
        ==> PermitRootLogin yes

  • Then restart the ssh service :-
        ==> sudo /etc/init.d/ssh restart

How to change Ubuntu from DHCP to Static IP Address


  • Open the /etc/network/interfaces file :-
        ==> sudo nano /etc/network/interfaces

  • You can see the following lines in interfaces file :-
        ==> auto eth0
                iface eth0 inet dhcp

  • Change the following lines :-
        ==> auto eth0
                iface eth0 inet static
                address 192.168.1.11
                netmask 255.255.255.0
                network 192.168.1.0
                broadcast 192.168.1.255
                gateway 192.168.1.1
                dns-nameservers 8.8.8.8

  • Then reboot the server.

        

Friday, April 8, 2016

Install Google Cloud Print in Ubuntu Linux

  • sudo add-apt-repository ppa:simon-cadman/niftyrepo
  • sudo apt-get update
  • sudo apt-get install cupscloudprint
  • sudo /usr/share/cloudprint-cups/setupcloudprint.py
  • After it asks for Google Credentials ( it will only do this is the first time you have used CUPS CloudPrint, or your credentials are invalid ) it will then ask if you wish to add all printers from your Google Account.
  • To make it work with Google's 2 Step Verification system, you must create a "Device Specific" password, to do this go to:Google.com>Log in with your account>Click on your user name>Security>Edit authorizing applications>Enter your account pasword>set the password.
  • If you say ‘Y’ here, it will add all printers that are currently not added to your CUPS install.
  • If you would prefer to add the printers manually, say ‘N’ here, and add a printer manually:
  • Add a new printer ( via http://127.0.0.1:631 or usual interface ) as a ‘Google Cloud Print’ network printer. Select the ‘Make’ as Google, and ‘Model’ as Cloud Print.

Monday, November 9, 2015

Atheros QCA9565 Wireless Driver Installation in Ubuntu 12.04


  • Open Terminal and run following commands
  • sudo apt-get install linux-headers-generic build-essential
  • wget http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.6/compat-wireless-3.6.6-1-snpc.tar.bz2
  • tar xvf compat*
  • cd compat-wireless-3.6.6-1-snpc
  • sudo su
  • ./scripts/driver-select ath9k
  • make
  • make install
  • modprobe ath9k
  • exit

Monday, October 12, 2015

Local Print on SAPGUI for java (Linux – MacOSX): Sap output device configuration

I have some clients starting migrating to MacOSX for daily office use, and they need the Sapgui, and off course they want to print on their local printers. I had them installed the latest Sapgui for java (rel. 7.20 at this time) but they couldn’t print on local printers with the classic LOCL/LPT1 sap device (They still could print on sap server connected printers, host spooler access method “C”).
In order to print on local printers on Sapgui for java we have to:
  • add “G” to the Host Spooler Access Methods Sap list, using Report RSPO0075 (if you don’t find this report follow the Sap Note 821519 Instructions);
  • create a new output device in Transaction SPAD with device type POST2 and access method “G”, as shown on the following images.


Monday, January 12, 2015

How to install a loopback adapter in Ubuntu

  •  Loopback tap installation in Ubuntu:-
    •  sudo apt-get install uml-utilities
    • sudo modprobe tun
    • sudo tunctl
    • sudo ifconfig tap0 192.168.10.10 netmask 255.255.255.0
    • sudo ifconfig
  •  If you want to install second loopback:- 
    • sudo tunctl 
    •  sudo ifconfig tap1 192.168.11.10 netmask 255.255.255.0

Tuesday, December 30, 2014

Reinstall / Recover GRUB from Ubuntu live CD / USB

This is the common problem which is faced, when you try for dual boot. Easily Recover / Re-Install Grub in Ubuntu using Boot-Repair from live cd / usb. Boot Repair is the simple graphical tool used to repair, restore or reinstall the grub bootloader on Ubuntu. Now this tools has been updated with some new features in advanced option, using boot- repair you can also restore the MBR on Windows.


On dual boot once you update your Ubuntu OS, Windows / Fedora will not be listed on your grub. After installing Windows / Fedora your Ubuntu will not boot anymore and its grub may be wiped out. To restore it follow the steps below

To Reinstall Grub

You need to have Ubuntu Live CD or Live USB. Normal session can be used to repair the grub. Boot using your Ubuntu Live CD or Live USB, while booting choose Try Ubuntu.


Once booted then open a terminal, and run the following command one by one to install the boot repair.

To add boot-repair to the repository
sudo add-apt-repository ppa:yannubuntu/boot-repair

To Update your repository
sudo apt-get update

To install boot-repair
sudo apt-get install -y boot-repair

Once Installation complete run boot-repair on terminal by typing the following command or select it by System->Aministration->Boot Repair.

boot-repair

NOTE: Update the Boot Repair if its newer version is available.

It will scan the System for few seconds and will show you the options Recommended repair and Create a BootInfo summary. By clicking the Recommended Repair it will start repair the grub. Check the screen shots below.





Once done click ok and restart your system, your grub should work now. If not run the boot-repair again using live cd / usb. Then follow the steps below.
Select the Advanced options, In Main options tab check whether the following options are selected or not. If not select it, the options are Reinstall Grub and unhide boot menu for 10 seconds. Check the screen shot below


Then select the GRUB locations tab and check the following options are selected or not. The options are OS to boot by default and place grub into, In “OS to boot by default” option choose the OS which you want to be default on boot. Then select the drive where you need to reinstall the grub in “place grub into” option and click apply. Check the screen shots below






Click ok and restart your System.

Hope this will be helpful for you!!!


To Restore MBR

Run boot-repair on terminal by typing the following command or select it by System->Aministration->Boot Repair.

boot-repair

It will scan the System for few seconds and will pop-up a small window. Select Advanced options and in Main options tab select Restore MBR. Check the screen shot below.




Then select the MBR options tab, check the drive for MBR and Windows OS. By default all the options are selected correctly if not select the drive where your MBR is to be and the correct OS. Click apply now, check the screen shots below.






Once done click ok and restart your system and it should work. Then after logging in into your windows, go to Disk Management in Computer Management then select the Storage. Now you will see the list of all available partitions, there you select the linux partitions and delete it. Make a new partition from the deleted one and format it with ntfs. Thats it your done.

Hope this will be helpful for you!!!