Puppy Linux as a troubleshooting tool

What features/apps/bugfixes needed in a future Puppy
Post Reply
Message
Author
williepabon
Posts: 64
Joined: Mon 16 Sep 2013, 22:52
Location: Puerto Rico(USA)

Puppy Linux as a troubleshooting tool

#1 Post by williepabon »

Hi:
Since Puppy fits so nice in a modern flash drive ( with plenty of space to spare), it could be used efficiently as a tool to troubleshoot other OSes. One tool that I use regularly to fix user problems in Windows is Offline Registry and Password Editor. You can download an .iso file from the developer site and with it create a bootable CD. I wonder if any of the Puppy experts could take the time to take the source code (available on the developer's website), and with it create a package that can be installed in Puppy. Is this possible? Thanks.

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#2 Post by Karl Godt »

Are that these two binaries you talk of ? ( I have no Win OS on my current system to test )

bash-3.00# ./chntpw
chntpw version 0.99.6 110511 , (c) Petter N Hagen
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 Win7
chntpw [OPTIONS] <samfile> [systemfile] [securityfile] [otherreghive] [...]
-h This message
-u <user> Username to change, Administrator is default
-l list all users in SAM file
-i Interactive. List users (as -l) then ask for username to change
-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)
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!

bash-3.00# ./cpnt
usage: cpnt <sourcefile> <destfile>
sorry, only one file at a time yet.

williepabon
Posts: 64
Joined: Mon 16 Sep 2013, 22:52
Location: Puerto Rico(USA)

Puppy Linux as a troubleshooting tool

#3 Post by williepabon »

Karl:
Yes. Those are the two binaries I'm referring. Somebody already prepared a Puppy package for download?

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#4 Post by Karl Godt »

OPS, this one is also in there :

bash-3.00# ./reged
reged version 0.1 110511, (c) Petter N Hagen

Modes:
-x <registryhivefile> <prefixstring> <key> <output.reg>
Xport. Where <prefixstring> for example is HKEY_LOCAL_MACHINE\SOFTWARE
<key> is key to dump (recursively), \ or \\ means all keys in hive
Only one .reg and one hive file supported at the same time
-I <registryhivefile> <prefixstring> <input.reg>
Import from .reg file. Where <prefixstring> for example is HKEY_LOCAL_MACHINE\SOFTWARE
Only one .reg and one hive file supported at the same time
-e <registryhive> ...
Interactive edit one or more of registry files

Options:
-L : Log changed filenames to /tmp/changed, also auto-saves
-C : Auto-save (commit) changed hives without asking
-N : No allocate mode, only allow edit of existing values with same size
-E : No expand mode, do not expand hive file (safe mode)
-t : Debug trace of allocated blocks
-v : Some more verbose messages

bash-3.00# ldd ./reged
linux-gate.so.1 => (0xb7f9a000)
libc.so.6 => /lib/libc.so.6 (0xb7e9e000)
/lib/ld-linux.so.2 (0xb7f9b000)
bash-3.00# ldd ./cpnt
linux-gate.so.1 => (0xb80e7000)
libc.so.6 => /lib/libc.so.6 (0xb7feb000)
/lib/ld-linux.so.2 (0xb80e8000)
bash-3.00# ldd ./chntpw
linux-gate.so.1 => (0xb8007000)
libc.so.6 => /lib/libc.so.6 (0xb7f0b000)
/lib/ld-linux.so.2 (0xb8008000)
bash-3.00# dir2pet OffRegPassEd/

They go to /usr/local/bin . They are stripped .

From http://pogostick.net/~pnh/ntpasswd/editor.html

No menu.desktop file . Gtkdialog crashed for me [ because no version number added ] so pet.specs file might be incomplete . But installs correctly .

Compiled with glibc-2.6.1 . Just make without any changes to the Makefile .
Attachments
OffRegPassEd.pet
(107.49 KiB) Downloaded 680 times
Last edited by Karl Godt on Wed 18 Sep 2013, 21:22, edited 1 time in total.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#5 Post by mikeb »

A bootable XP is handy on a flash drive too.. you can load as many hives as you like with the standard registry editor.

mike

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#6 Post by Karl Godt »

Have not much knowledge about the registry .
That is a horrible kind of feature on windows ,

Karl

Hives .. huh ?
What Where ?

williepabon
Posts: 64
Joined: Mon 16 Sep 2013, 22:52
Location: Puerto Rico(USA)

Puppy Linux as a troubleshooting tool

#7 Post by williepabon »

Karl:
Thank you very much for your effort. Already downloaded the file, but before I install it, I have a couple of questions. Assume the command runs in terminal mode, but where it will be located? You said you couldn´t create a desktop file. Will I be able to type the command in terminal mode and the app will start? Here, I have a number of pcs with Windows XP and
Windows 7 to test the program. Will keep you posted how it works.
Thanks.
wp

williepabon
Posts: 64
Joined: Mon 16 Sep 2013, 22:52
Location: Puerto Rico(USA)

Puppy Linux as a troubleshooting tool

#8 Post by williepabon »

Karl:

Regrettably, the app didn´t work as expected. When I run chntpw -i in a terminal I get the help info of the command (the same thing that you got). The program on the CD goes, after booting a version of Linux, to a series of steps to determine the disk drive and directory where the SAM (where users and passwords are encrypted) file is located and shows you the users and passwords stored in it. Maybe, you can download the zip file for the bootable CD version (cd110511.zip) and figure out how it works. Thanks.
wp

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#9 Post by Karl Godt »

