Linux.com

Home Linux Community Forums New to Linux Getting Started with Linux Password reset for Ubuntu 10.10 RAID5 server

Password reset for Ubuntu 10.10 RAID5 server

Link to this post 22 May 11

My most sincere apologies if this is the wrong place to put this question but i'm a little desperate.

A friend was supposed to help me setup a Linux Server and after some time of not using the server because it was missing a drive i got tired of waiting and decided to rescue my data. Now i'm stuck at the login prompt and he has forgotten the user ID.

how can i recover the password for this server? I've done some looking up and there seems to be several methods, but i'm a total noob at Linux and I need step by step help. pleeeeeease.

thanks

Link to this post 23 May 11

You need to access the hard drive whether it's placing it in another machine or booting from a LiveCD

From there, you must edit the files /etc/passwd and /etc/shadow and edit the lines for the user you want to change the password of. Write there *exactly* the same of a user that you haven't forgotten the password of (can be the same text from another computer).

Reboot the machine and you are ready to go :)

Regards

Link to this post 24 May 11

How to do it depends upon a number of factors, such as what authentication method the server was configured with - standard (password is stored encrypted in /etc/shadow), or some sort of single sign-on such as YP or LDAP. I would boot with a Live CD/DVD, login as root, mount the server / directory somewhere, such as /mnt/server-root, then chroot to that directory. At that point, you should be able to use the normal passwd utility to update the password to something you and your colleague can remember. Alternatively, you can setup sudo on the server file system so that you can login as a normal user, and then reboot, login as yourself, "sudo su" to root, and run passwd to change the root password. Clear as mud, right? :-) Anyway, see if you can make sense out of this. If not, I'll try to do a step-by-step process map for you.

Link to this post 24 May 11

woboyle wrote:

How to do it depends upon a number of factors, such as what authentication method the server was configured with - standard (password is stored encrypted in /etc/shadow), or some sort of single sign-on such as YP or LDAP. I would boot with a Live CD/DVD, login as root, mount the server / directory somewhere, such as /mnt/server-root, then chroot to that directory. At that point, you should be able to use the normal passwd utility to update the password to something you and your colleague can remember. Alternatively, you can setup sudo on the server file system so that you can login as a normal user, and then reboot, login as yourself, "sudo su" to root, and run passwd to change the root password. Clear as mud, right? :-) Anyway, see if you can make sense out of this. If not, I'll try to do a step-by-step process map for you.

Your solution is way more elegant than mine :)

Link to this post 27 May 11

As I understand it, you need the root password (root being the usual administrator user). Once you can log in as root you can change any users password. Here is a How To to recover lost root passwords:

http://www.debuntu.org/recover-root-password-single-user-mode-and-grub

Good luck

Link to this post 27 May 11

raluxs wrote:

As I understand it, you need the root password (root being the usual administrator user). Once you can log in as root you can change any users password. Here is a How To to recover lost root passwords:

http://www.debuntu.org/recover-root-password-single-user-mode-and-grub

Good luck

You can change any password without needing root's password although it's simpler if you get it first ;)

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board