Lost Password

8 replies [Last post]
snowglass
Offline
Joined: 11/08/2010

Alrighty, so I am really at a loss right now, and I would love it if someone out there could give me a hand.

I recently inherited a laptop running trisquel, and unfortunately, the person I inherited it from, cannot remember the login password for his account, and I cannot figure out how to reset it, or at the very least, create a new user for myself so that I can login to the system. Any gurus or kind souls out there who would be willing to help would be much appreciated. The system seems to be running version 2.6.

ivaylo
Offline
Joined: 07/26/2010

name at domain writes:

>[...] cannot remember the login password for his
> account, and I cannot figure out how to reset it, or at the very
> least, create a new user for myself so that I can login to the
> system.

You could boot from live cd and edit the /etc/passwd and/or
/etc/shadow files on the hard drive, if you know what you are
doing. Better reinstall Trisquel (for security reasons as well).

snowglass
Offline
Joined: 11/08/2010

Thank you so much for the advice. It looks as though I will have to see about purchasing another installation CD for the program (yes he lost that as well, and unfortunately, my desktop's writer isn't working.)

snowglass
Offline
Joined: 11/08/2010

So...I managed to get a 'live cd' running from a USB drive, and at least it's booting from the USB. With an option to install Trisquel 4. Just a matter of taking the plunge now. I truly hope it doesn't bollocks the whole system.

ruben
Offline
Joined: 09/24/2010

> So...I managed to get a 'live cd' running from a USB drive, and at
> least it's booting from the USB. With an option to install Trisquel
> 4. Just a matter of taking the plunge now. I truly hope it doesn't
> bollocks the whole system.

To change the password do this:

- Mount the partition where your / filesystem is
- Open a terminal and run:

sudo chroot /media/your_root_partition passwd username

lembas
Offline
Joined: 05/13/2010

You will do just fine. Trust yourself and if push comes to shove, we'll try anwering all your questions here.

Magic Banana

I am a member!

I am a translator!

Offline
Joined: 07/24/2010

The easiest should be to start in "recuperation mode" (the second line for Trisquel in GRUB, the bootloader). This provides you a root shell what means you can do whatever you want (including destroying your system). To change the password for a user named "banana":
# passwd banana

To create a new user named "banana":
# adduser banana

First check the manuals for these commands:
# man passwd
# man adduser

If you create a new user, you may, in particular, be interested in adding this user to groups that let him administrate the system!

ruben
Offline
Joined: 09/24/2010

> The easiest should be to start in "recuperation mode" (the second
> line for Trisquel in GRUB, the bootloader). This provides you a root
> shell what means you can do whatever you want (including destroying
> your system).

In fact, Trisquel comes with that entry disabled to improve security.
If you want -and most important, know how- you can still enter in grub
edit mode and add the "single" parameter to boot in root mode.

Since that is also a security threat, since Trisquel 4.0 the edit mode
requires a password, which is random for every installation and lives
in /target/etc/grub.d/01_PASSWORD and only root can read it.

So, it is wise that the system administrator read that password and
note it down in case something goes wrong.

Magic Banana

I am a member!

I am a translator!

Offline
Joined: 07/24/2010

Then I guess /etc/grub.d/01_PASSWORD does not exist on my system because it was upgraded from Trisquel 3.5. Am I right?

I do not really see the point of this additional security. As soon as the local access includes a USB port (or a CD player), you can boot a Live system and read this file... I know that GRUB allows to encrypt the password, but Trisquel cannot both generate a random and encrypt it before the administrator knows it! :-)