login and pw

Gilles Gravier ggravier at fsfe.org
Wed Dec 2 19:24:00 UTC 2009


It's like trying to break into a machine.

Linux (in general) and Ubuntu (in particular) is designed to make that
HARD if not IMPOSSIBLE.

So I'm going to assume you are the LEGITIMATE user of your machine...

You need to boot with a Ubuntu live CD (which, if this really isyour
machine and you just installed it, you should still have). Then when you
have booted, you mount the machine's hard disk (/ partition) on, say,
/mnt (Ubuntu will do that more or less automatically for you).

Then you navigate to that partition's /etc directory ... so this will be
something like /mnt/ubuntu/etc (but names might vary - just don't use
simple /etc, that's on your live CD).

In the hard disk's /etc you will find a file called passwd... this is
where all users have their login names. You will find yours (or the one
of the user you are trying to hack).

For the password, most likely, it's impossible... Ubuntu, by default,
uses encryption that is not breakable with today's computers available
to people like you and me (and I work for Sun, I have some REALY FANCY
hardware available). What you can do is edit the file called etc/shadow
in the server's hard disk, and remove the encryption string (looks like
a bunch of random caracters) and that will leave you with a blank password.

Alternatively, you could "chroot" to the /mnt/ubuntu/ (your server's
mounted /), still from the live CD, and issue a "sudo passwd YourUser"
and simply change the password to a known value. (chroot /mnt/ubuntu
sudo passwd YourUser)...

Note that these 2 methods let you reset YOUR password to something YOU
know. If you are trying to break into somebody's account by doing that,
they WILL notice the changed password (and, also, in some countries,
that is plain illegal).

Hope this helps,
Gilles

Bob wrote:
> Is it possible to find out what My login and pw is?
> I have been working on setting up a home server but got busy with work
> and had set it aside for a while and forgot my info.
>  
> Thanks
> Bob




More information about the ubuntu-users mailing list