Bug 56556

Summary: Предложения по юзабилити
Product: Sisyphus Reporter: Anton Shevtsov <shevtsov.anton>
Component: samba-extension-laps-v2-schemaAssignee: august <august>
Status: NEW --- QA Contact: qa-sisyphus
Severity: normal    
Priority: P5 CC: amakeenk, august
Version: unstable   
Hardware: x86_64   
OS: Linux   

Description Anton Shevtsov 2025-10-22 13:42:17 MSK
1. Запуск без параметров приводит к ошибке

[root@dc apt]# /usr/bin/install-laps-v2-schema.py
Traceback (most recent call last):
  File "/usr/bin/install-laps-v2-schema.py", line 58, in <module>
    main()
  File "/usr/bin/install-laps-v2-schema.py", line 53, in main
    update_files(srcdir, tempdir, args.domain)
  File "/usr/bin/install-laps-v2-schema.py", line 21, in update_files
    content = content.replace("dc=mydomain,dc=lan", domain_name)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: replace() argument 2 must be str, not None

2. --help не содержит той информации, какая есть в README, в частности о форме указания опции --domain. Указав привычную форму - получил ошибку

[root@dc apt]# /usr/bin/install-laps-v2-schema.py --domain test.alt --samfile /var/lib/samba/private/sam.ldb
Error: Unable to parse dn 'CN=ms-LAPS-Encrypted-Password-Attributes,CN=Extended-Rights,cn=configuration,test.alt'
Added 0 records successfully
Error: Unable to parse dn 'CN=ms-LAPS-PasswordExpirationTime,CN=Schema,cn=configuration,test.alt'
Failed to parse ldif
Add failed after processing 0 records
Error: Unable to parse dn 'CN=computer,CN=Schema,cn=configuration,test.alt'
Modified 0 records successfully

3. Зачем вообще просить пользователя указывать корень, если мы указываем ldb. Корень можно и нужно взять оттуда

4. Повторный запуск порождает кучу ошибок, вместо лаконичного - like as "изменения же применены"