Project

General

Profile

Actions

Feature #15043

closed

smbadm - need ability to read credentials from stdin

Added by Toomas Soome 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
smb - SMB server and client
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:
racktop:BSR-10177

Description

Add support for scripting - when there is no controlling terminal, allow reading credentials from standard input.

Actions #1

Updated by Electric Monk 2 months ago

  • Gerrit CR set to 2418
Actions #2

Updated by Gordon Ross about 2 months ago

test instructions:

Put the password into a file somewhere. You could do this:
echo IncorrectPassword > /tmp/ghpw
I would then "unjoin" from contoso.com as such:
smbadm join -y -w WORKGROUP
I would then verify that you're not part of the domain thusly:
smbadm list
I would next try to use the new "get the password from stdin" feature (the meat of the test) in this fashion:
smbadm join -y -u Administrator contoso.com < /tmp/ghpw
It should try right away to join (without prompting you for a password). Since you put the incorrect password in there, it should fail.
You can verify the failure with this sequence:
smbadm list
I would then amend the password file with your correct password in this manner:
echo CorrectPassword > /tmp/ghpw
Next, I would try the join again. Hopefully this time it will succeed. Using smbadm list once again should demonstrate that you joined the domain with the password coming from stdin.
When you're done, don't forget to remove the /tmp/ghpw file.

Actions #3

Updated by Electric Monk about 2 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit de00d88e2173bf36f19125d522e5590c0f53cff0

commit  de00d88e2173bf36f19125d522e5590c0f53cff0
Author: Gordon Ross <gwr@racktopsystems.com>
Date:   2022-10-12T19:04:20.000Z

    15043 smbadm - need ability to read credentials from stdin
    Reviewed by: Matt Barden <mbarden@tintri.com>
    Approved by: Dan McDonald <danmcd@mnx.io>

Actions

Also available in: Atom PDF