Compile error for chntpw

The package is not available.
I’m trying to play with https://www.worproject.com and i have no access to a windows OS.
3 years ago, it was possible to compile this package.

https://forum.manjaro.org/t/is-chntpw-part-of-a-package-somewhere-in-manjaro-arm-or-the-aur/76639/3

Now :

==> Starting build()...
gcc -c -DUSEOPENSSL -g -I. -I/usr/include -Wall libsam.c
gcc -static -DUSEOPENSSL -g -I. -I/usr/include -Wall -o reged.static reged.o ntreg.o edlib.o
libsam.c: In function 'sam_put_grp_members_sid':
libsam.c:514:28: error: passing argument 1 of 'hexdump' from incompatible pointer type [-Wincompatible-pointer-types]
  514 |      if (gverbose) hexdump(&c->data, 0, c->len, 1);
      |                            ^~~~~~~~
      |                            |
      |                            int *
In file included from libsam.c:47:
ntreg.h:394:20: note: expected 'char *' but argument is of type 'int *'
  394 | void hexdump(char *hbuf, int start, int stop, int ascii);
      |              ~~~~~~^~~~
libsam.c:531:56: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'void *' [-Wformat=]
  531 |       if (gverbose) printf("  copying : %d len %x, at %x\n",i,sarray[i].len, sidptr);
      |                                                       ~^                     ~~~~~~
      |                                                        |                     |
      |                                                        unsigned int          void *
      |                                                       %p
libsam.c:542:27: error: passing argument 1 of 'hexdump' from incompatible pointer type [-Wincompatible-pointer-types]
  542 |     if (gverbose) hexdump(&c->data, 0, c->len, 1);
      |                           ^~~~~~~~
      |                           |
      |                           int *
ntreg.h:394:20: note: expected 'char *' but argument is of type 'int *'
  394 | void hexdump(char *hbuf, int start, int stop, int ascii);
      |              ~~~~~~^~~~
make: *** [Makefile:66: libsam.o] Error 1
make: *** Waiting for unfinished jobs....
==> ERROR: A failure occurred in build().
    Aborting...

It doesn’t build for x86_64, either. The last upstream release was 10 years ago. I suggest finding an alternate program.

pacman -Si chntpw
Repository      : extra
Name            : chntpw
Version         : 140201-4
Description     : Offline NT Password Editor - reset passwords in a Windows NT SAM user database file
Architecture    : x86_64
URL             : https://pogostick.net/~pnh/ntpasswd/
Licenses        : GPL  LGPL
Groups          : None
Provides        : None
Depends On      : None
Optional Deps   : None
Conflicts With  : None
Replaces        : None
Download Size   : 87.68 KiB
Installed Size  : 357.85 KiB
Packager        : Felix Yan <felixonmars@archlinux.org>
Build Date      : Tue 07 Jul 2020 01:02:03 PM
Validated By    : MD5 Sum  SHA-256 Sum  Signature

This package doesn’t work?

I haven’t used this in a long time, but it was my understanding Win 10/11 still uses the exact same SAM files for local accounts. (The latest feature updates just make it harder to make local accounts.)

That’s not what this topic is about. Please check the category before responding. :wink:

AOL Keyword: ARM :stuck_out_tongue_winking_eye:

It built 4 years ago on x86_64 apparently, however as I just said, it doesn’t now.

I blame Discourse mobile for hiding the tag on me! I mean, whoops.

I haven’t tried to cross-compile in many years. Since my blunder, I tried for the heck of it. But I was able to get through those first errors (warnings for me) by passing -Wno-implicit-function-declaration.

Then the fun starts with the using the old statically linked openssl library, which I think I came close. But I’d have to come back to this, if it’s even worth it.