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