Bug 44876 - New check `samba_tool_sysvolcheck.py`
New check `samba_tool_sysvolcheck.py`
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - System diagnostic
UCS 4.2
Other Linux
: P5 enhancement (vote)
: UCS 4.2-2-errata
Assigned To: Lukas Oyen
Arvid Requate
:
Depends on: 38217 44305
Blocks: 47579 47583
  Show dependency treegraph
 
Reported: 2017-06-27 17:53 CEST by Lukas Oyen
Modified: 2018-08-13 16:43 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Feature Request
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:
best: Patch_Available+


Attachments
nt-diagnostic-sysvolcheck-421.patch (6.17 KB, patch)
2017-06-27 17:53 CEST, Lukas Oyen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Oyen univentionstaff 2017-06-27 17:53:42 CEST
Created attachment 8974 [details]
nt-diagnostic-sysvolcheck-421.patch

Adds a new diagnostic check `samba_tool_sysvolcheck.py` which runs `samba-tool ntacl sysvolcheck`.

We might want to merge this with bug #40605 into a more general `samba-tool` check.
Comment 1 Lukas Oyen univentionstaff 2017-08-01 16:35:52 CEST
Committed in r81640 - r81641 (advisory r81649).
Comment 2 Florian Best univentionstaff 2017-08-01 18:57:32 CEST
Not sure if it's an error in "samba-tool ntacl sysvolcheck" or in this script. I get a traceback:

`samba-tool ntacl sysvolcheck` meldet ein Problem mit den SYSVOL ACL Einträgen.

STDOUT:
ERROR(): uncaught exception - (61, 'No data available')
  File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py", line 176, in _run
    return self.run(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/samba/netcmd/ntacl.py", line 270, in run
    lp)
  File "/usr/lib/python2.7/dist-packages/samba/provision/__init__.py", line 1732, in checksysvolacl
    fsacl = getntacl(lp, dir_path, direct_db_access=direct_db_access, service=SYSVOL_SERVICE)
  File "/usr/lib/python2.7/dist-packages/samba/ntacls.py", line 81, in getntacl
    xattr.XATTR_NTACL_NAME)
Comment 3 Lukas Oyen univentionstaff 2017-08-02 16:06:32 CEST
(In reply to Florian Best from comment #2)
> Not sure if it's an error in "samba-tool ntacl sysvolcheck" or in this
> script. I get a traceback:

This is a problem with samba-tool. Could you provide some more details about your environment? Maybe we can add some explanation in certain cases?
Comment 4 Florian Best univentionstaff 2017-08-02 16:08:15 CEST
You can have a look in my VM: 10.200.27.130
Comment 5 Lukas Oyen univentionstaff 2017-08-02 16:24:04 CEST
(In reply to Florian Best from comment #4)
> You can have a look in my VM: 10.200.27.130

See bug #44305.
Comment 6 Arvid Requate univentionstaff 2017-09-07 12:43:54 CEST
Ok, works
Comment 7 Arvid Requate univentionstaff 2017-09-07 14:36:39 CEST
Re-opening as a sign that we first should fix Bug #44305 before releasing this to the public.

Also I just thought that a "Fix it" button would be useful, which runs "samba-tool ntacl sysvolreset". We should check Bug #38217 for that first.
Comment 8 Lukas Oyen univentionstaff 2017-09-19 15:54:12 CEST
Implemented the `fix` in 45a3f09, YAML 2fface.
Comment 9 Arvid Requate univentionstaff 2017-09-19 17:35:07 CEST
Works, awesome!
Comment 10 Erik Damrose univentionstaff 2017-09-20 15:04:00 CEST
<http://errata.software-univention.de/ucs/4.2/166.html>