Bug 14016 - samba-tool gpo list --help shows <usename> only
Summary: samba-tool gpo list --help shows <usename> only
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.10.4
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-27 10:53 UTC by Amit Kumar
Modified: 2020-05-14 09:43 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Amit Kumar 2019-06-27 10:53:50 UTC
--help shows username only option. 

While this command can retrieve GPOs for machine account also.

-------------------------------
# /usr/local/samba/bin/samba-tool gpo list --help
Usage: samba-tool gpo list <username> [options]

List GPOs for an account.
-------------------------------

-------------------------------
# /usr/local/samba/bin/samba-tool gpo list test-user-1
GPOs for user test-user-1
    test-Users-GPO-1 {8D86E985-594F-4D32-95E6-272647F9CDF4}
    Default Domain Policy {31B2F340-016D-11D2-945F-00C04FB984F9}
# /usr/local/samba/bin/samba-tool gpo list amitk-machine-2
GPOs for user amitk-machine-2
    test-Computers-GPO-1 {0C7EBE47-2264-4A4C-868C-B31CDDC999B5}
    Default Domain Policy {31B2F340-016D-11D2-945F-00C04FB984F9}
    Default Domain Policy {31B2F340-016D-11D2-945F-00C04FB984F9}
-------------------------------

Ask is:
1. We should update the help to include machinename, something as:
-------------------------------
# /usr/local/samba/bin/samba-tool gpo list --help
Usage: samba-tool gpo list <username|machinename> [options]

List GPOs for an account.
-------------------------------

2. Code uses an variable name 'username', this can be changed to 'accountname' to depict clear meaning.
python/samba/netcmd/gpo.py
class cmd_list(GPOCommand):
takes_args = ['username']
Comment 2 Rowland Penny 2020-05-14 09:43:11 UTC
Closing bug report, this has landed in master.