Avatar of WellingtonIS
WellingtonIS
 asked on

Linux password

I have linux gno installed and can't remember the administrator password.  Is there anything  I can do to change the current password?
LinuxLinux Security

Avatar of undefined
Last Comment
WellingtonIS

8/22/2022 - Mon
TazDevil1674

WellingtonIS

ASKER
I have a thumb drive so will that work?
WellingtonIS

ASKER
It zorin can I do that via command line?
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
arnold

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?
WellingtonIS

ASKER
that's just the problem. We don't know the passwords for the limited user either.
arnold

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.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
WellingtonIS

ASKER
NO raid just a PC but I'll try thanks.
arnold

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.
ASKER CERTIFIED SOLUTION
WellingtonIS

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
WellingtonIS

ASKER
Question needs to be close machine was totally reinstalled.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck