System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

RHEL AS4 u5 - can't login as root

~sesh
Esteemed Contributor

RHEL AS4 u5 - can't login as root

Hi,

I have a RHEL AS4 u5 installation. The system inittab is configured with:

id:5:initdefault:

In this runlevel (5), I am able to login as root.

The problem is when I try to login as root in runlevel 3. I am not able to login or get the shell interface.

For e.g. if I change inittab as:
id:3:initdefault:

It comes up with the login prompt. When I input the user name & password (root & , the cursor just blinks on the next line & comes back to the login prompt.

Crontab file has this for the SHELL variable:
SHELL=/bin/bash

Please help!
7 REPLIES
Vitaly Karasik_1
Honored Contributor

Re: RHEL AS4 u5 - can't login as root

I suggest you:

1) start in runlevel 5
2) go to virtual console - ALT/F2
3) try to login via virtual console
4) go to your XWindow and check /var/log/messages & secure logs
Matti_Kurkela
Honored Contributor

Re: RHEL AS4 u5 - can't login as root

No error message? Not even "Access Denied" or anything generic like that?

I think I've seen similar misbehaviour at one time. If I recall correctly, it might have been related to some sort of corruption in /etc/passwd.

Please run "pwck -r" to check your password file for errors. Note that some system users, for example adm, news and ident may have a non-existent directory as their home directory. This is not harmful.

In runlevel 5, there is usually a graphic login dialog. In runlevel 3, the login is text-based. Do you mean you can log in as root using the GUI, but not using the text-based prompt? In that case, examine the PAM configuration files in /etc/pam.d, most importantly /etc/pam.d/gdm and /etc/pam.d/login. /etc/pam.d/system-auth is also likely to be important.

Check for syslog messages: examine the files in /var/log. It might be that the session starts normally, but someone has edited root's .profile script so that it causes the session to end immediately. If the command "last root" has a record of the failed login attempts, those logins have in fact been successful from the system's viewpoint; just extremely short ones.

MK
MK
Steven E. Protter
Exalted Contributor

Re: RHEL AS4 u5 - can't login as root

Shalom,

There must be something helpful in /var/log/messages.

Can you log on as another user and su - root ?

This will give you access to the logs and help diagnose the problem.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
~sesh
Esteemed Contributor

Re: RHEL AS4 u5 - can't login as root

Thanks for your replies. That's right, using GUI, I can login as root. But not from the text mode.

Vitaly - Unfortunately, it doesn't seem to be the issue with the runlevel. I've tried switching to a virtual terminal (CTRL+ALT+F2), still can't login.

Matti - This one is strange, there is no error to indicate that authentication failed.

I'll try pwck -r, su (root) & take a look at the /var/log/messages.

Further... I'm able to get a shell login if I come through telnet, ssh or Putty. I was suspecting issues with $SHELL not set correctly. Have to check them as well. Will post with updates soon. :)
Vitaly Karasik_1
Honored Contributor

Re: RHEL AS4 u5 - can't login as root

>Vitaly - Unfortunately, it doesn't seem to >be the issue with the runlevel. I've tried >switching to a virtual terminal >(CTRL+ALT+F2), still can't login.


Great! As I suggested, now you can check messages and secure logs.
Ivan Ferreira
Honored Contributor

Re: RHEL AS4 u5 - can't login as root

I saw problems like this and is related to the pam login configuration. Sometimes, "oracle" installation requires a modification in the pam configuration files that produces this behaviour.

Check your pam configuration files, /etc/pam.d/login and /etc/pam.d/system-auth.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
~sesh
Esteemed Contributor

Re: RHEL AS4 u5 - can't login as root

Closing thread.