Linux password

WellingtonIS
WellingtonIS used Ask the Experts™
on
I have linux gno installed and can't remember the administrator password.  Is there anything  I can do to change the current password?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
I have a thumb drive so will that work?

Author

Commented:
It zorin can I do that via command line?
Success in ‘20 With a Profitable Pricing Strategy

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Distinguished Expert 2017

Commented:
As long as you can boot the system, and as long as you can mount the partition (/) of the drive, you can navigate to the etc/shadow and modify the login.

Do you have a limited user that you can login with and then use sudo to elevate your rights?

Author

Commented:
that's just the problem. We don't know the passwords for the limited user either.
Distinguished Expert 2017

Commented:
Ok, the only option is to use a liveCd or USB stick to boot the sysytem and the mount the partition that has the etc directory and edit shadow to replace the current password with a new one.
The complexity depends on how your current system partitioned/setup.
I.e. does the system have raw partitions, lvm based partition or software raid with lvm overlay.
In the case of software raid, you must have info on which disks/partitions make up which volume to avoid data corruption.
RAID 5 groups will cause the most difficulties.

When dealing with software raid, you have to use mdadm, and other tools to be in a position to identify array members.

Author

Commented:
NO raid just a PC but I'll try thanks.
Distinguished Expert 2017

Commented:
if this is raw partitions or LVM only,
fdisk -l will tell you which drives are partitions how.
raw partitions you can simply do
mount /dev/sdax /mnt and look to see what is there.
if LVM partitions are referenced,
you would need to use pvscan, vgscan,lvscan
lvmdiskscan
to see what LVM partitions there are and then do the same
mount /dev/volumegroup/logicalvolume /mnt and look around there for etc.
Nothing seems to work.  Just close this we are going to redo the machine

Author

Commented:
Question needs to be close machine was totally reinstalled.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial