Solved

Can not login into RHEL

Posted on 2010-09-20
26
587 Views
Last Modified: 2012-06-21
When i log in with my root account the system just goes ahead and prompts me again for the username and password. I tried to go into single user mode and reset the root password and that still did not work. I received the same issue. I created a new user in single user mode and still had the same problem. I do not know what else to try. I have read about it might be the login scripts are corrup but i do not know how to fix that. thanks!
0
Comment
Question by:kennyhenao
  • 11
  • 9
  • 3
  • +1
26 Comments
 
LVL 8

Expert Comment

by:nognew
ID: 33717174
Hi kennyhenao!
 Are you trying to login into a text mode terminal screen or XWindow mode?
 Are you trying to login from remote or locally?
1. Check if your users home directory exists.
2. Check if your shell exists where it tries to find it.

Cheers,
t.
0
 
LVL 6

Author Comment

by:kennyhenao
ID: 33717195
I'm trying to log into text mode on the terminal screen. How do i check the rest?
0
 
LVL 8

Expert Comment

by:nognew
ID: 33717243
if you can login ina single mode:
do :
cat /etc/passwd

from the output you can identify which shell your user on and which home directory it is.
Ex:
gdm:x:112:119:Gnome Display Manager:/var/lib/gdm:/bin/false
agile:x:1000:1000:Agile,,,:/home/agile:/bin/bash

in the example above you can find a used gdm home directory: /var/lib/gdm and he has no shell, which is: /bin/false so that user can't login.
User agile home directory is /home/agile and shell is /bin/bash
That user can login.
Your aim is to identify the home dir and shell for your user and check if they exist.
You can check home dir existence by issuing ls command against home dire path.
You can check you shell works by executing shell command: /bin/bash for instance in that example.
Kind regards,
T.
0
 
LVL 87

Expert Comment

by:rindi
ID: 33717446
Were you able to get in using single user mode, or was the login unsuccessful there too?

If you did manage to login, check the free space on your partitions. Logins will often fail if you don't have enough free space. Also check whether all partitions mount properly.
0
 
LVL 6

Author Comment

by:kennyhenao
ID: 33717550
rindi how do i check free space from single user mode and that the partitions mount correctly?
0
 
LVL 6

Author Comment

by:kennyhenao
ID: 33717647
nognew

when i do a ls /bin/bash it just shows me /bin/bash in green. This is for the root user. He has bin bash and the home directory is /root.

when i type /bin/bash in the command line it just takes me back to the # prompt.
0
 
LVL 8

Expert Comment

by:nognew
ID: 33717894
That is correct, that means everything works as it suppose to.
 Can you look into your syslog and messages files in /var/log directory to see what messages are logged there on your unsuccessful login attempts?
Cheers,
t.
0
 
LVL 87

Expert Comment

by:rindi
ID: 33718040
df should show your disk-space. If all your standard directories are there and accessible, they should have mounted properly. As mentioned above, the logs should give you a better idea.
0
 
LVL 6

Author Comment

by:kennyhenao
ID: 33718084
what am i looking for in the messages log file?
0
 
LVL 8

Expert Comment

by:nognew
ID: 33718130
you should see your logging attempts and the reason they are rejecteed. Check syslog as well.
t.
0
 
LVL 6

Author Comment

by:kennyhenao
ID: 33718194
what command should be used to view the logs and be able to scroll or go page up or down?
0
 
LVL 8

Expert Comment

by:nognew
ID: 33718246
you can use "less". To scroll up/down just use arrows. To go to the bottom of the file "Shift-G", to the top "g".
If you type /<search word >ENTER you can search through the file.
To find next string just press n, to search bottom to the top press Shift-N
Cheers,
t
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 6

Author Comment

by:kennyhenao
ID: 33718310
is that using cat?
0
 
LVL 8

Expert Comment

by:nognew
ID: 33718320
no you supply the file to less command as a parameter.
Ex:
less /var/log/messages

Cheers,
t.
0
 
LVL 6

Author Comment

by:kennyhenao
ID: 33718385
i searched in messages for error or root and i did not find anything. also i tried /var/log/syslog and it says file not found.
0
 
LVL 8

Expert Comment

by:nognew
ID: 33718464
Can you see file called auth.log in your /var/log directory? If you can try to less that file.
You might not see error messages, but messages which explain why login has not succeeded. That can be pretty legitimate reason.
t.
0
 
LVL 6

Author Comment

by:kennyhenao
ID: 33718486
no such file or directory is what it says.
0
 
LVL 8

Expert Comment

by:nognew
ID: 33718495
can you execute ls -altr |tail -10 in your /var/log directory and post output here?
Cheers,
t.
0
 
LVL 6

Author Comment

by:kennyhenao
ID: 33718771
The output is.

-rw------- 1 root utmp  147526272 Sep 17 17:07 btmp
-rw------- 1 root root            68060 Sep 17 17:10 cron
-rw-rw-r-- 1 root root           19539 Sep 17 17:11 TTY_00000000.log
-rw-r--r-- 1 root root              1481 Sep 17 17:11 dsm_om_connsvc32dIO.log
-rw------- 1 root root            36292 Sep 17 17:11 secure
-rw-r--r-- 1 root root              8778 Sep 17 17:11 acpid
-rw------- 1 root root          967718 Sep 17 17:11 messages
-rw-rw-r-- 1 root utmp       656640 Sep 20 11:46 wtmp
-rw-r--r-- 1 root root            35189 Sep 20 11:46 dmesg
drwxr-xr-x 18 root root          4096 Sep 20 13:25 .
0
 
LVL 6

Expert Comment

by:mohansahu
ID: 33752509
Hi,

When root unable to login into the system think.
1.Is passwd correct?
2.Is Account expired?
3.Is Terminal blocked?

So, Do the following steps:-
-> Boot the system in single user mode.
->  Change the password.
->check the account expired date by using chage -l root command.
if account is expired , set net expire date: chage -E "NEVER" root.

1. Check the file /etc/securetty which file blocked to root login form the certain terminal.
2. If Terminal is deleted or commented write new or uncommet.
3.Reboot the system and login as root.

Cheers,
Mohan
0
 
LVL 8

Expert Comment

by:nognew
ID: 33752655
Hi there!
 can you check if you got something in /var/log/dmesg file? Though it is very unlikely.
Can you do su - <your other user> from root?
Cheers,
t.
0
 
LVL 6

Accepted Solution

by:
kennyhenao earned 0 total points
ID: 33772367
Hired someone that was a Linux expert to fix the issue. The issue was resolved there was an incorrect entry in a system file that caused the root to not log in. Thank you all for your help.
0
 
LVL 87

Expert Comment

by:rindi
ID: 33773070
If you want to accept that as the solution you should add more details, like which system file he edited and what the wrong entry was. Otherwise you should rather ask for a delete / refund.
0
 
LVL 6

Assisted Solution

by:kennyhenao
kennyhenao earned 0 total points
ID: 33814893
Fixed an issue in a .conf file that kept making the server reprompt for login. Issue was caused because of a vanilla installation of Oracle.  (Not sure of any other details from the engineer we hired to fix this)
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now