LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1694|回复: 3

telnet一台SUN机时报下面的错误:No utmpx entry. You must exec "login&

[复制链接]
发表于 2006-9-13 10:59:57 | 显示全部楼层 |阅读模式
telnet一台SUN机时报下面的错误:No utmpx entry. You must exec "login" from the lowest level "sh  怎么解决?
 楼主| 发表于 2006-9-13 11:01:24 | 显示全部楼层
转贴:http://www.chinaunix.net 作者:songyupo  
我做了下面的处理后:  
cd /var/adm  
mv utmpx utmpxbak  
touch utmpx  

telnet 恢复了正常,可在该机器的终端下执行login 命令时,又报了上面相同的错误。而且重新启动机器以后,telnet时还是报相同的错误!
A:进入单用户模式,清空(不是删除)这两个文件  
# cat /dev/null >; /var/adm/wtmpx  
# cat /dev/null >; /var/adm/utmpx  

之后,重新启动系统
找了很多国外的论坛,都是这么说的:  

The problem comes if utmp or wtmp file becomes corrupted . You need to initialize these and reboot the system to correct the error.  

These files are log files and can be initialized without affecting the system, as long as you reboot the system after truncating the files. Perform these steps:  

1. Bring the system into System Maintenance mode.  

2. Make copies of the files /etc/utmp, /etc/utmpx, /etc/wtmp, and  
/etc/wtmpx before proceeding with the next step.  

3. Delete the contents of these files by executing the following  
commands:  

# >; /etc/utmp  
# >; /etc/wtmp  
# >; /etc/utmpx  
# >; /etc/wtmpx  

4. Shutdown the system:  
# shutdown -y -g0  
Restart the system
回复 支持 反对

使用道具 举报

发表于 2006-9-13 13:26:30 | 显示全部楼层
不知道,但是帮你顶一下。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-9-13 18:12:08 | 显示全部楼层
已经解决了,就是用我第二贴文章。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表