1834048 Members
2289 Online
110063 Solutions
New Discussion

Re: utmp problrm

 
SOLVED
Go to solution
dhanish
Regular Advisor

utmp problrm

hi,
by mistake i have done >utmp on /etc/utmp.So when i try to login it says no utmp entry .try tom login from the lowest level shell.Pls let me know the solution for this.
Never Say Die
9 REPLIES 9
neylan tokerler
Occasional Advisor

Re: utmp problrm

hi,
try cp /usr/newconfig/etc/inittab /etc/inittab
this may not solve, probably to clear up, you will have to reboot.
hope you can reboot, if not, please inform.
dhanish
Regular Advisor

Re: utmp problrm

Hi,
I did not get your answer .What benefit i will get by copying the inittab file.Plus I cannot reboot the system now.pls suggest me other option.
Never Say Die
Robin Wakefield
Honored Contributor
Solution

Re: utmp problrm

try logging in with:

remsh {hostname} "/usr/bin/ksh -i"

Pls let me know what happens

Robin.
federico_3
Honored Contributor

Re: utmp problrm

dhanish
Regular Advisor

Re: utmp problrm

Yeah i am able to login but new users are not able to login using normal telnet.
Never Say Die
Herve BRANGIER
Respected Contributor

Re: utmp problrm

Hi

Are you sure your problem come from your error ?
utmp file is use to contain "logged users onto
the system" (see man page of utmp) so if utmp
is empty you can logon without problem. I try
with a readonly /etc/utmp : you can login but
who commands can't works...
Are you sure your login scripts don't use
information or commands using /etc/utmp ?
Another way is to stop and restart logging
utilities : cd /usr/sbin/acct ; ./shutacct; ./startup
but I think it's not really the matter.

HTH

Herv?

dhanish
Regular Advisor

Re: utmp problrm

Thanks Robin My problm is solved .But if you can tell me what ur cmmnd of remsh hostnaame "/usr/bin/ksh -i " did.I will be grateful to u.
Never Say Die
Robin Wakefield
Honored Contributor

Re: utmp problrm

Herve - i think the problem was that /etc/utmp contained the string "utmp", rather than being empty - this certainly gave me the error when I tested.

/usr/bin/ksh -i gives you a shell that ignores a lot of signals, enabling you to login under certain error conditions. It's way down the bottom of "man ksh"

Robin
Herve BRANGIER
Respected Contributor

Re: utmp problrm

Robin

Ok it seems to be the problem : when utmp is
"unreadable" (if utmp is not structured like
utmp.h specifications) you can't insert any
entries. Shells refused to start in this case.

I didn't know this option for ksh.... Thx

I think that to resolve the problem it's
possible to delete /etc/utmp and create a new
empty one. But the problem is that without a
reboot it's impossible to know who is logged
on the system (who doesn't work for example).
Don't if it's important but I think it's better
to restart the system as soon as possible.

Herv?