1833778 Members
2278 Online
110063 Solutions
New Discussion

Re: Login Error..

 
SOLVED
Go to solution
Smirjit Singh
Advisor

Login Error..

Today I got a strange problem. I was not being able to log in from Console. Whenever I tried I got the below error.

No utmp entry. You must execute exec login from the lowest level "sh"

But I am being able to log in by telnet.

Would anybody tell me what is main problem.
Knowledge is only most valuable things which can't buy.
7 REPLIES 7
Dan Hetzel
Honored Contributor

Re: Login Error..

Hi,

You are most probably facing a /etc/utmp file corruption, related to the /dev/console terminal.

You may clear the file with:
cp /dev/null /etc/utmp

The side effect on a running system is that, after zeroing the file, any 'w' or 'who' command will not show users that were logged in at the time of file reset.

Best regards,

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Smirjit Singh
Advisor

Re: Login Error..

Dear Dan,

First I thought also same. I also did the same thing. But still that problem persist.

Sandip
Knowledge is only most valuable things which can't buy.
Dan Hetzel
Honored Contributor

Re: Login Error..

Hi Sandip,

Did you do the same with /etc/utmpx? This one is being used in replacement of /etc/utmp which is, dixit manpage, depreciated.

See 'man 4 utmpx'

Best regards,

Dan

PS: The same side effect will apply. :-(
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Smirjit Singh
Advisor

Re: Login Error..

Dear Dan,

yes I have done the same thing with all utmp,utmpx,wtmp . But still the same problem persist.
Knowledge is only most valuable things which can't buy.
Dan Hetzel
Honored Contributor
Solution

Re: Login Error..

Hi Sandip,

Document KBRC00000660 suggests the following actions:

1. Remove the utmp file:
rm /etc/utmp

2. Edit the inittab:
vi /etc/inittab

3. Modify the line:
cons::respawn to cons::off

4. Reread the inittab:
init q

5. Check to ensure that utmp is back:
ll /etc/utmp

6. Edit the inittab again:
vi /etc/inittab

7. Change the line:
cons::off to cons::respawn

8. Once again reread the inittab:
init q

9. Try to login from console


Best regards,

Dan

Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Smirjit Singh
Advisor

Re: Login Error..

Dear Dan,

Thanks a ton.. It really worked very fine. Thanks again. How I can get that Document. I had tried to search that doc but I did not get.

Regards

Sandip
Knowledge is only most valuable things which can't buy.
Dan Hetzel
Honored Contributor

Re: Login Error..

Hi Sandip,

Glad it helped.
To get any document, click on 'maintenance and support' on the left panel, then 'technical knowledge base'.
Select 'Search by Doc. ID' in the popup menu and type the document reference in the text area.

All the best

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com