(moving to ports@) On 2025-02-17, Maksim Rodin <a23s4a2...@yandex.ru> wrote: > Hello, > I installed samba-4 package to test some samba-tool commands against an > existing samba dc server. > This is what I see when I run samba-tool:
This uses crypt from Python's standard library, but it's only available on certain OS (not including OpenBSD). It's also only for Python releases <=3.12, it's removed in 3.13, so Samba has recently modified samba-tool to use their own version from their "glue" native extension: https://github.com/samba-team/samba/commit/405187d2ef4920a9a284649c9c3287f5844d5180 https://github.com/samba-team/samba/commit/88e3c82d88a68cf972f8189e1c3718698b49974a I don't think this made it into a samba release yet but looks like it should be in 4.22.x. However I think this still won't work correctly as it looks like it wants a crypt(3) that supports $5$ and $6$ hashes, but it may at least be less broken than what's there now. > Is this something I can fix by myself? > My system is OpenBSD amd64 7.6 stable. Not easily. > """ > $ samba-tool > samba-tool: missing subcommand > > ERROR(<class 'OSError'>): uncaught exception - [Errno 22] Invalid argument > File "/usr/local/lib/python3.11/site-packages/samba/netcmd/main.py", line > 92, in samba_tool > ret = cmd._run(*argv) > ^^^^^^^^^^^^^^^ > File "/usr/local/lib/python3.11/site-packages/samba/netcmd/__init__.py", > line 368, in _run > cmd = self.subcommands[cmd_name] > ~~~~~~~~~~~~~~~~^^^^^^^^^^ > File "/usr/local/lib/python3.11/site-packages/samba/netcmd/main.py", line > 35, in __getitem__ > self[attr] = getattr(__import__('samba.netcmd.%s' % package, > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File > "/usr/local/lib/python3.11/site-packages/samba/netcmd/user/__init__.py", line > 33, in <module> > from .readpasswords import (cmd_user_getpassword, > File > "/usr/local/lib/python3.11/site-packages/samba/netcmd/user/readpasswords/__init__.py", > line 22, in <module> > from .getpassword import cmd_user_getpassword > File > "/usr/local/lib/python3.11/site-packages/samba/netcmd/user/readpasswords/getpassword.py", > line 26, in <module> > from .common import ( > File > "/usr/local/lib/python3.11/site-packages/samba/netcmd/user/readpasswords/common.py", > line 153, in <module> > get_crypt_value(alg, "") > File > "/usr/local/lib/python3.11/site-packages/samba/netcmd/user/readpasswords/common.py", > line 128, in get_crypt_value > crypt_value = crypt.crypt(utf8pw, crypt_salt) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/local/lib/python3.11/crypt.py", line 86, in crypt > return _crypt.crypt(word, salt) > ^^^^^^^^^^^^^^^^^^^^^^^^ > """ -- Please keep replies on the mailing list.