summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStef Walter <stefw@redhat.com>2013-04-11 15:52:22 +0200
committerStef Walter <stefw@redhat.com>2013-04-17 23:04:15 +0200
commit7a3f6105e108312beb2997442ff74bba59c9684f (patch)
tree8400b6c8c0c1cd7503ff519aedf57a7da24e2db6 /tools
parentc2970e74a8568baca541b46efaa55ee53e38c7de (diff)
Add --user-principal argument for joining domains
This fills in the userPrincipalName attribute on the account https://bugs.freedesktop.org/show_bug.cgi?id=62755
Diffstat (limited to 'tools')
-rw-r--r--tools/computer.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/computer.c b/tools/computer.c
index e63f453..3f97e16 100644
--- a/tools/computer.c
+++ b/tools/computer.c
@@ -90,6 +90,7 @@ typedef enum {
opt_os_name,
opt_os_version,
opt_os_service_pack,
+ opt_user_principal,
} Option;
static adcli_tool_desc common_usages[] = {
@@ -114,6 +115,7 @@ static adcli_tool_desc common_usages[] = {
{ opt_os_name, "the computer operating system name", },
{ opt_os_version, "the computer operating system version", },
{ opt_os_service_pack, "the computer operating system service pack", },
+ { opt_user_principal, "add an authentication principal to the account", },
{ opt_no_password, "don't prompt for or read a password" },
{ opt_prompt_password, "prompt for a password if necessary" },
{ opt_stdin_password, "read a password from stdin (until EOF) if\n"
@@ -225,6 +227,12 @@ parse_option (Option opt,
case opt_os_service_pack:
adcli_enroll_set_os_service_pack (enroll, optarg);
return;
+ case opt_user_principal:
+ if (optarg && optarg[0])
+ adcli_enroll_set_user_principal (enroll, optarg);
+ else
+ adcli_enroll_auto_user_principal (enroll);
+ return;
case opt_verbose:
return;
@@ -282,6 +290,7 @@ adcli_tool_computer_join (adcli_conn *conn,
{ "os-name", optional_argument, NULL, opt_os_name },
{ "os-version", optional_argument, NULL, opt_os_version },
{ "os-service-pack", optional_argument, NULL, opt_os_service_pack },
+ { "user-principal", optional_argument, NULL, opt_user_principal },
{ "show-details", no_argument, NULL, opt_show_details },
{ "verbose", no_argument, NULL, opt_verbose },
{ "help", no_argument, NULL, 'h' },
@@ -371,6 +380,7 @@ adcli_tool_computer_preset (adcli_conn *conn,
{ "os-name", optional_argument, NULL, opt_os_name },
{ "os-version", optional_argument, NULL, opt_os_version },
{ "os-service-pack", optional_argument, NULL, opt_os_service_pack },
+ { "user-principal", no_argument, NULL, opt_user_principal },
{ "verbose", no_argument, NULL, opt_verbose },
{ "help", no_argument, NULL, 'h' },
{ 0 },