<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>55376</bug_id>
          
          <creation_ts>2025-07-28 13:59:07 +0300</creation_ts>
          <short_desc>samba: Исчезли некоторые команды `net ads keytab` =&gt; `system-auth write ad ... --netbiosname=...`: `Invalid command: net ads keytab add`</short_desc>
          <delta_ts>2025-08-08 21:18:12 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>alterator-auth</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugzilla.altlinux.org/show_bug.cgi?id=55111</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Artem Varaksa">varaksaaa</reporter>
          <assigned_to name="Andrey Limachko">liannnix</assigned_to>
          <cc>boyarsh</cc>
    
    <cc>sin</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>269954</commentid>
    <comment_count>0</comment_count>
    <who name="Artem Varaksa">varaksaaa</who>
    <bug_when>2025-07-28 13:59:07 +0300</bug_when>
    <thetext>Шаги
====

1. Развернуть Samba DC (ALT Server 11.0 x86_64).

2. Ввести в домен клиента, используя команду вида:

# system-auth write ad &quot;SAMBA.TESTDOMAIN&quot; &quot;long-client-hostname&quot; &quot;SAMBA&quot; &quot;Administrator&quot; &quot;Pa##word&quot; --netbiosname=shortname


Фактический результат
=====================

&gt; Using short domain name -- SAMBA
&gt; Joined &apos;SHORTNAME&apos; to dns domain &apos;samba.testdomain&apos;
&gt; Registering SPN host/long-client-hostname for object SHORTNAME
&gt; Updated object
&gt; Registering SPN restrictedkrbhost/long-client-hostname for object SHORTNAME
&gt; Updated object
&gt; Invalid command: net ads keytab add
&gt; Usage:
&gt; net ads keytab create          Create (sync) a fresh keytab
&gt; net ads keytab flush           Remove all keytab entries
&gt; net ads keytab list            List a keytab
&gt; Invalid command: net ads keytab add
&gt; Usage:
&gt; net ads keytab create          Create (sync) a fresh keytab
&gt; net ads keytab flush           Remove all keytab entries
&gt; net ads keytab list            List a keytab


Ожидаемый результат
===================

Успешное выполнение команды.


Дополнительно
=============

p11:

&gt; # net ads keytab --help
&gt; Usage:
&gt; net ads keytab add
&gt;     Add a service principal, updates keytab file only.
&gt; net ads keytab delete
&gt;     Remove entries for service principal, from the keytab file only.
&gt; net ads keytab add_update_ads
&gt;     Add a service principal, depending on the param passed may update ADS computer object in addition to the keytab file.
&gt; net ads keytab create
&gt;     Create a fresh keytab or update existing one.
&gt; net ads keytab flush
&gt;     Remove all keytab entries
&gt; net ads keytab list
&gt;     List a keytab


p11+387440.6 / sisyphus:

&gt; # net ads keytab --help
&gt; Usage:
&gt; net ads keytab create
&gt;     Create (sync) a fresh keytab or update existing one (see also smb.conf &apos;sync machine password to keytab&apos;.
&gt; net ads keytab flush
&gt;     Remove all keytab entries
&gt; net ads keytab list
&gt;     List a keytab

(Упоминается новая опция &apos;sync machine password to keytab&apos;, см. https://bugzilla.altlinux.org/55111 -&gt; https://bugzilla.samba.org/show_bug.cgi?id=15886 - но в этом случае команда запускается на клиенте, а не на контроллере домена.)

Воспроизводимость
=================

Воспроизводится на виртуальных машинах:

[sisyphus]
samba-4.21.7-alt3.x86_64
alterator-auth-0.45-alt1.x86_64

[p11+387440.6]
samba-4.21.7-alt3.x86_64
alterator-auth-0.45-alt1.x86_64


Не воспроизводится на виртуальных машинах:

[p11]
samba-4.20.8-alt2.x86_64
alterator-auth-0.45-alt1.x86_64</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>270008</commentid>
    <comment_count>1</comment_count>
    <who name="Evgeny Sinelnikov">sin</who>
    <bug_when>2025-07-29 10:27:04 +0300</bug_when>
    <thetext>По сути, исправлять нужно alterator-auth.

Механизмы в модуле &quot;net ads keytab&quot; существенно переработаны.
Устаревший функционал удалён.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>270373</commentid>
    <comment_count>2</comment_count>
    <who name="Artem Varaksa">varaksaaa</who>
    <bug_when>2025-08-04 15:32:16 +0300</bug_when>
    <thetext>Дополнительно: в `man net` указано, как заменить с помощью опции `sync machine password to keytab`.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>270679</commentid>
    <comment_count>3</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2025-08-08 21:18:12 +0300</bug_when>
    <thetext>alterator-auth-0.46-alt1 -&gt; sisyphus:

Thu Aug 07 2025 Andrey Limachko &lt;liannnix@altlinux&gt; 0.46-alt1
- system-auth: ad: backup secrets.tdb before joining AD domain
- system-auth: ad: replace SPN registrations with keytab regeneration
  for Samba 4.21+ compatibility (Closes: #55376)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>