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

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

    <bug>
          <bug_id>55842</bug_id>
          
          <creation_ts>2025-09-02 18:52:31 +0300</creation_ts>
          <short_desc>samba-gpupdate: Перестал работать без указания пользователя: _ldb.LdbError: (32, &quot;Failed to find samAccountName &apos;root&apos;&quot;)</short_desc>
          <delta_ts>2025-10-10 15:21:45 +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>samba-gpupdate</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugzilla.altlinux.org/show_bug.cgi?id=55889</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="Evgeny Sinelnikov">sin</assigned_to>
          <cc>belayaav</cc>
    
    <cc>sin</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>271880</commentid>
    <comment_count>0</comment_count>
    <who name="Artem Varaksa">varaksaaa</who>
    <bug_when>2025-09-02 18:52:31 +0300</bug_when>
    <thetext>Шаги
====

1. Развернуть Samba DC или Windows AD DC.

2. Ввести клиента (с помощью SSSD) в домен, например:

# apt-get install -y task-auth-ad-sssd pwgen alterator-gpupdate &amp;&amp; \
    DOMAINNAME=&quot;samba.testdomain&quot; &amp;&amp; \
    SERVERIP=&lt;DC IP&gt; &amp;&amp; hostname=$(pwgen -1 -A) &amp;&amp; \
    hostnamectl set-hostname $hostname.${DOMAINNAME} &amp;&amp; \
    echo -e &quot;name_servers=${SERVERIP}\nsearch_domains=${DOMAINNAME}&quot; &gt;&gt; /etc/resolvconf.conf &amp;&amp; \
    reboot

# system-auth write ad &quot;samba.testdomain&quot; &quot;$(hostname --short)&quot; &quot;SAMBA&quot; Administrator &apos;$Password1&apos; --gpo &amp;&amp; \
    reboot

3. # apt-get install -y samba-gpupdate

4. # samba-gpupdate


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

&gt; Traceback (most recent call last):
&gt;   File &quot;/usr/sbin/samba-gpupdate&quot;, line 135, in &lt;module&gt;
&gt;     apply_gp(lp, creds, store, gp_extensions, username,
&gt;   File &quot;/usr/lib64/python3/site-packages/samba/gp/gpclass.py&quot;, line 1009, in apply_gp
&gt;     gpos = get_gpo_list(dc_hostname, creds, lp, username)
&gt;            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
&gt;   File &quot;/usr/lib64/python3/site-packages/samba/gp/gpclass.py&quot;, line 848, in get_gpo_list
&gt;     uac, dn = find_samaccount(samdb, username.split(&apos;\\&apos;)[-1])
&gt;               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
&gt;   File &quot;/usr/lib64/python3/site-packages/samba/gp/gpclass.py&quot;, line 697, in find_samaccount
&gt;     raise ldb.LdbError(ldb.ERR_NO_SUCH_OBJECT,
&gt; _ldb.LdbError: (32, &quot;Failed to find samAccountName &apos;root&apos;&quot;)


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

Успешное завершение.
При указании аргумента --rsop - вывод результата.


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

Если указать -Uadministrator, работает.


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

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

[sisyphus]
cepces-0.3.8-alt2.noarch
samba-4.21.7-alt4.x86_64
sssd-2.9.7-alt3.x86_64

[p11+387440.10]
cepces-0.3.8-alt2.noarch
samba-4.21.7-alt4.x86_64
sssd-2.9.7-alt3.x86_64

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

[p11]
cepces-0.3.8-alt2.noarch
samba-4.20.8-alt2.x86_64
sssd-2.9.7-alt1.x86_64</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>271881</commentid>
    <comment_count>1</comment_count>
    <who name="Artem Varaksa">varaksaaa</who>
    <bug_when>2025-09-02 18:56:23 +0300</bug_when>
    <thetext>&gt; Если указать -Uadministrator, работает.

Или любой другой пользователь, не обязательно администратор.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>271882</commentid>
    <comment_count>2</comment_count>
    <who name="Artem Varaksa">varaksaaa</who>
    <bug_when>2025-09-02 18:56:42 +0300</bug_when>
    <thetext>Пароль пользователя при этом не запрашивается.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>274200</commentid>
    <comment_count>3</comment_count>
    <who name="Белая Алёна">belayaav</who>
    <bug_when>2025-10-10 15:21:45 +0300</bug_when>
    <thetext>Ошибка актуальна
samba-4.21.8-alt3
cepces-0.3.8-alt2</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>