need new login and password for linux

Asked by Shawn McKinney

Have Linux installed, but no one can remember the login, and/or password. How do I continue to get into the system?

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
actionparsnip (andrew-woodhead666) said :
#1

Reboot the system and hold shift, you can then select recovery mode, the scroll down off the options and select root. You can now run:

cd /home; ls

you will see the usernames. You can then run:

passwd foo

replace foo with the username you want to logon as.

E.g.

passwd andy

you can now run:

reboot

and login as foo.

Revision history for this message
Eshwar Andhavarapu (eshwar.andhavarapu) said :
#2

if you can access the drive from another computer, then see what folders are under /home. so that'll give you idea of the username and prob password.

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#3

I don't remember user and password what i can do

You can do this: http://www.psychocats.net/ubuntu/resetpassword

or

To discover your user and restore (change) the password you can:

Start the pc the when you see the GRUB row...

Press ESC.

Press "e" for edit.

Highlight the line that begins kernel ………, and press "e"

Go to the very end of the line, add rw init=/bin/bash

press enter, then press "b" to boot your system.

Your system will boot up to a passwordless root shell.

Type in grep -i 1000 /etc/passwd

The system must show a row with your user name at the start of the row
for example:
danilo:x:1000:1000:ubuntu,,,:/home/danilo:/bin/bash

Here my user is danilo

Then to change your user password type in:

passwd username

or

passwd -d username

change username with your real user

Set your password.

Type in:

reboot

or

reboot -f

Hope this helps

Revision history for this message
Shawn McKinney (mtrnews) said :
#4

Thanks for all the help. Tried keeping the 'shift' key down, but that didn't do anything. Will probably try accessing through one of my other computers, and see if that works, and will try the third message since the system is a Red Hat, and I've seen the GRUB row, and I know what that is all about. Haven't a clue on how holding down the 'shift' key didn't work.

Thanks again for all the help so far.

Cheers,
Shawn

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

If you use grub and not grub2 you need to press ESC when grub starts to load.

Can you help with this problem?

Provide an answer of your own, or ask Shawn McKinney for more information if necessary.

To post a message you must log in.