[Swlug] forgotten administrative password

Ben Tullis tullis at hypothetical.co.uk
Wed Feb 10 21:00:34 UTC 2021


Hello. This may be a bit late, but it might help. 

If all you need to do is change the password that was originally set for a user account, there are other ways to do this that don't require a reinstall. 

The way that I would go about it is:

* Boot to a rescue environment.
* Mount your root partition to a directory in the rescue environment:

e.g . (after making sure your are root)
mount /dev/sda1 /target

* Bind mount the virtual filesystems into this environment

e.g.
mount -o bind /dev /target/dev
mount -o bind /dev/pts /target/dev/pts
mount -o bind /sys /target/sys

* Change your root into the target filesystem

e.g.
chroot/target

* Change the password for the user

e.g.
passwd bill

This will update the file /etc/shadow with the new password.  Since your are already root you won't need to enter the existing password. 

* Exit the chroot and exit the rescue environment and reboot.

You can use the Mint USB installer as a rescue environment, systemrescuecd, or you might be able to get in by just accessing your own grub boot menu options. 

Best wishes, 
Ben

On 10 February 2021 16:50:52 GMT, Dick Bain via Swlug <swlug at mailman.lug.org.uk> wrote:
>I presume you are using Mint already, if you are in the Applications -
>Accessories menu there is USB stick formatter and USB Image writer 😉
>
>When you have booted into the USB Image and start the installation you
>will
>be asked which installation type you want , here you choose Something
>Else
>which will take you to a partition manager where you can create a root
>partition / a /swap partition and a /home partition the root should be
>20GB
>the swap 4GB and the home partition as big as you can make it 😉
>
>The instructions are
>https://linuxmint-installation-guide.readthedocs.io/en/latest/install.html
>although it envisages you just making a root partition and a swap
>artition
>🙄
>hope this helps
>Dick
>
>On Wed, 10 Feb 2021 at 16:28, Bill Thomson
><billthomson1951 at btinternet.com>
>wrote:
>
>> Thanks for your input team 😊
>>
>>
>> I've downloaded Mint Cinnamon 20.1 onto the laptop and have checked
>the
>> download is legit using the sha256sum and pgp links. I now wish to
>copy it
>> onto a USB stick, but first I need to delete the old ISO from the
>stick or
>> format the stick perhaps. How do I do that? In addition to that, may
>I
>> please ask for details as to how to create a separate /home partition
>as
>> suggested by both Dick and Marcus.
>>
>>
>> Thanks team, look forward to hearing from you 😊
>>
>>
>> Bill Thomson
>>
>>
>>
>>
>> ------ Original Message ------
>> From: "Dick Bain via Swlug" <swlug at mailman.lug.org.uk>
>> To: "South Wales Linux User Group" <swlug at mailman.lug.org.uk>
>> Cc: "Dick Bain" <dick.bain at gmail.com>
>> Sent: Saturday, 6 Feb, 21 At 13:03
>> Subject: Re: [Swlug] forgotten administrative password
>>
>> I always create a separate /home partition so that it is okay to
>install
>> the latest version onto the root partition and your user data will be
>> safer, of course you must back up everything too 😉
>> For preference I use Linux Mint or Ubuntu and so the user password is
>in
>> the list of sudo-ers
>> If you really want to retain the current Linux you can interrupt the
>boot
>> process when grub comes up and follow the instructions from Jon 😉
>> Dick
>>
>>
>> On Sat, 6 Feb 2021, 11:56 Marcus Davage via Swlug, <
>> swlug at mailman.lug.org.uk> wrote:
>>
>>> I'd personally reinstall with the latest version having being
>downloaded
>>> on USB first. If you had separated the /home directory from / at the
>>> beginning, that would make life easier. If you hadn't, then back up
>the
>>> /home directory first, reinstall, then restore.
>>>
>>> I use Mint on all my kit at home, with a dual boot Windows
>partition.
>>>
>>> Best of luck!
>>> Marcus
>>>
>>> On Sat, 6 Feb 2021, 11:46 Bill Thomson via Swlug, <
>>> swlug at mailman.lug.org.uk> wrote:
>>>
>>>> Hi team, I hope you're all well :)
>>>>
>>>>
>>>> I have a slight problem. I installed Linux Mint 19.3 onto a
>friend's
>>>> computer to create a dual boot (Windows/Linux Mint) capability.
>When I
>>>> installed the Linux Mint 19.3, from a USB drive, I set an
>administrative
>>>> password for future updates etc. However, I have forgotten the
>password I
>>>> set, and the list of updates is now quite impressive!
>>>>
>>>>
>>>> Is there any way of reminding myself of the password, or of
>changing it?
>>>>
>>>>
>>>> Alternately, I could reinstall Linux for my friend. How do I go
>about
>>>> doing that? Do I have to uninstall the original installation first,
>and if
>>>> so, how?
>>>>
>>>>
>>>> The very few files that are on the Linux installation have already
>been
>>>> backed up onto a separate USB stick.
>>>>
>>>>
>>>> I'd welcome your expertise on this knotty little problem please.
>It's
>>>> obviously important that my friend's Windows installation stays
>intact.
>>>>
>>>>
>>>> I look forward to hearing from you. Thank you!
>>>>
>>>>
>>>> Bill Thomson
>>>> --
>>>> Swlug mailing list
>>>> Swlug at mailman.lug.org.uk
>>>> https://mailman.lug.org.uk/mailman/listinfo/swlug
>>>
>>> --
>>> Swlug mailing list
>>> Swlug at mailman.lug.org.uk
>>> https://mailman.lug.org.uk/mailman/listinfo/swlug
>>
>> ------------------------------
>> --
>> Swlug mailing list
>> Swlug at mailman.lug.org.uk
>> https://mailman.lug.org.uk/mailman/listinfo/swlug
>>
>>
>
>-- 
>free/libre/open, software for the people by the people
>www.swlug.org  is a good place to go ;-)

-- 
Ben Tullis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/swlug/attachments/20210210/996f71ce/attachment-0001.html>


More information about the Swlug mailing list