telnet一台SUN服務器時報錯誤
Q:現在遇到這樣一個問題,telnet一台SUN機時報下麵的錯誤:
No utmpx entry. You must exec "login" from the lowest level "shell".
我做了下麵的處理後:
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





閩公網安備 35020302001891號