Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm sure you will tell me this is a windows problem.(I have contacted microsoft) but I am using a friends Linux Mint usb to help me with this situation. The problem is the password. The password was changed and now I cannot log on no matter what I do. He gave some info on what to do but I'm at a stand still. I'm not sure what to do or how to do it. This is what I have done so far but there are issues. If you could advise I'd be grateful if not np.
peppermint@peppermint ~ $ sudo apt-get install chntpw
Reading package lists... Done
Building dependency tree
Reading state information... Done
chntpw is already the newest version (1.0-1build1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
peppermint@peppermint ~ $ $ sudo fdisk -l
$: command not found
peppermint@peppermint ~ $ sudo lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 1.3G 0 loop /cdrom
loop1 7:1 0 1.2G 1 loop /rofs
sda 8:0 0 465.8G 0 disk
├─sda1 8:1 0 39.2M 0 part
├─sda2 8:2 0 7.9G 0 part
└─sda3 8:3 0 457.9G 0 part /media/peppermint/OS
sdb 8:16 1 3.8G 0 disk
└─sdb1 8:17 1 3.8G 0 part /isodevice
zram0 252:0 0 747.8M 0 disk [SWAP]
zram1 252:1 0 747.8M 0 disk [SWAP]
peppermint@peppermint ~ $ $ sudo mkdir /media/windows
$: command not found
peppermint@peppermint ~ $ sudo mkdir /media/windows
peppermint@peppermint ~ $ sudo mount /dev/sda2 /media/windows
peppermint@peppermint ~ $ sudo fdisk -l
Disk /dev/loop0: 1.3 GiB, 1366294528 bytes, 2668544 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x46be5c62
Device Boot Start End Sectors Size Id Type
/dev/loop0p1 * 0 2668543 2668544 1.3G 17 Hidden HPFS/NTFS
Disk /dev/zram1: 747.8 MiB, 784125952 bytes, 191437 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
peppermint@peppermint ~ $ sudo mkdir /media/windows
mkdir: cannot create directory ‘/media/windows’: File exists
peppermint@peppermint ~ $ sudo mount /dev/sda2 /media/windows
Mount is denied because the NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may use it which
could be identified for example by the help of the 'fuser' command.
peppermint@peppermint ~ $ chntpw -l /media/windows/Windows/system32/config/software
chntpw version 1.00 140201, (c) Petter N Hagen
openHive(/media/windows/Windows/system32/config/software) failed: No such file or directory, trying read-only
openHive(/media/windows/Windows/system32/config/software) in fallback RO-mode failed: No such file or directory
chntpw: Unable to open/read a hive, exiting..
peppermint@peppermint ~ $ cd Microsoft\Windows NT\CurrentVersion\Winlogon
bash: cd: too many arguments.
When you want to access the data on the windows machine, then use another windows computer with a working installation and mount the disc into this computer.
Then you read the hole data on this computer (with some exceptions).
I'm sure you will tell me this is a windows problem.(I have contacted microsoft) but I am using a friends Linux Mint usb to help me with this situation. The problem is the password. The password was changed and now I cannot log on no matter what I do. He gave some info on what to do but I'm at a stand still. I'm not sure what to do or how to do it. This is what I have done so far but there are issues. If you could advise I'd be grateful if not np.
First, you're right: this IS a Windows problem. And I find it very hard to believe that Microsoft can't help you with this, seeing as there are many, MANY articles in their own knowlegebase dealing specifically with this.
i am also a little unclear about what you are trying ot achieve.
are you saying you are trying to recover a lost windows password?
that i wouldn't know how to do.
or are you trying to recover data from a windows partition?
that should be near trivial. unless encryption is involved?
i am also a little unclear about what you are trying ot achieve.
are you saying you are trying to recover a lost windows password?
that i wouldn't know how to do.
or are you trying to recover data from a windows partition?
that should be near trivial. unless encryption is involved?
oh and please use code tags for code.
Yes we are trying to recover a password(microsoft had my friend change his password 3x's and he still can't logon) I was told that a bootable linux usb would be of use but as you can see I'm unaware of how tp do this. What's a code tag? Thanks for at least responding.
You are using a Linux OS to access this directory from a terminal which means case sensitivity applies. You get the "no such file or directory" error message because it is System32 not system32.
You might post more detail on what your friend was told to do by microsoft and the results of the attempts.
Quote:
peppermint@peppermint ~ $ cd Microsoft\Windows NT\CurrentVersion\Winlogon
The above command would probably 'work' if you were in the directory immediately above 'Microsoft' and you used forward slashes ( / ) rather than backward ( \ ).
This method apparently works, the link below explains using it in Fedora. The only difference I would expect is how to install on Fedora as opposed to Ubuntu/Mint which is irrelevant since you already have it.
You are using a Linux OS to access this directory from a terminal which means case sensitivity applies. You get the "no such file or directory" error message because it is System32 not system32.
You might post more detail on what your friend was told to do by microsoft and the results of the attempts.
The above command would probably 'work' if you were in the directory immediately above 'Microsoft' and you used forward slashes ( / ) rather than backward ( \ ).
This method apparently works, the link below explains using it in Fedora. The only difference I would expect is how to install on Fedora as opposed to Ubuntu/Mint which is irrelevant since you already have it.
Thank you for a much better explanation, anyway, he was told to make a bootable usb of any Linux distro, he had one of Peppermint ,then to "mount windows" than to get a pkg named "chntpw" but as far as what comes next is unclear as you can see by the first post. Moving on , he tried to follow the suggestions you gave (I do not know squat about Linux and it's obvious the little he knows isn't enough) this is what came up:
peppermint@peppermint ~ $ chntpw -l\media\Windows\Windows\System32\config\software
chntpw: invalid option -- 'm'
chntpw: change password of a user in a Windows SAM file,
or invoke registry editor. Should handle both 32 and 64 bit windows and
all version from NT3.x to Win8.1
chntpw [OPTIONS] <samfile> [systemfile] [securityfile] [otherreghive] [...]
-h This message
-u <user> Username or RID (0x3e9 for example) to interactively edit
-l list all users in SAM file and exit
-i Interactive Menu system
-e Registry editor. Now with full write support!
-d Enter buffer debugger instead (hex editor),
-v Be a little more verbose (for debuging)
-L For scripts, write names of changed files to /tmp/changed
-N No allocation mode. Only same length overwrites possible (very safe mode)
-E No expand mode, do not expand hive file (safe mode)
Usernames can be given as name or RID (in hex with 0x first)
See readme file on how to get to the registry files, and what they are.
Source/binary freely distributable under GPL v2 license. See README for details.
NOTE: This program is somewhat hackish! You are on your own!
peppermint@peppermint ~ $
Thank you for a much better explanation, anyway, he was told to make a bootable usb of any Linux distro, he had one of Peppermint ,then to "mount windows" than to get a pkg named "chntpw" but as far as what comes next is unclear as you can see by the first post. Moving on , he tried to follow the suggestions you gave (I do not know squat about Linux and it's obvious the little he knows isn't enough) this is what came up:
peppermint@peppermint ~ $ chntpw -l\media\Windows\Windows\System32\config\software
chntpw: invalid option -- 'm'
chntpw: change password of a user in a Windows SAM file,
or invoke registry editor. Should handle both 32 and 64 bit windows and
all version from NT3.x to Win8.1
chntpw [OPTIONS] <samfile> [systemfile] [securityfile] [otherreghive] [...]
-h This message
-u <user> Username or RID (0x3e9 for example) to interactively edit
-l list all users in SAM file and exit
-i Interactive Menu system
-e Registry editor. Now with full write support!
-d Enter buffer debugger instead (hex editor),
-v Be a little more verbose (for debuging)
-L For scripts, write names of changed files to /tmp/changed
-N No allocation mode. Only same length overwrites possible (very safe mode)
-E No expand mode, do not expand hive file (safe mode)
Usernames can be given as name or RID (in hex with 0x first)
See readme file on how to get to the registry files, and what they are.
Source/binary freely distributable under GPL v2 license. See README for details.
NOTE: This program is somewhat hackish! You are on your own!
peppermint@peppermint ~ $
Thanks again for your help.
Sorry, but again, why are you doing this with Linux?? I gave you a link that tells you explicitly how to do this without a Windows password recovery disk, just by booting from the Windows installation media. And you say you contacted Microsoft; they have at least a dozen articles on their knowledgebase about how to do this. Still not seeing why you're involving Linux of any sort into this, as all it does it make things more complicated.
Boot to the Windows recovery partition, or download a Windows 10 ISO image (free) from their website, and boot from it. Use the built-in Windows utilities to reset the password.
I've never used this software but I would expect doing something like this would require root privileges so you should at least preface the command with sudo. You are alos using windows backward slash instead of the Linux forward slash in the path and that won't work. I would also expect that you would need a space after the command/parameter. The message you are getting is just telling you that the command is incorrect. I would expect you would get better results with a correct command path as below:
Thanks for the help but, I just don't get this system at all. Anyway, in answer to several questions why am I doing this? trying to help out a friend who was told he could be helped by Linux. As far as Microsoft true they have a lot of articles on the subject but, they also have a lot of people who still can't logon to their systems. Thanks for your help.
In the command above, the first 'windows' needs to be 'windows' beginning with a Lower Case Letter 'w' which you do correctly in some commands and not others.
System32 needs to begin with an upper case letter 'S' and the file name software needs to be all uppercase: SOFTWARE. That's just the way it works with Linux.
Code:
peppermint@peppermint ~ $ cd Microsoft\Windows NT\CurrentVersion\Winlogon
The command above has 2 errors in it. First you are using backward slashes ( \ ) rather than forward slashes ( / ) and you have a space between Windows and NT so you would need the command in quotes. You would also need to be in the directory immediately above wherever the Microsoft directory exists. So if the Microsoft directory was in the root of the filesystem, you would need the command below.
Code:
cd "/media/windows/Microsoft/Windows NT/CurrentVersion/Winlogon/"
I don't know which release of windows you are using, I only have windows 10 and there is no Microsoft directory in the root of the filesystem.
Thanks for the help but, I just don't get this system at all. Anyway, in answer to several questions why am I doing this? trying to help out a friend who was told he could be helped by Linux.
Who told your friend that, and why aren't they helping him, then?
Quote:
As far as Microsoft true they have a lot of articles on the subject but, they also have a lot of people who still can't logon to their systems. Thanks for your help.
Sorry, but the link I gave you explicitly tells you *EXACTLY* how to use a bootable Microsoft Windows 10 install media to recover your password...step by step, and I've used those instructions MANY times. And rather than saying that yes, you know there are articles about Microsoft's tools...you don't actually tell us what Microsoft TOLD YOU (when you contacted them), what you did/tried from them, or what articles from MS you followed, that you're not having luck with.
The link I provided has exact steps (with pictures). You can even boot from a recovery partition on your system if you have one, and this whole procedure should take you less than five minutes.
Who told your friend that, and why aren't they helping him, then?
Sorry, but the link I gave you explicitly tells you *EXACTLY* how to use a bootable Microsoft Windows 10 install media to recover your password...step by step, and I've used those instructions MANY times. And rather than saying that yes, you know there are articles about Microsoft's tools...you don't actually tell us what Microsoft TOLD YOU (when you contacted them), what you did/tried from them, or what articles from MS you followed, that you're not having luck with.
The link I provided has exact steps (with pictures). You can even boot from a recovery partition on your system if you have one, and this whole procedure should take you less than five minutes.
What you say is all true but, the only pc he has is the one he can't log onto so he can't download anything to use, that is why the linux usb was suggedted and as far as I know you need to install before you can download so I'm guessing he wouldn't be able to do that when he has the linux usb connected. Correct me if I'm wrong. Thanks for the help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.