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

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

    <bug>
          <bug_id>47411</bug_id>
          
          <creation_ts>2023-08-30 21:11:44 +0300</creation_ts>
          <short_desc>Не вводит в домен Active Directory с помощью Winbind (NT_STATUS_INVALID_PARAMETER)</short_desc>
          <delta_ts>2023-08-30 21:11:44 +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>realmd</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <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="Evgeny Shesteperov">alimektor</reporter>
          <assigned_to name="Alexey Shabalin">shaba</assigned_to>
          <cc>shaba</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>232205</commentid>
    <comment_count>0</comment_count>
    <who name="Evgeny Shesteperov">alimektor</who>
    <bug_when>2023-08-30 21:11:44 +0300</bug_when>
    <thetext>Не вводит в домен Active Directory с помощью Winbind (NT_STATUS_INVALID_PARAMETER)

Версия

-   realmd-0.17.1-alt4

Стенд

-   ALT Workstation 10.1 (Sisyphus) - Samba Client
-   ALT Server 10.1 (Sisyphus) - Samba Server

Шаги воспроизведения

Установить пакет:

    # apt-get install -y realmd

Добавить resolv для Samba, настроить имя:

    hostnamectl set-hostname client1 &amp;&amp; \
    DOMAINNAME=&quot;samba.testdomain&quot; &amp;&amp; \
    SERVERIP=&lt;DOMAIN SERVER IP&gt; &amp;&amp; \
    echo -e &quot;name_servers=$SERVERIP\nsearch_domains=$DOMAINNAME&quot; &gt;&gt; /etc/resolvconf.conf &amp;&amp; \
    reboot

Выполнить присоединение к домену с указанием Winbind:

    # realm join --verbose --client-software=winbind samba.testdomain --user Administrator

Ожидаемый результат: успешный ввод в домен без ошибок.

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

     * Resolving: _ldap._tcp.samba.testdomain
     * Performing LDAP DSE lookup on: XXX
     * Performing LDAP DSE lookup on: XXX
     * Successfully discovered: samba.testdomain
    Пароль для Administrator:
     * Required files: /usr/sbin/winbindd, /usr/bin/wbinfo, /usr/bin/net
     * LANG=C LOGNAME=root /usr/bin/net --configfile /var/cache/realmd/realmd-smb-conf.DTFBA2 -U Administrator --use-kerberos=required ads join samba.testdomain
    Password for [SAMBA\Administrator]:DNS update failed: NT_STATUS_INVALID_PARAMETER

    Using short domain name -- SAMBA
    Joined &apos;CLIENT1&apos; to dns domain &apos;samba.testdomain&apos;
    No DNS domain configured for client1. Unable to perform DNS Update.
     * LANG=C LOGNAME=root /usr/bin/net --configfile /var/cache/realmd/realmd-smb-conf.DTFBA2 -U Administrator ads keytab create
    Password for [SAMBA\Administrator]:
     * /sbin/chkconfig winbind on
    Внимание: Отправляется запрос &apos;systemctl enable winbind.service&apos;.
    Synchronizing state of winbind.service with SysV service script with /lib/systemd/systemd-sysv-install.
    Executing: /lib/systemd/systemd-sysv-install enable winbind
    Created symlink /etc/systemd/system/multi-user.target.wants/winbind.service → /lib/systemd/system/winbind.service.
     * /sbin/service winbind restart
     * /usr/sbin/control system-auth winbind
     * Successfully enrolled machine in realm

Примечание: Судя по гуглу, довольно частая проблема при эксплуатации
winbind. Тот же alterator-auth использует --no-dns-updates опцию.

    # cat /usr/sbin/system-auth | grep -E &quot;\-\-no-dns-updates&quot;
        $net_cmd ads join --use-kerberos=required --no-dns-updates --use-krb5-ccache=&quot;$krb_ccache_name&quot; $OU osName=&quot;$OS_NAME&quot; osVer=&quot;$OS_VER&quot;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>