samba-tool: Display friendlier error message if no password is available
commit22c6629e16535e7a8014243ac519a7923c2cb3c1
authorJo Sutton <josutton@catalyst.net.nz>
Wed, 17 Jan 2024 22:26:34 +0000 (18 11:26 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 16 Feb 2024 02:41:36 +0000 (16 02:41 +0000)
tree21daf6e4111c83594672cbe8a548a028cb2f8640
parent75ca027f61de3e0d03ec931e907b06affa3d9fac
samba-tool: Display friendlier error message if no password is available

‘samba-tool user get-kerberos-ticket’ is supposed to display an error
message if no password is available. However, the conditions for which
the message is displayed are impossible to be met. If ‘utf16_pw’ is not
None, the message is not displayed; if ‘utf16_pw’ *is* None, ‘nt_pass’
is assigned with a samr.Password object, which is not None — and so the
message is still not displayed.

Signed-off-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/netcmd/user/readpasswords/get_kerberos_ticket.py