YO Willie ..
Have fired up my asus eepc that I installed a Windows 8 test iso from one year back ( set date in BIOS back and no internet connection ) to Macpup Foxy3 :

bash-3.00# find /mnt/sda1 -iname "SAM"
/mnt/sda1/Windows/System32/config/RegBack/SAM
/mnt/sda1/Windows/System32/config/SAM
^C

bash-3.00# chntpw -i /mnt/sda1/Windows/System32/config/SAM
chntpw version 0.99.6 110511 , (c) Petter N Hagen
openHive(/mnt/sda1/Windows/System32/config/SAM) failed: Read-only file system, trying read-only
Hive </mnt/sda1/Windows/System32/config/SAM> name (from header): <\SystemRoot\System32\Config\SAM>
ROOT KEY at offset: 0x001020 * Subkey indexing type is: 666c <lf>
File size 262144 [40000] bytes, containing 7 pages (+ 1 headerpage)
Used for data: 278/24080 blocks/bytes, unused: 35/4368 blocks/bytes.


* SAM policy limits:
Failed logins before lockout is: 0
Minimum password length : 0
Password history count : 0


<>========<> chntpw Main Interactive Menu <>========<>

Loaded hives: </mnt/sda1/Windows/System32/config/SAM>

1 - Edit user data and passwords
- - -
9 - Registry editor, now with full write support!
q - Quit (you will be asked if there is something to save)


What to do? [1] ->
:?:
ZERO PLAN . Have mounted read-only :D

williepabon
Posts: 64
Joined: Mon 16 Sep 2013, 22:52
Location: Puerto Rico(USA)

Puppy Linux as a troubleshooting tool(Solved)

#10 Post by williepabon »

Karl:

Thank you very much for you effort. The program wasn't working because of a fault of my own. I didn't include the path to the SAM file in the command line. When I saw your last post I got aware of my mistake. The application is working as expected. Already tried it with success. Now, I will write a small tutorial, so that I don't forget how to use it. Thanks, bro!
wp

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#11 Post by Karl Godt »

Glad you got it working , bro !

Looking forward for your tutorial :idea:

DPUP5520
Posts: 800
Joined: Wed 16 Feb 2011, 05:38

#12 Post by DPUP5520 »

Hey williepabon glad to hear that you got CHNTPW working well for you in puppy. Theres a few tutorials on Youtube(one using Puppy 5.2.8) if you wanna show a video of how it's done. If you're interested in a Puppy that's dedicated to OS repair check out the first link in my sig or the two below links.

http://puppylinux.org/wikka/PupRescue

http://murga-linux.com/puppy/viewtopic.php?t=84162
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=69651][b][i]PupRescue 2.5[/i][/b][/url]
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=72178][b][i]Puppy Crypt 528[/i][/b][/url]

williepabon
Posts: 64
Joined: Mon 16 Sep 2013, 22:52
Location: Puerto Rico(USA)

Puppy Linux as a troubleshooting tool

#13 Post by williepabon »

DPUP5520:

Hey bro, you already did it all! Thanks. That's the tool I was thinking on doing. I downloaded PupRescue and I'm going to give it a spin as soon as I get a few CDs to burn. Will give you my impressions. Thanks again.
wp

williepabon
Posts: 64
Joined: Mon 16 Sep 2013, 22:52
Location: Puerto Rico(USA)

Puppy Linux as a troubleshooting tool

#14 Post by williepabon »

DPUP5520:

Already have a Live DC out of your Pup Rescue .iso. Works very nice, though, from the CD it takes some time to load. Suppose that, when I create a flash drive out of it, it should run faster. One problem that I encountered is that I couldn't find all the utilities that you mention for PupRescue 2.5 in the description. Maybe is because I don't know where to look for, but I couldn't find the TeamViewer app, the Smartmontools, the ntfsprogs and the like. Again, probably is because I don't know where to look for in the disk. Your help is appreciated. Thanks.
wp

DPUP5520
Posts: 800
Joined: Wed 16 Feb 2011, 05:38

#15 Post by DPUP5520 »

williepabon It boots slower because it's larger, ie more time to load into ram, but yes it will be significantly quicker on a thumb drive. Smartmontools is in the menu under system I believe (as gsmartmon), teamviewer should also be in the menu. As for ntfsprogs it is a collection of software which is included in puppy however I just updated a few scripts and compatibility issues ie ntfsclone is a part of ntfsprogs. Also if you are using PupRescue Precise instead of 2.5 there were some programs that were taken out due to redundancy or not needing them. if you are looking for the specific location of a program try using pfind to locate it, or you can ask for help in the specific PupRescue thread and i'll work out whatever issues you are having.
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=69651][b][i]PupRescue 2.5[/i][/b][/url]
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=72178][b][i]Puppy Crypt 528[/i][/b][/url]

Pelo

Puprescue remasterized with help super LUPU

#16 Post by Pelo »

Puprescue remasterized with help super LUPU
Interchanged modules and firmware in directory lib
and modules in directory etc
(process "how to switch kernel" from the forum).
Firefox installed from my tool case.
All is running ok. (wireless was the main interest)
And now, i get a glance at the software. What is usefull here.... :shock:

Pelo

PupRescue Precise ?

#17 Post by Pelo »

PupRescue Precise ? I should have read this topic before. With Precise, all is ready to work.
Nevertheless, the idea of an how-to is fine, and strongly wished, for a frenchy like me who understands quite nothing in here above explanations.
I cherck the distro deeper. It is just installed.

Post Reply