How to resolve Infinite Login Loop in Ubuntu?

How to resolve Infinite Login Loop in Ubuntu?

What is a Infinite Login Loop Error?

Trying to login in your account from login panel of Ubuntu, you are again redirected to the same login interface after you enter your password. Again after you enter your password, same screen will be displayed again and again infinitely. We call this error as Infinite Login Loop Error.

There are few possible reasons for causing this Infinite Login Loop. They are:

  • Possible damage of some packages.
    Infinite Login Loop can occur if the last operation you performed in your system was updating various packages, but they got interrupted while downloading. There are some steps which can fix the infinite login loop.
    • Go to runlevel 1: Ctl Alt F1
    • login with user-name and password.
    • Run updates "sudo apt-get update"
    • Check all applications "sudo apt-get upgrade"
    • Check all packages "sudo apt-get -f install"
    • Update grub "sudo update-grub"
    • Remove all old applications and packages "sudo apt-get autoremove"
    • Reboot "sudo reboot" 

  • .Xauthority file chown (change owner) error.
    Sometimes if there are different users in your system and your system assigns the .Xauthority file to root users ( By default the permission is allowed to root only ) then  the users except root may face this Infinite Login Loop Error. .Xauthority file saves cookies and information realted to the login session and various applications after the user is logged in. So now in order to get rid of this error you need to change the owner of the system to your username.
    1. At the login screen enter runlevel 3 by pressing CTRL+ALT+F3
    2.  type ls -lah to look for the .Xauthority file and its privileges.
      You will see thir kind of ourput in the list:
      -rw------- 1 root root 53 Nov 29 10:19 .Xauthority
    3. then type sudo chown 'username':'username' .Xauthority, replacing the username with your username. Now you are able to access the .Xauthority file and all your login information after you login to your system will be stored in this file.
    4. Then reboot your system.
      sudo reboot

Troubleshoot Network Manager, Apache, Wireless...

Today's Blog is all about networking stuffs and I will be covering following points:
  1. Know your Network Controller Device with lspci
  2. Display all interfaces which are currently available, even if down with ifconfig
  3. Enable the service networking 
  4. Enable Apache server
  5. Then Enable Network Manager with network-manager
  6. Then  Enable your WiFi with nmcli nm

AND REMEMBER ALL THESE THINGS WILL BE DONE WITH OUR TERMINAL THIS IS WHY LINUX IS SO COOL...


Then we are all set to run the internet.And now we are some basic troubleshooter about networking, though networking is a huge this would be the first step. Not actually first first step in networking is always theory The Basics of Networking, but we are not dealing with it today. So lets begin

1. In order to know  the hardware devices assembled in your laptop open your TERMINAL CTRL+ALT+T and then type lspci .
This displays all the hardware devices  like PCI BRIDGE, SATA controller, SMBus, USB Controller, Audio Device assembled in your laptop / computer. 



My Network controller is:
02:00.0 Network controller: Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter (rev 01)

2. So now we need to know the interfaces that are available in our UBUNTU.  To see this type ifconfig in the terminal and you will see the output like this :

3. To access the internet first your hardware device should be activated, In order to do so type 
sudo service networking  and press tab twice which displays  arguments like:
 force-reload       reload        restart       start         stop
Perform any you need.

4.  To enable apache server in terminal type:

      sudo service apache2 start

5.  Now enable the network manager. In order to do so in terminal type:
    
     sudo service network-manager start 

6. Now First view the available connecting points Wireless point or Ethernet. To view the available wifi points in terminal type
    
     sudo nmcli con list



This displays the available devices With its UID and SSID.
Now to enable the wifi in terminal type:

      Sudo nmcli con up SSID or the UID

You can manipulate these basic networking commands and  triubleshoot on your own.