diff options
-rw-r--r-- | source4/scripting/python/samba/getopt.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/getopt.py b/source4/scripting/python/samba/getopt.py index 014dd336d8..87cf171ca2 100644 --- a/source4/scripting/python/samba/getopt.py +++ b/source4/scripting/python/samba/getopt.py @@ -42,12 +42,18 @@ class CredentialsOptions(optparse.OptionGroup): help="Password", type=str, callback=self.set_password) self.add_option("-U", "--username", metavar="USERNAME", action="callback", type=str, - help="username", callback=self.parse_username) + help="Username", callback=self.parse_username) + self.add_option("-W", "--workgroup", metavar="WORKGROUP", + action="callback", type=str, + help="Workgroup", callback=self.parse_workgroup) self.creds = Credentials() def parse_username(self, option, opt_str, arg, parser): self.creds.parse_string(arg) + def parse_workgroup(self, option, opt_str, arg, parser): + self.creds.set_domain(arg) + def set_password(self, option, opt_str, arg, parser): self.creds.set_password(arg) |