LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 09-26-2018, 01:28 PM   #1
NEWBIE#101
LQ Newbie
 
Registered: Sep 2018
Posts: 14

Rep: Reputation: Disabled
Using Linux for widows


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/loop1: 1.2 GiB, 1291608064 bytes, 2522672 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


Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 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: 0xec0328c2

Device Boot Start End Sectors Size Id Type
/dev/sda1 63 80324 80262 39.2M de Dell Utility
/dev/sda2 * 81920 16607231 16525312 7.9G 7 HPFS/NTFS/exFAT
/dev/sda3 16607232 976771071 960163840 457.9G 7 HPFS/NTFS/exFAT


Disk /dev/sdb: 3.8 GiB, 4026531840 bytes, 7864320 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: 0x59bc0f06

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 128 7864319 7864192 3.8G 7 HPFS/NTFS/exFAT


Disk /dev/zram0: 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


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.

It has been mounted and there is a file.

Thank you for your time.
 
Old 09-26-2018, 01:40 PM   #2
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
What do you want to do exactly ?

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).
 
Old 09-26-2018, 02:06 PM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,622

Rep: Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964
Quote:
Originally Posted by NEWBIE#101 View Post
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.

There are also lots of articles Google returns, to tell you how to reset your password:
https://www.windowspasswordsreset.co...hout-disk.html
 
Old 09-29-2018, 01:15 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
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.
 
Old 09-29-2018, 06:18 AM   #5
NEWBIE#101
LQ Newbie
 
Registered: Sep 2018
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
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.
 
Old 09-29-2018, 07:51 AM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
Quote:
chntpw -l /media/windows/Windows/system32/config/software
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.
 
Old 09-29-2018, 09:28 AM   #7
NEWBIE#101
LQ Newbie
 
Registered: Sep 2018
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
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 ~ $

Thanks again for your help.
 
Old 09-29-2018, 10:50 AM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,622

Rep: Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964
Quote:
Originally Posted by NEWBIE#101 View Post
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.
 
Old 09-29-2018, 12:25 PM   #9
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Another option:

http://pogostick.net/~pnh/ntpasswd/
 
Old 09-29-2018, 01:14 PM   #10
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
Quote:
peppermint@peppermint ~ $ chntpw -l\media\Windows\Windows\System32\config\software
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:

Quote:
sudo chntpw -l /media/Windows/Windows/System32/config/software
On my system from Linux, the software file is all uppercase (SOFTWARE) so you might try changing that.

Even better, use windows software as suggested above. Should be a lot easier.
 
Old 09-30-2018, 03:24 AM   #11
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
NEWBIE#101, on Linux you need to use forward slashes for paths, even if they are on a windows partition:
Code:
/path/to/windows
it is also case sensitive as already mentioned.

you also need to put straight double quotes around paths containing spaces:
Code:
cd "/path/to/Windows NT/bla"
 
Old 10-01-2018, 04:08 AM   #12
NEWBIE#101
LQ Newbie
 
Registered: Sep 2018
Posts: 14

Original Poster
Rep: Reputation: Disabled
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.
 
Old 10-01-2018, 07:05 AM   #13
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
Are you getting the same errors when you run the command below? Or have you now resolved this problem?

Code:
sudo chntpw -l /media/windows/Windows/System32/config/SOFTWARE
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.
 
Old 10-01-2018, 07:14 AM   #14
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,622

Rep: Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964
Quote:
Originally Posted by NEWBIE#101 View Post
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.
 
Old 10-01-2018, 08:23 AM   #15
NEWBIE#101
LQ Newbie
 
Registered: Sep 2018
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
getting widows printer to work on linux bennythepitbull Linux - Server 0 06-05-2007 04:55 PM
Widows emulation inside mepis linux vafhudr Linux - Newbie 2 12-18-2006 03:28 PM
Telnet from Widows 2000 to Linux pistachio Linux - Networking 1 08-29-2005 12:51 PM
Widows -> Linux Programs kuba Linux - Newbie 10 02-13-2004 08:27 AM
Linux and Widows networking with LinNeighborhood munky_hwm Linux - Networking 1 04-25-2003 05:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration