default username can't see only can login as guest

Asked by kai zhu

Today I did a stupid thing. I used "sudo gedit /etc/passwd" changed "x:1000:1000:kai:/home/linuxidc:/bin/bash' this from 1000 to 0.
then after I restart only can login as a guest. No default username in the list.
Please help get the default username back。

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

I assume that you can use a modified version of the procedure http://www.psychocats.net/ubuntu/resetpassword to undo your change.
Boot in recovery - root command prompt mode, remount the root disk, and modify /etc/passwd to undo your previous change.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

Why did you make the change anyway?

Can you help with this problem?

Provide an answer of your own, or ask kai zhu for more information if necessary.

To post a message you must log in.