|
|
f441eb |
From 1457b4a7623a8ae58fb8d6a652d1cc44904b8863 Mon Sep 17 00:00:00 2001
|
|
|
f441eb |
From: Sumit Bose <sbose@redhat.com>
|
|
|
f441eb |
Date: Mon, 18 Mar 2019 11:02:57 +0100
|
|
|
f441eb |
Subject: [PATCH 1/2] create-user: add nis-domain option
|
|
|
f441eb |
|
|
|
f441eb |
Related to https://gitlab.freedesktop.org/realmd/adcli/issues/2
|
|
|
f441eb |
---
|
|
|
f441eb |
doc/adcli.xml | 8 ++++++++
|
|
|
f441eb |
tools/entry.c | 6 ++++++
|
|
|
f441eb |
2 files changed, 14 insertions(+)
|
|
|
f441eb |
|
|
|
f441eb |
diff --git a/doc/adcli.xml b/doc/adcli.xml
|
|
|
f441eb |
index 4722c3a..18620c0 100644
|
|
|
f441eb |
--- a/doc/adcli.xml
|
|
|
f441eb |
+++ b/doc/adcli.xml
|
|
|
f441eb |
@@ -531,6 +531,14 @@ $ adcli create-user Fry --domain=domain.example.com \
|
|
|
f441eb |
the new created user account, which should be the user's
|
|
|
f441eb |
numeric primary user id.</para></listitem>
|
|
|
f441eb |
</varlistentry>
|
|
|
f441eb |
+ <varlistentry>
|
|
|
f441eb |
+ <term><option>--nis-domain=<parameter>nis_domain</parameter></option></term>
|
|
|
f441eb |
+ <listitem><para>Set the msSFU30NisDomain attribute of
|
|
|
f441eb |
+ the new created user account, which should be the user's
|
|
|
f441eb |
+ NIS domain is the NIS/YP service of Active Directory's Services for Unix (SFU)
|
|
|
f441eb |
+ are used. This is needed to let the 'UNIX attributes' tab of older Active
|
|
|
f441eb |
+ Directoy versions show the set UNIX specific attributes.</para></listitem>
|
|
|
f441eb |
+ </varlistentry>
|
|
|
f441eb |
</variablelist>
|
|
|
f441eb |
|
|
|
f441eb |
</refsect1>
|
|
|
f441eb |
diff --git a/tools/entry.c b/tools/entry.c
|
|
|
f441eb |
index 7b6a200..69ce62c 100644
|
|
|
f441eb |
--- a/tools/entry.c
|
|
|
f441eb |
+++ b/tools/entry.c
|
|
|
f441eb |
@@ -52,6 +52,7 @@ typedef enum {
|
|
|
f441eb |
opt_unix_uid,
|
|
|
f441eb |
opt_unix_gid,
|
|
|
f441eb |
opt_unix_shell,
|
|
|
f441eb |
+ opt_nis_domain,
|
|
|
f441eb |
} Option;
|
|
|
f441eb |
|
|
|
f441eb |
static adcli_tool_desc common_usages[] = {
|
|
|
f441eb |
@@ -62,6 +63,7 @@ static adcli_tool_desc common_usages[] = {
|
|
|
f441eb |
{ opt_unix_uid, "unix uid number" },
|
|
|
f441eb |
{ opt_unix_gid, "unix gid number" },
|
|
|
f441eb |
{ opt_unix_shell, "unix shell" },
|
|
|
f441eb |
+ { opt_nis_domain, "NIS domain" },
|
|
|
f441eb |
{ opt_domain, "active directory domain name" },
|
|
|
f441eb |
{ opt_domain_realm, "kerberos realm for the domain" },
|
|
|
f441eb |
{ opt_domain_controller, "domain directory server to connect to" },
|
|
|
f441eb |
@@ -159,6 +161,7 @@ adcli_tool_user_create (adcli_conn *conn,
|
|
|
f441eb |
{ "unix-uid", required_argument, NULL, opt_unix_uid },
|
|
|
f441eb |
{ "unix-gid", required_argument, NULL, opt_unix_gid },
|
|
|
f441eb |
{ "unix-shell", required_argument, NULL, opt_unix_shell },
|
|
|
f441eb |
+ { "nis-domain", required_argument, NULL, opt_nis_domain },
|
|
|
f441eb |
{ "domain-ou", required_argument, NULL, opt_domain_ou },
|
|
|
f441eb |
{ "domain", required_argument, NULL, opt_domain },
|
|
|
f441eb |
{ "domain-realm", required_argument, NULL, opt_domain_realm },
|
|
|
f441eb |
@@ -200,6 +203,9 @@ adcli_tool_user_create (adcli_conn *conn,
|
|
|
f441eb |
case opt_unix_shell:
|
|
|
f441eb |
adcli_attrs_add (attrs, "loginShell", optarg, NULL);
|
|
|
f441eb |
break;
|
|
|
f441eb |
+ case opt_nis_domain:
|
|
|
f441eb |
+ adcli_attrs_add (attrs, "msSFU30NisDomain", optarg, NULL);
|
|
|
f441eb |
+ break;
|
|
|
f441eb |
case opt_domain_ou:
|
|
|
f441eb |
ou = optarg;
|
|
|
f441eb |
break;
|
|
|
f441eb |
--
|
|
|
f441eb |
2.20.1
|
|
|
f441eb |
|