• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 596
  • Last Modified:

Can not login into RHEL

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
kennyhenao
Asked:
kennyhenao
  • 11
  • 9
  • 3
  • +1
2 Solutions
 
nognewCommented:
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
 
kennyhenaoAuthor Commented:
I'm trying to log into text mode on the terminal screen. How do i check the rest?
0
 
nognewCommented:
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
rindiCommented:
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
 
kennyhenaoAuthor Commented:
rindi how do i check free space from single user mode and that the partitions mount correctly?
0
 
kennyhenaoAuthor Commented:
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
 
nognewCommented:
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
 
rindiCommented:
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
 
kennyhenaoAuthor Commented:
what am i looking for in the messages log file?
0
 
nognewCommented:
you should see your logging attempts and the reason they are rejecteed. Check syslog as well.
t.
0
 
kennyhenaoAuthor Commented:
what command should be used to view the logs and be able to scroll or go page up or down?
0
 
nognewCommented:
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
 
kennyhenaoAuthor Commented:
is that using cat?
0
 
nognewCommented:
no you supply the file to less command as a parameter.
Ex:
less /var/log/messages

Cheers,
t.
0
 
kennyhenaoAuthor Commented:
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
 
nognewCommented:
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
 
kennyhenaoAuthor Commented:
no such file or directory is what it says.
0
 
nognewCommented:
can you execute ls -altr |tail -10 in your /var/log directory and post output here?
Cheers,
t.
0
 
kennyhenaoAuthor Commented:
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
 
mohansahuCommented:
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
 
nognewCommented:
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
 
kennyhenaoAuthor Commented:
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
 
rindiCommented:
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
 
kennyhenaoAuthor Commented:
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 11
  • 9
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now