LinuxSir.cn,穿越时空的Linuxsir!

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

[Solved]Unable to login.

[复制链接]
发表于 2010-10-25 16:21:05 | 显示全部楼层 |阅读模式
I'm unable to login to my gentoo system.Any user name is invalid,including root user.
For now I have to use RescueCD on my USB stick to boot my computer and look for answers.
Bottom line is I have no chinese input method and RescueCD doesn't contain any Chinese font.So Chinese characters just look like a bunch of squares.
If you can help,please please write in English or just PinYin.Thank you very much.

Here is the thing.
After upgrading mysql,I got 'host name must not be localhost'.So I changed it to something else in /etc/hostname file.After rebooting,I was unable to login.Whether I used regular user names or root user,I got 'Incorrect Login'.So I booted into RescueCD and changed the hostname back to localhost,then rebooted.Still I can't login!Log shows ''Authentication failure".


Oct 25 15:29:11 eyesonly login[23090]: pam_unix(login:auth): authentication failure; logname=LOGIN uid=0 euid=0 tty=/dev/tty1 ruser= rhost=  user=darrenlee
Oct 25 15:29:14 eyesonly login[23090]: FAILED LOGIN (1) on '/dev/tty1' FOR 'darrenlee', Authentication failure
Oct 25 15:29:18 eyesonly login[23090]: pam_unix(login:auth): authentication failure; logname=LOGIN uid=0 euid=0 tty=/dev/tty1 ruser= rhost=  user=root
Oct 25 15:29:22 eyesonly login[23090]: FAILED LOGIN (2) on '/dev/tty1' FOR 'root', Authentication failure

The shadow file is still in /etc in one piece.What do I do to fix this problem?Please help me.
发表于 2010-10-25 16:50:25 | 显示全部楼层
mount /dev/sdxx /mnt
chroot /mnt
passwd

try it.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-10-25 17:23:11 | 显示全部楼层
Post by ziyouwaYJ;2117220
mount /dev/sdxx /mnt
chroot /mnt
passwd

try it.


Thanks.

Problem has been solved.After that,I find the problem really stupid.Because the Numlock light was on after system startup.But it's a fake on.The characters I typed with "Number keyboard" on the right of the keyboard were not numbers which were supposed to be my password.

I use number keys on the left of my keyboard to input password,then login correctly. -_-.
回复 支持 反对

使用道具 举报

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

本版积分规则

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