Bug 41557 - /usr/share/univention-directory-manager-tools/univention-passwd should show usage information and check for missing arguments
/usr/share/univention-directory-manager-tools/univention-passwd should show u...
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: UDM - CLI
UCS 4.1
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-06-14 12:34 CEST by Philipp Hahn
Modified: 2019-01-03 07:19 CET (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.034
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:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2016-06-14 12:34:33 CEST

    
Comment 1 Philipp Hahn univentionstaff 2016-06-14 12:34:56 CEST
# /usr/share/univention-directory-manager-tools/univention-passwd 
New password univention
Re-enter new password univention
Traceback (most recent call last):
  File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 226, in doit
    output = univention.admincli.passwd.doit(arglist)
  File "/usr/lib/pymodules/python2.7/univention/admincli/passwd.py", line 73, in doit
    bindpw=open(pwdfile).read()
TypeError: coercing to Unicode: need string or buffer, NoneType found
OPERATION FAILED
Comment 2 Philipp Hahn univentionstaff 2016-06-14 12:38:32 CEST
May, just maybe it should tell that it required some arguments:

# /usr/share/univention-admin-tools/univention-passwd --binddn "uid=admin,$(ucr get ldap/base)" --pwdfile "/etc/ldap.secret" --user Guest
New password univention
Re-enter new password univention
password changed
Comment 3 Florian Best univentionstaff 2016-06-14 12:43:01 CEST
There are lots of issues in that code:
no -h/--help
argparsing should be done using a library
password prompts shows the password
password prompts should be done when they are required
code-workarounds

The tool is afaik only used by Samba3. We should remove it asap.
Comment 4 Stefan Gohmann univentionstaff 2019-01-03 07:19:21 CET
This issue has been filled against UCS 4.1. The maintenance with bug and security fixes for UCS 4.1 has ended on 5st of April 2018.

Customers still on UCS 4.1 are encouraged to update to UCS 4.3. Please contact
your partner or Univention for any questions.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.