When a user/root try to login to Linux system there are so many problems which will prevent the root/user not to login.
Here we will see what are the problems which will prevent user from not to login to system and try to resolve them one by one.
We can divide these problems in to two categories:
- Physically present at system.
- Accessing system from remote location(through network).
Logging in to the system when you are present infront of the system.
Issue1:Check weather the password you are typing is correct or not, what I mean is Case sensitive etc,
here I am considering that you forgot the password for that system, In this case follow these steps
Issue2:Still not able to login to system except runlevel1, so how to resolve this issue?
- Check root user properties such as shell type, age and security etc?
Step1 : Check the root properties by using finger command.
Login: root Name: root
Directory: /root Shell: /sbin/nologin
Never logged in.
this command will give you the properties of the root user, here we have to check what is the shell he is using, the shell should not be nologin shell. If the shell for the root user is no login shell he will not able to login to system so we have to change the login shell from /sbin/nologin shell to some other shells such as /bin/bash.
To do this we can use chsh command
This command will display all the shell’s installed in your system, to change the shell.
then execute finger command to check weather shell has been changed to our required shell or not
Step2 : Still not able to login? try if there is any age related issues is there on root user
#chage -l root
It will display the age related info for the root user.
Please increase the age of the root user expiry time
Step3 : Still unable to login? Check for security related restriction on root user
Check in /etc/securetty file wether all the entries are there or not(in this file there will be entirs of the terminals from where root user can access the system) check weather tty1 to tty7 and vc1 to vc7 are there or not if they are not there add them and try to login.