Discussion:
[Freeipa-users] AD trust with POSIX attributes
Jan Karásek
2016-06-21 11:55:54 UTC
Permalink
Hi all,

I have a questions about IPA with AD forest trust. What I am trying to do is setup environment, where all informations about users are stored in one place - AD. I would like to read at least uid, home, shell and sshkey from AD.

I have set up trust with this parameters:

ipa trust-add EXAMPLE.TT --type=ad --range-type=ipa-ad-trust-posix --admin=administrator

[***@ipa1 ~]# ipa idrange-show EXAMPLE.TT_id_range
Range name: EXAMPLE.TT_id_range
First Posix ID of the range: 1392000000
Number of IDs in the range: 200000
Domain SID of the trusted domain: S-1-5-21-4123312533-990676102-3576722756
Range type: Active Directory trust range with POSIX attributes


I have set attributes in AD for ***@EXAMPLE.TT
- uidNumber -10000
- homeDirectory -/home/user
- loginShell - /bin/bash

Trust itself works fine. I can do kinit with ***@EXAMPLE.TT , I can run id and getent passwd ***@example.tt and I can use ***@example.tt for ssh.

Problem is, that I am not getting uid from AD but from idrange:

uid=1392001107(***@example.tt)

Also I have tried to switch off id mapping in sssd.conf with ldap_id_mapping = true in sssd.conf but no luck.

I know, that it is probably better to use ID views for this, but in our case we need to set centrally managed environment, where all users information are externally inserted to AD from HR system - included POSIX attributes and we need IPA to read them from AD.

So my questions are:

Is it possible to read user's POSIX attributes directly from AD - namely uid ?
Which atributes can be stored in AD ?
Am I doing something wrong ?

my sssd.conf:
[domain/a.example.tt]
debug_level = 5
cache_credentials = True
krb5_store_password_if_offline = True
ipa_domain = a.example.tt
id_provider = ipa
auth_provider = ipa
access_provider = ipa
ipa_hostname = ipa1.a.example.tt
chpass_provider = ipa
ipa_server = ipa1.a.example.tt
ipa_server_mode = True
ldap_tls_cacert = /etc/ipa/ca.crt
#ldap_id_mapping = true
#subdomain_inherit = ldap_user_principal
#ldap_user_principal = nosuchattribute

[sssd]
services = nss, sudo, pam, ssh
config_file_version = 2

domains = a.example.tt
[nss]
debug_level = 5
homedir_substring = /home
enum_cache_timeout = 2
entry_negative_timeout = 2


[pam]
debug_level = 5
[sudo]

[autofs]

[ssh]
debug_level = 4
[pac]

debug_level = 4
[ifp]

Thanks,
Jan
Jakub Hrozek
2016-06-21 19:38:15 UTC
Permalink
Post by Jan Karásek
Hi all,
I have a questions about IPA with AD forest trust. What I am trying to do is setup environment, where all informations about users are stored in one place - AD. I would like to read at least uid, home, shell and sshkey from AD.
ipa trust-add EXAMPLE.TT --type=ad --range-type=ipa-ad-trust-posix --admin=administrator
Did you add the POSIX attributes to AD after creating the trust maybe?
Post by Jan Karásek
Range name: EXAMPLE.TT_id_range
First Posix ID of the range: 1392000000
Number of IDs in the range: 200000
Domain SID of the trusted domain: S-1-5-21-4123312533-990676102-3576722756
Range type: Active Directory trust range with POSIX attributes
- uidNumber -10000
- homeDirectory -/home/user
- loginShell - /bin/bash
Also I have tried to switch off id mapping in sssd.conf with ldap_id_mapping = true in sssd.conf but no luck.
This has no effect, in IPA-AD trust scenario, the id mapping properties
are managed on the server.
Post by Jan Karásek
I know, that it is probably better to use ID views for this, but in our case we need to set centrally managed environment, where all users information are externally inserted to AD from HR system - included POSIX attributes and we need IPA to read them from AD.
I think idviews are better for overriding POSIX attributes for a
specific set of hosts, but in your environment, it sounds like you want
to use the POSIX attributes across the board.
Post by Jan Karásek
Is it possible to read user's POSIX attributes directly from AD - namely uid ?
Yes
Post by Jan Karásek
Which atributes can be stored in AD ?
Homedir is a bit special, for backwards compatibility the
subdomains_homedir takes precedence. The others should be read from AD.

I don't have the environment set at the moment, though, so I'm operating
purely from memory.
Post by Jan Karásek
Am I doing something wrong ?
[domain/a.example.tt]
debug_level = 5
cache_credentials = True
krb5_store_password_if_offline = True
ipa_domain = a.example.tt
id_provider = ipa
auth_provider = ipa
access_provider = ipa
ipa_hostname = ipa1.a.example.tt
chpass_provider = ipa
ipa_server = ipa1.a.example.tt
ipa_server_mode = True
ldap_tls_cacert = /etc/ipa/ca.crt
#ldap_id_mapping = true
#subdomain_inherit = ldap_user_principal
#ldap_user_principal = nosuchattribute
[sssd]
services = nss, sudo, pam, ssh
config_file_version = 2
domains = a.example.tt
[nss]
debug_level = 5
homedir_substring = /home
enum_cache_timeout = 2
entry_negative_timeout = 2
[pam]
debug_level = 5
[sudo]
[autofs]
[ssh]
debug_level = 4
[pac]
debug_level = 4
[ifp]
Thanks,
Jan
--
https://www.redhat.com/mailman/listinfo/freeipa-users
Go to http://freeipa.org for more info on the project
--
Manage your subscription for the Freeipa-users mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-users
Go to http://freeipa.org for more info on the project
Jan Karásek
2016-06-23 11:31:09 UTC
Permalink
Hi,

thank you for the answers. May be I am doing something wrong.

1. AD attributes - I am using the standard set of user's attributes in AD - I did not extend the AD schema (2012 R2)
I am using set of attributes defined in RFS2307:
uidNumber
gidNumber
gecos
homeDirectory
loginShell
I am having troubles to find in documentation the names of attributes which IPA is able to read from AD . Could you please clarify if this is OK ?
Could you please point me to some doc ...? I have read the Windows integration guide, but there was not enough details ...

2. Do I need to fill in user's attributes values before the trust is set up ?

3. If using Idviews in this case I would have to somehow copy information stored in AD into id views a keep them updated, which is huge overhead when you have hundreds or thousands users. That is why I need to read them directly from AD.

4. Is it possible to change the already established trust -without --range-type=ipa-ad-trust-posix to trust with POSIX range ? I mean without breaking the trust and reestablishing new one ?
Thanks a lot,
Jan
Post by Jan Karásek
Hi all,
I have a questions about IPA with AD forest trust. What I am trying to do is setup environment, where all informations about users are stored in one place - AD. I would like to read at least uid, home, shell and sshkey from AD.
ipa trust-add EXAMPLE.TT --type=ad --range-type=ipa-ad-trust-posix --admin=administrator
Did you add the POSIX attributes to AD after creating the trust maybe?
Post by Jan Karásek
Range name: EXAMPLE.TT_id_range
First Posix ID of the range: 1392000000
Number of IDs in the range: 200000
Domain SID of the trusted domain: S-1-5-21-4123312533-990676102-3576722756
Range type: Active Directory trust range with POSIX attributes
- uidNumber -10000
- homeDirectory -/home/user
- loginShell - /bin/bash
Also I have tried to switch off id mapping in sssd.conf with ldap_id_mapping = true in sssd.conf but no luck.
This has no effect, in IPA-AD trust scenario, the id mapping properties
are managed on the server.
Post by Jan Karásek
I know, that it is probably better to use ID views for this, but in our case we need to set centrally managed environment, where all users information are externally inserted to AD from HR system - included POSIX attributes and we need IPA to read them from AD.
I think idviews are better for overriding POSIX attributes for a
specific set of hosts, but in your environment, it sounds like you want
to use the POSIX attributes across the board.
Post by Jan Karásek
Is it possible to read user's POSIX attributes directly from AD - namely uid ?
Yes
Post by Jan Karásek
Which atributes can be stored in AD ?
Homedir is a bit special, for backwards compatibility the
subdomains_homedir takes precedence. The others should be read from AD.

I don't have the environment set at the moment, though, so I'm operating
purely from memory.
Post by Jan Karásek
Am I doing something wrong ?
[domain/a.example.tt]
debug_level = 5
cache_credentials = True
krb5_store_password_if_offline = True
ipa_domain = a.example.tt
id_provider = ipa
auth_provider = ipa
access_provider = ipa
ipa_hostname = ipa1.a.example.tt
chpass_provider = ipa
ipa_server = ipa1.a.example.tt
ipa_server_mode = True
ldap_tls_cacert = /etc/ipa/ca.crt
#ldap_id_mapping = true
#subdomain_inherit = ldap_user_principal
#ldap_user_principal = nosuchattribute
[sssd]
services = nss, sudo, pam, ssh
config_file_version = 2
domains = a.example.tt
[nss]
debug_level = 5
homedir_substring = /home
enum_cache_timeout = 2
entry_negative_timeout = 2
[pam]
debug_level = 5
[sudo]
[autofs]
[ssh]
debug_level = 4
[pac]
debug_level = 4
[ifp]
Thanks,
Jan
Jakub Hrozek
2016-06-23 17:54:52 UTC
Permalink
Post by Jan Karásek
Hi,
thank you for the answers. May be I am doing something wrong.
1. AD attributes - I am using the standard set of user's attributes in AD - I did not extend the AD schema (2012 R2)
uidNumber
gidNumber
gecos
homeDirectory
loginShell
I am having troubles to find in documentation the names of attributes which IPA is able to read from AD . Could you please clarify if this is OK ?
Could you please point me to some doc ...? I have read the Windows integration guide, but there was not enough details ...
This is not well documented, but it's easy enough to read from the code:
https://github.com/SSSD/sssd/blob/master/src/providers/ad/ad_opts.c
Post by Jan Karásek
2. Do I need to fill in user's attributes values before the trust is set up ?
If you do, then IPA would detect the POSIX attributes during trust/range
creation.
Post by Jan Karásek
3. If using Idviews in this case I would have to somehow copy information stored in AD into id views a keep them updated, which is huge overhead when you have hundreds or thousands users. That is why I need to read them directly from AD.
I don't think you need to, idviews are really meant more for migration
deployments. It seems like you want to use all POSIX attributes from AD,
so it would be easiest to let IPA detect them and use by default on all
hosts.
Post by Jan Karásek
4. Is it possible to change the already established trust -without --range-type=ipa-ad-trust-posix to trust with POSIX range ? I mean without breaking the trust and reestablishing new one ?
You can remove the existing range and create a new one, but because
there is really no 'cost' to re-establishing the trust, I think it would
be easiest to just remove the trust and the range and create them again,
just to let the IPA tool do their work.

btw in SSSD we don't handle renumbering users well, so you'll need to
remove the caches on the clients as well.
--
Manage your subscription for the Freeipa-users mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-users
Go to http://freeipa.org for more info on the project
Jan Karásek
2016-07-19 13:44:44 UTC
Permalink
Hi,

I am still fighting with storing user's POSIX attributes in AD. Please can anybody provide some simple reference settings of IPA-AD trust where users are able to get uid from AD - not from IPA ID pool ?

I have tried to set values of attributes before and after creating trust, I have tried different sssd setting but I'm still getting uid from IPA idrange pool instead of from AD user's attribute.

What exactly is IPA checking when it tries to decide what type of trust will be set - ['ipa-ad-trust-posix', 'ipa-ad-trust'] ?

Do I have to mandatory fill some AD user's attributes to get it work ? Currently I'am testing just with uidNumber and gidNumber.

There is almost no documentation about this topic so I don't know what else I can try ...

Thanks for help,

Jan



Date: Tue, 21 Jun 2016 21:38:15 +0200
From: Jakub Hrozek <***@redhat.com>
To: freeipa-***@redhat.com
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
Message-ID: <***@hendrix>
Content-Type: text/plain; charset=iso-8859-1
Post by Jan Karásek
Hi all,
I have a questions about IPA with AD forest trust. What I am trying to do is setup environment, where all informations about users are stored in one place - AD. I would like to read at least uid, home, shell and sshkey from AD.
ipa trust-add EXAMPLE.TT --type=ad --range-type=ipa-ad-trust-posix --admin=administrator
Did you add the POSIX attributes to AD after creating the trust maybe?
Post by Jan Karásek
Range name: EXAMPLE.TT_id_range
First Posix ID of the range: 1392000000
Number of IDs in the range: 200000
Domain SID of the trusted domain: S-1-5-21-4123312533-990676102-3576722756
Range type: Active Directory trust range with POSIX attributes
- uidNumber -10000
- homeDirectory -/home/user
- loginShell - /bin/bash
Also I have tried to switch off id mapping in sssd.conf with ldap_id_mapping = true in sssd.conf but no luck.
This has no effect, in IPA-AD trust scenario, the id mapping properties
are managed on the server.
Post by Jan Karásek
I know, that it is probably better to use ID views for this, but in our case we need to set centrally managed environment, where all users information are externally inserted to AD from HR system - included POSIX attributes and we need IPA to read them from AD.
I think idviews are better for overriding POSIX attributes for a
specific set of hosts, but in your environment, it sounds like you want
to use the POSIX attributes across the board.
Post by Jan Karásek
Is it possible to read user's POSIX attributes directly from AD - namely uid ?
Yes
Post by Jan Karásek
Which atributes can be stored in AD ?
Homedir is a bit special, for backwards compatibility the
subdomains_homedir takes precedence. The others should be read from AD.

I don't have the environment set at the moment, though, so I'm operating
purely from memory.
Post by Jan Karásek
Am I doing something wrong ?
[domain/a.example.tt]
debug_level = 5
cache_credentials = True
krb5_store_password_if_offline = True
ipa_domain = a.example.tt
id_provider = ipa
auth_provider = ipa
access_provider = ipa
ipa_hostname = ipa1.a.example.tt
chpass_provider = ipa
ipa_server = ipa1.a.example.tt
ipa_server_mode = True
ldap_tls_cacert = /etc/ipa/ca.crt
#ldap_id_mapping = true
#subdomain_inherit = ldap_user_principal
#ldap_user_principal = nosuchattribute
[sssd]
services = nss, sudo, pam, ssh
config_file_version = 2
domains = a.example.tt
[nss]
debug_level = 5
homedir_substring = /home
enum_cache_timeout = 2
entry_negative_timeout = 2
[pam]
debug_level = 5
[sudo]
[autofs]
[ssh]
debug_level = 4
[pac]
debug_level = 4
[ifp]
Thanks,
Jan
Justin Stephenson
2016-07-19 18:36:00 UTC
Permalink
Hello,

When adding the AD trust using 'ipa-ad-trust-posix' range type then IPA
will search AD for the ID space of existing POSIX attributes to
automatically create a suitable ID range inside IPA.

You can check the exact steps and attributes searched by looking at the
add_range function definition in
/usr/lib/python2.7/site-packages/ipalib/plugins/trust.py

I would suggest reviewing the output of 'ipa idrange-find' to confirm
that the range matches up with the uid and gidNumbers of your AD
environment.

Kind regards,
Justin Stephenson
Post by Jan Karásek
Hi,
I am still fighting with storing user's POSIX attributes in AD. Please
can anybody provide some simple reference settings of IPA-AD trust
where users are able to get uid from AD - not from IPA ID pool ?
I have tried to set values of attributes before and after creating
trust, I have tried different sssd setting but I'm still getting uid
from IPA idrange pool instead of from AD user's attribute.
What exactly is IPA checking when it tries to decide what type of
trust will be set - ['ipa-ad-trust-posix', 'ipa-ad-trust'] ?
Do I have to mandatory fill some AD user's attributes to get it work ?
Currently I'am testing just with uidNumber and gidNumber.
There is almost no documentation about this topic so I don't know what else I can try ...
Thanks for help,
Jan
------------------------------------------------------------------------
Date: Tue, 21 Jun 2016 21:38:15 +0200
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
Content-Type: text/plain; charset=iso-8859-1
Post by Jan Karásek
Hi all,
I have a questions about IPA with AD forest trust. What I am trying
to do is setup environment, where all informations about users are
stored in one place - AD. I would like to read at least uid, home,
shell and sshkey from AD.
Post by Jan Karásek
ipa trust-add EXAMPLE.TT --type=ad --range-type=ipa-ad-trust-posix
--admin=administrator
Did you add the POSIX attributes to AD after creating the trust maybe?
Post by Jan Karásek
Range name: EXAMPLE.TT_id_range
First Posix ID of the range: 1392000000
Number of IDs in the range: 200000
S-1-5-21-4123312533-990676102-3576722756
Post by Jan Karásek
Range type: Active Directory trust range with POSIX attributes
- uidNumber -10000
- homeDirectory -/home/user
- loginShell - /bin/bash
for ssh.
Post by Jan Karásek
Also I have tried to switch off id mapping in sssd.conf with
ldap_id_mapping = true in sssd.conf but no luck.
This has no effect, in IPA-AD trust scenario, the id mapping properties
are managed on the server.
Post by Jan Karásek
I know, that it is probably better to use ID views for this, but in
our case we need to set centrally managed environment, where all users
information are externally inserted to AD from HR system - included
POSIX attributes and we need IPA to read them from AD.
I think idviews are better for overriding POSIX attributes for a
specific set of hosts, but in your environment, it sounds like you want
to use the POSIX attributes across the board.
Post by Jan Karásek
Is it possible to read user's POSIX attributes directly from AD -
namely uid ?
Yes
Post by Jan Karásek
Which atributes can be stored in AD ?
Homedir is a bit special, for backwards compatibility the
subdomains_homedir takes precedence. The others should be read from AD.
I don't have the environment set at the moment, though, so I'm operating
purely from memory.
Post by Jan Karásek
Am I doing something wrong ?
[domain/a.example.tt]
debug_level = 5
cache_credentials = True
krb5_store_password_if_offline = True
ipa_domain = a.example.tt
id_provider = ipa
auth_provider = ipa
access_provider = ipa
ipa_hostname = ipa1.a.example.tt
chpass_provider = ipa
ipa_server = ipa1.a.example.tt
ipa_server_mode = True
ldap_tls_cacert = /etc/ipa/ca.crt
#ldap_id_mapping = true
#subdomain_inherit = ldap_user_principal
#ldap_user_principal = nosuchattribute
[sssd]
services = nss, sudo, pam, ssh
config_file_version = 2
domains = a.example.tt
[nss]
debug_level = 5
homedir_substring = /home
enum_cache_timeout = 2
entry_negative_timeout = 2
[pam]
debug_level = 5
[sudo]
[autofs]
[ssh]
debug_level = 4
[pac]
debug_level = 4
[ifp]
Thanks,
Jan
Jan Karásek
2016-07-20 12:15:47 UTC
Permalink
Hi,

thank you for the hint.

In the /usr/lib/python2.7/site-packages/ipalib/plugins/trust.py:

It's working with msSFU30MaxUidNumber and msSFU30OrderNumber.

If I understand it right, it is base uid number and the number of uids in range.

If not discovered nor given via CLI, then it generate random base and add some default_range_size.

So these two attributes must be set to use ipa-ad-trust-posix range ?

Could anybody help me how and where to check these attributes ? I have looked in the ldapsearch dump from my AD(Global calaog) and I can see these attributes only in schema - so no values assigned.
I'm using W2012 R2.

Thank you,
Jan



From: "Justin Stephenson" <***@redhat.com>
To: "Jan Karásek" <***@elostech.cz>, freeipa-***@redhat.com
Sent: Tuesday, July 19, 2016 8:36:00 PM
Subject: Re: [Freeipa-users] AD trust with POSIX attributes

Hello,

When adding the AD trust using 'ipa-ad-trust-posix' range type then IPA will search AD for the ID space of existing POSIX attributes to automatically create a suitable ID range inside IPA.

You can check the exact steps and attributes searched by looking at the add_range function definition in /usr/lib/python2.7/site-packages/ipalib/plugins/trust.py

I would suggest reviewing the output of 'ipa idrange-find' to confirm that the range matches up with the uid and gidNumbers of your AD environment.

Kind regards,
Justin Stephenson

On 07/19/2016 09:44 AM, Jan Karásek wrote:



Hi,

I am still fighting with storing user's POSIX attributes in AD. Please can anybody provide some simple reference settings of IPA-AD trust where users are able to get uid from AD - not from IPA ID pool ?

I have tried to set values of attributes before and after creating trust, I have tried different sssd setting but I'm still getting uid from IPA idrange pool instead of from AD user's attribute.

What exactly is IPA checking when it tries to decide what type of trust will be set - ['ipa-ad-trust-posix', 'ipa-ad-trust'] ?

Do I have to mandatory fill some AD user's attributes to get it work ? Currently I'am testing just with uidNumber and gidNumber.

There is almost no documentation about this topic so I don't know what else I can try ...

Thanks for help,

Jan



Date: Tue, 21 Jun 2016 21:38:15 +0200
From: Jakub Hrozek <***@redhat.com>
To: freeipa-***@redhat.com
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
Message-ID: <***@hendrix>
Content-Type: text/plain; charset=iso-8859-1
Post by Jan Karásek
Hi all,
I have a questions about IPA with AD forest trust. What I am trying to do is setup environment, where all informations about users are stored in one place - AD. I would like to read at least uid, home, shell and sshkey from AD.
ipa trust-add EXAMPLE.TT --type=ad --range-type=ipa-ad-trust-posix --admin=administrator
Did you add the POSIX attributes to AD after creating the trust maybe?
Post by Jan Karásek
Range name: EXAMPLE.TT_id_range
First Posix ID of the range: 1392000000
Number of IDs in the range: 200000
Domain SID of the trusted domain: S-1-5-21-4123312533-990676102-3576722756
Range type: Active Directory trust range with POSIX attributes
- uidNumber -10000
- homeDirectory -/home/user
- loginShell - /bin/bash
Also I have tried to switch off id mapping in sssd.conf with ldap_id_mapping = true in sssd.conf but no luck.
This has no effect, in IPA-AD trust scenario, the id mapping properties
are managed on the server.
Post by Jan Karásek
I know, that it is probably better to use ID views for this, but in our case we need to set centrally managed environment, where all users information are externally inserted to AD from HR system - included POSIX attributes and we need IPA to read them from AD.
I think idviews are better for overriding POSIX attributes for a
specific set of hosts, but in your environment, it sounds like you want
to use the POSIX attributes across the board.
Post by Jan Karásek
Is it possible to read user's POSIX attributes directly from AD - namely uid ?
Yes
Post by Jan Karásek
Which atributes can be stored in AD ?
Homedir is a bit special, for backwards compatibility the
subdomains_homedir takes precedence. The others should be read from AD.

I don't have the environment set at the moment, though, so I'm operating
purely from memory.
Post by Jan Karásek
Am I doing something wrong ?
[domain/a.example.tt]
debug_level = 5
cache_credentials = True
krb5_store_password_if_offline = True
ipa_domain = a.example.tt
id_provider = ipa
auth_provider = ipa
access_provider = ipa
ipa_hostname = ipa1.a.example.tt
chpass_provider = ipa
ipa_server = ipa1.a.example.tt
ipa_server_mode = True
ldap_tls_cacert = /etc/ipa/ca.crt
#ldap_id_mapping = true
#subdomain_inherit = ldap_user_principal
#ldap_user_principal = nosuchattribute
[sssd]
services = nss, sudo, pam, ssh
config_file_version = 2
domains = a.example.tt
[nss]
debug_level = 5
homedir_substring = /home
enum_cache_timeout = 2
entry_negative_timeout = 2
[pam]
debug_level = 5
[sudo]
[autofs]
[ssh]
debug_level = 4
[pac]
debug_level = 4
[ifp]
Thanks,
Jan
Justin Stephenson
2016-07-20 14:09:02 UTC
Permalink
These attributes should be available from port 389 and not the global
catalog, please try a command such as:

ldapsearch -H ldap://<ip-address> -D "DOMAIN\Administrator" -W -b
"cn=ypservers,cn=ypserv30,cn=rpcservices,CN=System,dc=example,dc=com"
msSFU30OrderNumber msSFU30MaxUidNumber msSFU30MaxGidNumber


Replacing the root suffix in the search base, the ip-address and bind
credentials.

Kind regards,
Justin Stephenson
Post by Jan Karásek
Hi,
thank you for the hint.
It's working with msSFU30MaxUidNumber and msSFU30OrderNumber.
If I understand it right, it is base uid number and the number of uids in range.
If not discovered nor given via CLI, then it generate random base and
add some default_range_size.
So these two attributes must be set to use ipa-ad-trust-posix range ?
Could anybody help me how and where to check these attributes ? I have
looked in the ldapsearch dump from my AD(Global calaog) and I can see
these attributes only in schema - so no values assigned.
I'm using W2012 R2.
Thank you,
Jan
------------------------------------------------------------------------
*Sent: *Tuesday, July 19, 2016 8:36:00 PM
*Subject: *Re: [Freeipa-users] AD trust with POSIX attributes
Hello,
When adding the AD trust using 'ipa-ad-trust-posix' range type then
IPA will search AD for the ID space of existing POSIX attributes to
automatically create a suitable ID range inside IPA.
You can check the exact steps and attributes searched by looking at
the add_range function definition in
/usr/lib/python2.7/site-packages/ipalib/plugins/trust.py
I would suggest reviewing the output of 'ipa idrange-find' to confirm
that the range matches up with the uid and gidNumbers of your AD
environment.
Kind regards,
Justin Stephenson
Hi,
I am still fighting with storing user's POSIX attributes in AD.
Please can anybody provide some simple reference settings of
IPA-AD trust where users are able to get uid from AD - not from
IPA ID pool ?
I have tried to set values of attributes before and after creating
trust, I have tried different sssd setting but I'm still getting
uid from IPA idrange pool instead of from AD user's attribute.
What exactly is IPA checking when it tries to decide what type of
trust will be set - ['ipa-ad-trust-posix', 'ipa-ad-trust'] ?
Do I have to mandatory fill some AD user's attributes to get it
work ? Currently I'am testing just with uidNumber and gidNumber.
There is almost no documentation about this topic so I don't know
what else I can try ...
Thanks for help,
Jan
------------------------------------------------------------------------
Date: Tue, 21 Jun 2016 21:38:15 +0200
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
Content-Type: text/plain; charset=iso-8859-1
Post by Jan Karásek
Hi all,
I have a questions about IPA with AD forest trust. What I am
trying to do is setup environment, where all informations about
users are stored in one place - AD. I would like to read at least
uid, home, shell and sshkey from AD.
Post by Jan Karásek
ipa trust-add EXAMPLE.TT --type=ad
--range-type=ipa-ad-trust-posix --admin=administrator
Did you add the POSIX attributes to AD after creating the trust maybe?
Post by Jan Karásek
Range name: EXAMPLE.TT_id_range
First Posix ID of the range: 1392000000
Number of IDs in the range: 200000
S-1-5-21-4123312533-990676102-3576722756
Post by Jan Karásek
Range type: Active Directory trust range with POSIX attributes
- uidNumber -10000
- homeDirectory -/home/user
- loginShell - /bin/bash
Also I have tried to switch off id mapping in sssd.conf with
ldap_id_mapping = true in sssd.conf but no luck.
This has no effect, in IPA-AD trust scenario, the id mapping properties
are managed on the server.
Post by Jan Karásek
I know, that it is probably better to use ID views for this, but
in our case we need to set centrally managed environment, where
all users information are externally inserted to AD from HR system
- included POSIX attributes and we need IPA to read them from AD.
I think idviews are better for overriding POSIX attributes for a
specific set of hosts, but in your environment, it sounds like you want
to use the POSIX attributes across the board.
Post by Jan Karásek
Is it possible to read user's POSIX attributes directly from AD
- namely uid ?
Yes
Post by Jan Karásek
Which atributes can be stored in AD ?
Homedir is a bit special, for backwards compatibility the
subdomains_homedir takes precedence. The others should be read from AD.
I don't have the environment set at the moment, though, so I'm operating
purely from memory.
Post by Jan Karásek
Am I doing something wrong ?
[domain/a.example.tt]
debug_level = 5
cache_credentials = True
krb5_store_password_if_offline = True
ipa_domain = a.example.tt
id_provider = ipa
auth_provider = ipa
access_provider = ipa
ipa_hostname = ipa1.a.example.tt
chpass_provider = ipa
ipa_server = ipa1.a.example.tt
ipa_server_mode = True
ldap_tls_cacert = /etc/ipa/ca.crt
#ldap_id_mapping = true
#subdomain_inherit = ldap_user_principal
#ldap_user_principal = nosuchattribute
[sssd]
services = nss, sudo, pam, ssh
config_file_version = 2
domains = a.example.tt
[nss]
debug_level = 5
homedir_substring = /home
enum_cache_timeout = 2
entry_negative_timeout = 2
[pam]
debug_level = 5
[sudo]
[autofs]
[ssh]
debug_level = 4
[pac]
debug_level = 4
[ifp]
Thanks,
Jan
Jan Karásek
2016-07-20 15:30:38 UTC
Permalink
Hi,

thank you.

ldapsearch reply:

search: 2
result: 32 No such object
matchedDN: CN=RpcServices,CN=System,DC=rwe,DC=tt
text: 0000208D: NameErr: DSID-03100238, problem 2001 (NO_OBJECT), data 0, best
match of:
'CN=RpcServices,CN=System,DC=rwe,DC=tt'

actually when I look under the CN=RpcServices,CN=System,DC=rwe,DC=tt - it is empty.

Do I missed to set something on the AD site ?

Thanks,
Jan







From: "Justin Stephenson" <***@redhat.com>
To: "Jan Karásek" <***@elostech.cz>
Cc: freeipa-***@redhat.com
Sent: Wednesday, July 20, 2016 4:09:02 PM
Subject: Re: [Freeipa-users] AD trust with POSIX attributes



These attributes should be available from port 389 and not the global catalog, please try a command such as:

ldapsearch -H ldap:// <ip-address> -D "DOMAIN\Administrator" -W -b "cn=ypservers,cn=ypserv30,cn=rpcservices,CN=System,dc=example,dc=com" msSFU30OrderNumber msSFU30MaxUidNumber msSFU30MaxGidNumber

Replacing the root suffix in the search base, the ip-address and bind credentials.

Kind regards,
Justin Stephenson

On 07/20/2016 08:15 AM, Jan Karásek wrote:



Hi,

thank you for the hint.

In the /usr/lib/python2.7/site-packages/ipalib/plugins/trust.py:

It's working with msSFU30MaxUidNumber and msSFU30OrderNumber.

If I understand it right, it is base uid number and the number of uids in range.

If not discovered nor given via CLI, then it generate random base and add some default_range_size.

So these two attributes must be set to use ipa-ad-trust-posix range ?

Could anybody help me how and where to check these attributes ? I have looked in the ldapsearch dump from my AD(Global calaog) and I can see these attributes only in schema - so no values assigned.
I'm using W2012 R2.

Thank you,
Jan



From: "Justin Stephenson" <***@redhat.com>
To: "Jan Karásek" <***@elostech.cz> , freeipa-***@redhat.com
Sent: Tuesday, July 19, 2016 8:36:00 PM
Subject: Re: [Freeipa-users] AD trust with POSIX attributes

Hello,

When adding the AD trust using 'ipa-ad-trust-posix' range type then IPA will search AD for the ID space of existing POSIX attributes to automatically create a suitable ID range inside IPA.

You can check the exact steps and attributes searched by looking at the add_range function definition in /usr/lib/python2.7/site-packages/ipalib/plugins/trust.py

I would suggest reviewing the output of 'ipa idrange-find' to confirm that the range matches up with the uid and gidNumbers of your AD environment.

Kind regards,
Justin Stephenson

On 07/19/2016 09:44 AM, Jan Karásek wrote:

BQ_BEGIN

Hi,

I am still fighting with storing user's POSIX attributes in AD. Please can anybody provide some simple reference settings of IPA-AD trust where users are able to get uid from AD - not from IPA ID pool ?

I have tried to set values of attributes before and after creating trust, I have tried different sssd setting but I'm still getting uid from IPA idrange pool instead of from AD user's attribute.

What exactly is IPA checking when it tries to decide what type of trust will be set - ['ipa-ad-trust-posix', 'ipa-ad-trust'] ?

Do I have to mandatory fill some AD user's attributes to get it work ? Currently I'am testing just with uidNumber and gidNumber.

There is almost no documentation about this topic so I don't know what else I can try ...

Thanks for help,

Jan



Date: Tue, 21 Jun 2016 21:38:15 +0200
From: Jakub Hrozek <***@redhat.com>
To: freeipa-***@redhat.com
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
Message-ID: <***@hendrix>
Content-Type: text/plain; charset=iso-8859-1
Post by Jan Karásek
Hi all,
I have a questions about IPA with AD forest trust. What I am trying to do is setup environment, where all informations about users are stored in one place - AD. I would like to read at least uid, home, shell and sshkey from AD.
ipa trust-add EXAMPLE.TT --type=ad --range-type=ipa-ad-trust-posix --admin=administrator
Did you add the POSIX attributes to AD after creating the trust maybe?
Post by Jan Karásek
Range name: EXAMPLE.TT_id_range
First Posix ID of the range: 1392000000
Number of IDs in the range: 200000
Domain SID of the trusted domain: S-1-5-21-4123312533-990676102-3576722756
Range type: Active Directory trust range with POSIX attributes
- uidNumber -10000
- homeDirectory -/home/user
- loginShell - /bin/bash
Also I have tried to switch off id mapping in sssd.conf with ldap_id_mapping = true in sssd.conf but no luck.
This has no effect, in IPA-AD trust scenario, the id mapping properties
are managed on the server.
Post by Jan Karásek
I know, that it is probably better to use ID views for this, but in our case we need to set centrally managed environment, where all users information are externally inserted to AD from HR system - included POSIX attributes and we need IPA to read them from AD.
I think idviews are better for overriding POSIX attributes for a
specific set of hosts, but in your environment, it sounds like you want
to use the POSIX attributes across the board.
Post by Jan Karásek
Is it possible to read user's POSIX attributes directly from AD - namely uid ?
Yes
Post by Jan Karásek
Which atributes can be stored in AD ?
Homedir is a bit special, for backwards compatibility the
subdomains_homedir takes precedence. The others should be read from AD.

I don't have the environment set at the moment, though, so I'm operating
purely from memory.
Post by Jan Karásek
Am I doing something wrong ?
[domain/a.example.tt]
debug_level = 5
cache_credentials = True
krb5_store_password_if_offline = True
ipa_domain = a.example.tt
id_provider = ipa
auth_provider = ipa
access_provider = ipa
ipa_hostname = ipa1.a.example.tt
chpass_provider = ipa
ipa_server = ipa1.a.example.tt
ipa_server_mode = True
ldap_tls_cacert = /etc/ipa/ca.crt
#ldap_id_mapping = true
#subdomain_inherit = ldap_user_principal
#ldap_user_principal = nosuchattribute
[sssd]
services = nss, sudo, pam, ssh
config_file_version = 2
domains = a.example.tt
[nss]
debug_level = 5
homedir_substring = /home
enum_cache_timeout = 2
entry_negative_timeout = 2
[pam]
debug_level = 5
[sudo]
[autofs]
[ssh]
debug_level = 4
[pac]
debug_level = 4
[ifp]
Thanks,
Jan
BQ_END
Alexander Bokovoy
2016-07-20 16:06:29 UTC
Permalink
Post by Jan Karásek
Hi,
thank you.
search: 2
result: 32 No such object
matchedDN: CN=RpcServices,CN=System,DC=rwe,DC=tt
text: 0000208D: NameErr: DSID-03100238, problem 2001 (NO_OBJECT), data 0, best
'CN=RpcServices,CN=System,DC=rwe,DC=tt'
actually when I look under the CN=RpcServices,CN=System,DC=rwe,DC=tt - it is empty.
Do I missed to set something on the AD site ?
Yes. You need to setup IDMU. However, in Windows Server 2016 Microsoft
removed IDMU tools. The LDAP schema will stay but there will
be no means to visually edit POSIX attributes.

https://blogs.technet.microsoft.com/activedirectoryua/2016/02/09/identity-management-for-unix-idmu-is-deprecated-in-windows-server/
Post by Jan Karásek
Thanks,
Jan
Sent: Wednesday, July 20, 2016 4:09:02 PM
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
ldapsearch -H ldap:// <ip-address> -D "DOMAIN\Administrator" -W -b "cn=ypservers,cn=ypserv30,cn=rpcservices,CN=System,dc=example,dc=com" msSFU30OrderNumber msSFU30MaxUidNumber msSFU30MaxGidNumber
Replacing the root suffix in the search base, the ip-address and bind credentials.
Kind regards,
Justin Stephenson
Hi,
thank you for the hint.
It's working with msSFU30MaxUidNumber and msSFU30OrderNumber.
If I understand it right, it is base uid number and the number of uids in range.
If not discovered nor given via CLI, then it generate random base and add some default_range_size.
So these two attributes must be set to use ipa-ad-trust-posix range ?
Could anybody help me how and where to check these attributes ? I have looked in the ldapsearch dump from my AD(Global calaog) and I can see these attributes only in schema - so no values assigned.
I'm using W2012 R2.
Thank you,
Jan
Sent: Tuesday, July 19, 2016 8:36:00 PM
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
Hello,
When adding the AD trust using 'ipa-ad-trust-posix' range type then IPA will search AD for the ID space of existing POSIX attributes to automatically create a suitable ID range inside IPA.
You can check the exact steps and attributes searched by looking at the add_range function definition in /usr/lib/python2.7/site-packages/ipalib/plugins/trust.py
I would suggest reviewing the output of 'ipa idrange-find' to confirm that the range matches up with the uid and gidNumbers of your AD environment.
Kind regards,
Justin Stephenson
BQ_BEGIN
Hi,
I am still fighting with storing user's POSIX attributes in AD. Please can anybody provide some simple reference settings of IPA-AD trust where users are able to get uid from AD - not from IPA ID pool ?
I have tried to set values of attributes before and after creating trust, I have tried different sssd setting but I'm still getting uid from IPA idrange pool instead of from AD user's attribute.
What exactly is IPA checking when it tries to decide what type of trust will be set - ['ipa-ad-trust-posix', 'ipa-ad-trust'] ?
Do I have to mandatory fill some AD user's attributes to get it work ? Currently I'am testing just with uidNumber and gidNumber.
There is almost no documentation about this topic so I don't know what else I can try ...
Thanks for help,
Jan
Date: Tue, 21 Jun 2016 21:38:15 +0200
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
Content-Type: text/plain; charset=iso-8859-1
Post by Jan Karásek
Hi all,
I have a questions about IPA with AD forest trust. What I am trying to do is setup environment, where all informations about users are stored in one place - AD. I would like to read at least uid, home, shell and sshkey from AD.
ipa trust-add EXAMPLE.TT --type=ad --range-type=ipa-ad-trust-posix --admin=administrator
Did you add the POSIX attributes to AD after creating the trust maybe?
Post by Jan Karásek
Range name: EXAMPLE.TT_id_range
First Posix ID of the range: 1392000000
Number of IDs in the range: 200000
Domain SID of the trusted domain: S-1-5-21-4123312533-990676102-3576722756
Range type: Active Directory trust range with POSIX attributes
- uidNumber -10000
- homeDirectory -/home/user
- loginShell - /bin/bash
Also I have tried to switch off id mapping in sssd.conf with ldap_id_mapping = true in sssd.conf but no luck.
This has no effect, in IPA-AD trust scenario, the id mapping properties
are managed on the server.
Post by Jan Karásek
I know, that it is probably better to use ID views for this, but in our case we need to set centrally managed environment, where all users information are externally inserted to AD from HR system - included POSIX attributes and we need IPA to read them from AD.
I think idviews are better for overriding POSIX attributes for a
specific set of hosts, but in your environment, it sounds like you want
to use the POSIX attributes across the board.
Post by Jan Karásek
Is it possible to read user's POSIX attributes directly from AD - namely uid ?
Yes
Post by Jan Karásek
Which atributes can be stored in AD ?
Homedir is a bit special, for backwards compatibility the
subdomains_homedir takes precedence. The others should be read from AD.
I don't have the environment set at the moment, though, so I'm operating
purely from memory.
Post by Jan Karásek
Am I doing something wrong ?
[domain/a.example.tt]
debug_level = 5
cache_credentials = True
krb5_store_password_if_offline = True
ipa_domain = a.example.tt
id_provider = ipa
auth_provider = ipa
access_provider = ipa
ipa_hostname = ipa1.a.example.tt
chpass_provider = ipa
ipa_server = ipa1.a.example.tt
ipa_server_mode = True
ldap_tls_cacert = /etc/ipa/ca.crt
#ldap_id_mapping = true
#subdomain_inherit = ldap_user_principal
#ldap_user_principal = nosuchattribute
[sssd]
services = nss, sudo, pam, ssh
config_file_version = 2
domains = a.example.tt
[nss]
debug_level = 5
homedir_substring = /home
enum_cache_timeout = 2
entry_negative_timeout = 2
[pam]
debug_level = 5
[sudo]
[autofs]
[ssh]
debug_level = 4
[pac]
debug_level = 4
[ifp]
Thanks,
Jan
BQ_END
--
https://www.redhat.com/mailman/listinfo/freeipa-users
Go to http://freeipa.org for more info on the project
--
/ Alexander Bokovoy
--
Manage your subscription for the Freeipa-users mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-users
Go to http://freeipa.org for more info on the project
Jan Karásek
2016-07-21 11:56:33 UTC
Permalink
Thank you.

Now I have IDMU installed and when creating trust, IPA is correctly autodetecting the range type:

Range name: EXAMPLE.TT_id_range
First Posix ID of the range: 10000
Number of IDs in the range: 200000
Domain SID of the trusted domain: S-1-5-21-4123312533-990676102-3576722756
Range type: Active Directory trust range with POSIX attributes

When asking for uid of the AD user:

[***@ipa1 sssd]# id ***@example.tt
uid=1392001119(***@example.tt) gid=1392001119(***@example.tt) groups=1392001119(***@example.tt),1392000513(domain ***@example.tt),979000007(external_users)


... so ID-mapping is still in action.

According to doc:

To use existing POSIX attributes, two things must be configured:


*
The POSIX attributes must be published to Active Directory's global catalog. - done with uidNumber, gidNumber

*
ID mapping ( ldap_id_mapping in the Active Directory domain entry) must be disabled in SSSD. - done

Here is my sssd.conf from IPA server. Is there anything else I should do to switch off ID-mapping ?

[domain/a.example.tt]
debug_level = 7
cache_credentials = True
krb5_store_password_if_offline = True
ipa_domain = a.example.tt
id_provider = ipa
auth_provider = ipa
access_provider = ipa
ipa_hostname = ipa1.a.example.tt
chpass_provider = ipa
ipa_server = ipa1.a.example.tt
ipa_server_mode = True
ldap_tls_cacert = /etc/ipa/ca.crt
#subdomain_inherit = ldap_user_principal
#ldap_user_principal = nosuchattribute

[domain/example.tt]
debug_level = 7
ldap_id_mapping = False
id_provider = ad

[sssd]
services = nss, sudo, pam, ssh
config_file_version = 2
domains = a.example.tt, example.tt

[nss]
#debug_level = 5
#homedir_substring = /home
enum_cache_timeout = 2
entry_negative_timeout = 2


[pam]
#debug_level = 5
[sudo]

[autofs]

[ssh]
#debug_level = 4
[pac]

#debug_level = 4
[ifp]


Regards,
Jan

From: "Alexander Bokovoy" <***@redhat.com>
To: "Jan Karásek" <***@elostech.cz>
Cc: "Justin Stephenson" <***@redhat.com>, freeipa-***@redhat.com
Sent: Wednesday, July 20, 2016 6:06:29 PM
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
Post by Jan Karásek
Hi,
thank you.
search: 2
result: 32 No such object
matchedDN: CN=RpcServices,CN=System,DC=rwe,DC=tt
text: 0000208D: NameErr: DSID-03100238, problem 2001 (NO_OBJECT), data 0, best
'CN=RpcServices,CN=System,DC=rwe,DC=tt'
actually when I look under the CN=RpcServices,CN=System,DC=rwe,DC=tt - it is empty.
Do I missed to set something on the AD site ?
Yes. You need to setup IDMU. However, in Windows Server 2016 Microsoft
removed IDMU tools. The LDAP schema will stay but there will
be no means to visually edit POSIX attributes.

https://blogs.technet.microsoft.com/activedirectoryua/2016/02/09/identity-management-for-unix-idmu-is-deprecated-in-windows-server/
Post by Jan Karásek
Thanks,
Jan
Sent: Wednesday, July 20, 2016 4:09:02 PM
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
ldapsearch -H ldap:// <ip-address> -D "DOMAIN\Administrator" -W -b "cn=ypservers,cn=ypserv30,cn=rpcservices,CN=System,dc=example,dc=com" msSFU30OrderNumber msSFU30MaxUidNumber msSFU30MaxGidNumber
Replacing the root suffix in the search base, the ip-address and bind credentials.
Kind regards,
Justin Stephenson
Hi,
thank you for the hint.
It's working with msSFU30MaxUidNumber and msSFU30OrderNumber.
If I understand it right, it is base uid number and the number of uids in range.
If not discovered nor given via CLI, then it generate random base and add some default_range_size.
So these two attributes must be set to use ipa-ad-trust-posix range ?
Could anybody help me how and where to check these attributes ? I have looked in the ldapsearch dump from my AD(Global calaog) and I can see these attributes only in schema - so no values assigned.
I'm using W2012 R2.
Thank you,
Jan
Sent: Tuesday, July 19, 2016 8:36:00 PM
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
Hello,
When adding the AD trust using 'ipa-ad-trust-posix' range type then IPA will search AD for the ID space of existing POSIX attributes to automatically create a suitable ID range inside IPA.
You can check the exact steps and attributes searched by looking at the add_range function definition in /usr/lib/python2.7/site-packages/ipalib/plugins/trust.py
I would suggest reviewing the output of 'ipa idrange-find' to confirm that the range matches up with the uid and gidNumbers of your AD environment.
Kind regards,
Justin Stephenson
Hi,
I am still fighting with storing user's POSIX attributes in AD. Please can anybody provide some simple reference settings of IPA-AD trust where users are able to get uid from AD - not from IPA ID pool ?
I have tried to set values of attributes before and after creating trust, I have tried different sssd setting but I'm still getting uid from IPA idrange pool instead of from AD user's attribute.
What exactly is IPA checking when it tries to decide what type of trust will be set - ['ipa-ad-trust-posix', 'ipa-ad-trust'] ?
Do I have to mandatory fill some AD user's attributes to get it work ? Currently I'am testing just with uidNumber and gidNumber.
There is almost no documentation about this topic so I don't know what else I can try ...
Thanks for help,
Jan
Date: Tue, 21 Jun 2016 21:38:15 +0200
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
Content-Type: text/plain; charset=iso-8859-1
Post by Jan Karásek
Hi all,
I have a questions about IPA with AD forest trust. What I am trying to do is setup environment, where all informations about users are stored in one place - AD. I would like to read at least uid, home, shell and sshkey from AD.
ipa trust-add EXAMPLE.TT --type=ad --range-type=ipa-ad-trust-posix --admin=administrator
Did you add the POSIX attributes to AD after creating the trust maybe?
Post by Jan Karásek
Range name: EXAMPLE.TT_id_range
First Posix ID of the range: 1392000000
Number of IDs in the range: 200000
Domain SID of the trusted domain: S-1-5-21-4123312533-990676102-3576722756
Range type: Active Directory trust range with POSIX attributes
- uidNumber -10000
- homeDirectory -/home/user
- loginShell - /bin/bash
Also I have tried to switch off id mapping in sssd.conf with ldap_id_mapping = true in sssd.conf but no luck.
This has no effect, in IPA-AD trust scenario, the id mapping properties
are managed on the server.
Post by Jan Karásek
I know, that it is probably better to use ID views for this, but in our case we need to set centrally managed environment, where all users information are externally inserted to AD from HR system - included POSIX attributes and we need IPA to read them from AD.
I think idviews are better for overriding POSIX attributes for a
specific set of hosts, but in your environment, it sounds like you want
to use the POSIX attributes across the board.
Post by Jan Karásek
Is it possible to read user's POSIX attributes directly from AD - namely uid ?
Yes
Post by Jan Karásek
Which atributes can be stored in AD ?
Homedir is a bit special, for backwards compatibility the
subdomains_homedir takes precedence. The others should be read from AD.
I don't have the environment set at the moment, though, so I'm operating
purely from memory.
Post by Jan Karásek
Am I doing something wrong ?
[domain/a.example.tt]
debug_level = 5
cache_credentials = True
krb5_store_password_if_offline = True
ipa_domain = a.example.tt
id_provider = ipa
auth_provider = ipa
access_provider = ipa
ipa_hostname = ipa1.a.example.tt
chpass_provider = ipa
ipa_server = ipa1.a.example.tt
ipa_server_mode = True
ldap_tls_cacert = /etc/ipa/ca.crt
#ldap_id_mapping = true
#subdomain_inherit = ldap_user_principal
#ldap_user_principal = nosuchattribute
[sssd]
services = nss, sudo, pam, ssh
config_file_version = 2
domains = a.example.tt
[nss]
debug_level = 5
homedir_substring = /home
enum_cache_timeout = 2
entry_negative_timeout = 2
[pam]
debug_level = 5
[sudo]
[autofs]
[ssh]
debug_level = 4
[pac]
debug_level = 4
[ifp]
Thanks,
Jan
--
https://www.redhat.com/mailman/listinfo/freeipa-users
Go to http://freeipa.org for more info on the project
--
/ Alexander Bokovoy
Justin Stephenson
2016-07-21 13:54:25 UTC
Permalink
Hello,

You should remove the following from sssd.conf:

/[domain/example.tt]//
//debug_level = 7//
//ldap_id_mapping = False//
//id_provider = ad/

With the AD trust configuration, you do not need to specify any
additional domain because IPA will contact AD across the trust using the
external and POSIX groups you created during the trust setup.

Once done try restarting sssd and removing the /var/lib/sss/db/* cache

Kind regards,
Justin Stephenson
Post by Jan Karásek
Thank you.
Now I have IDMU installed and when creating trust, IPA is correctly
Range name: EXAMPLE.TT_id_range
First Posix ID of the range: 10000
Number of IDs in the range: 200000
S-1-5-21-4123312533-990676102-3576722756
Range type: Active Directory trust range with POSIX attributes
... so ID-mapping is still in action.
*
The POSIX attributes must be published to Active Directory's
global catalog. - done with uidNumber, gidNumber
*
ID mapping (|ldap_id_mapping| in the Active Directory domain
entry) must be disabled in SSSD. - done
Here is my sssd.conf from IPA server. Is there anything else I should
do to switch off ID-mapping ?
[domain/a.example.tt]
debug_level = 7
cache_credentials = True
krb5_store_password_if_offline = True
ipa_domain = a.example.tt
id_provider = ipa
auth_provider = ipa
access_provider = ipa
ipa_hostname = ipa1.a.example.tt
chpass_provider = ipa
ipa_server = ipa1.a.example.tt
ipa_server_mode = True
ldap_tls_cacert = /etc/ipa/ca.crt
#subdomain_inherit = ldap_user_principal
#ldap_user_principal = nosuchattribute
[domain/example.tt]
debug_level = 7
ldap_id_mapping = False
id_provider = ad
[sssd]
services = nss, sudo, pam, ssh
config_file_version = 2
domains = a.example.tt, example.tt
[nss]
#debug_level = 5
#homedir_substring = /home
enum_cache_timeout = 2
entry_negative_timeout = 2
[pam]
#debug_level = 5
[sudo]
[autofs]
[ssh]
#debug_level = 4
[pac]
#debug_level = 4
[ifp]
Regards,
Jan
------------------------------------------------------------------------
*Sent: *Wednesday, July 20, 2016 6:06:29 PM
*Subject: *Re: [Freeipa-users] AD trust with POSIX attributes
Post by Jan Karásek
Hi,
thank you.
search: 2
result: 32 No such object
matchedDN: CN=RpcServices,CN=System,DC=rwe,DC=tt
text: 0000208D: NameErr: DSID-03100238, problem 2001 (NO_OBJECT),
data 0, best
Post by Jan Karásek
'CN=RpcServices,CN=System,DC=rwe,DC=tt'
actually when I look under the CN=RpcServices,CN=System,DC=rwe,DC=tt
- it is empty.
Post by Jan Karásek
Do I missed to set something on the AD site ?
Yes. You need to setup IDMU. However, in Windows Server 2016 Microsoft
removed IDMU tools. The LDAP schema will stay but there will
be no means to visually edit POSIX attributes.
https://blogs.technet.microsoft.com/activedirectoryua/2016/02/09/identity-management-for-unix-idmu-is-deprecated-in-windows-server/
Post by Jan Karásek
Thanks,
Jan
Sent: Wednesday, July 20, 2016 4:09:02 PM
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
These attributes should be available from port 389 and not the global
ldapsearch -H ldap:// <ip-address> -D "DOMAIN\Administrator" -W -b
"cn=ypservers,cn=ypserv30,cn=rpcservices,CN=System,dc=example,dc=com"
msSFU30OrderNumber msSFU30MaxUidNumber msSFU30MaxGidNumber
Post by Jan Karásek
Replacing the root suffix in the search base, the ip-address and bind
credentials.
Post by Jan Karásek
Kind regards,
Justin Stephenson
Hi,
thank you for the hint.
It's working with msSFU30MaxUidNumber and msSFU30OrderNumber.
If I understand it right, it is base uid number and the number of
uids in range.
Post by Jan Karásek
If not discovered nor given via CLI, then it generate random base and
add some default_range_size.
Post by Jan Karásek
So these two attributes must be set to use ipa-ad-trust-posix range ?
Could anybody help me how and where to check these attributes ? I
have looked in the ldapsearch dump from my AD(Global calaog) and I can
see these attributes only in schema - so no values assigned.
Post by Jan Karásek
I'm using W2012 R2.
Thank you,
Jan
Sent: Tuesday, July 19, 2016 8:36:00 PM
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
Hello,
When adding the AD trust using 'ipa-ad-trust-posix' range type then
IPA will search AD for the ID space of existing POSIX attributes to
automatically create a suitable ID range inside IPA.
Post by Jan Karásek
You can check the exact steps and attributes searched by looking at
the add_range function definition in
/usr/lib/python2.7/site-packages/ipalib/plugins/trust.py
Post by Jan Karásek
I would suggest reviewing the output of 'ipa idrange-find' to confirm
that the range matches up with the uid and gidNumbers of your AD
environment.
Post by Jan Karásek
Kind regards,
Justin Stephenson
BQ_BEGIN
Hi,
I am still fighting with storing user's POSIX attributes in AD.
Please can anybody provide some simple reference settings of IPA-AD
trust where users are able to get uid from AD - not from IPA ID pool ?
Post by Jan Karásek
I have tried to set values of attributes before and after creating
trust, I have tried different sssd setting but I'm still getting uid
from IPA idrange pool instead of from AD user's attribute.
Post by Jan Karásek
What exactly is IPA checking when it tries to decide what type of
trust will be set - ['ipa-ad-trust-posix', 'ipa-ad-trust'] ?
Post by Jan Karásek
Do I have to mandatory fill some AD user's attributes to get it work
? Currently I'am testing just with uidNumber and gidNumber.
Post by Jan Karásek
There is almost no documentation about this topic so I don't know
what else I can try ...
Post by Jan Karásek
Thanks for help,
Jan
Date: Tue, 21 Jun 2016 21:38:15 +0200
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
Content-Type: text/plain; charset=iso-8859-1
Post by Jan Karásek
Hi all,
I have a questions about IPA with AD forest trust. What I am trying
to do is setup environment, where all informations about users are
stored in one place - AD. I would like to read at least uid, home,
shell and sshkey from AD.
Post by Jan Karásek
Post by Jan Karásek
ipa trust-add EXAMPLE.TT --type=ad --range-type=ipa-ad-trust-posix
--admin=administrator
Post by Jan Karásek
Did you add the POSIX attributes to AD after creating the trust maybe?
Post by Jan Karásek
Range name: EXAMPLE.TT_id_range
First Posix ID of the range: 1392000000
Number of IDs in the range: 200000
S-1-5-21-4123312533-990676102-3576722756
Post by Jan Karásek
Post by Jan Karásek
Range type: Active Directory trust range with POSIX attributes
- uidNumber -10000
- homeDirectory -/home/user
- loginShell - /bin/bash
Also I have tried to switch off id mapping in sssd.conf with
ldap_id_mapping = true in sssd.conf but no luck.
Post by Jan Karásek
This has no effect, in IPA-AD trust scenario, the id mapping properties
are managed on the server.
Post by Jan Karásek
I know, that it is probably better to use ID views for this, but in
our case we need to set centrally managed environment, where all users
information are externally inserted to AD from HR system - included
POSIX attributes and we need IPA to read them from AD.
Post by Jan Karásek
I think idviews are better for overriding POSIX attributes for a
specific set of hosts, but in your environment, it sounds like you want
to use the POSIX attributes across the board.
Post by Jan Karásek
Is it possible to read user's POSIX attributes directly from AD -
namely uid ?
Post by Jan Karásek
Yes
Post by Jan Karásek
Which atributes can be stored in AD ?
Homedir is a bit special, for backwards compatibility the
subdomains_homedir takes precedence. The others should be read from AD.
I don't have the environment set at the moment, though, so I'm operating
purely from memory.
Post by Jan Karásek
Am I doing something wrong ?
[domain/a.example.tt]
debug_level = 5
cache_credentials = True
krb5_store_password_if_offline = True
ipa_domain = a.example.tt
id_provider = ipa
auth_provider = ipa
access_provider = ipa
ipa_hostname = ipa1.a.example.tt
chpass_provider = ipa
ipa_server = ipa1.a.example.tt
ipa_server_mode = True
ldap_tls_cacert = /etc/ipa/ca.crt
#ldap_id_mapping = true
#subdomain_inherit = ldap_user_principal
#ldap_user_principal = nosuchattribute
[sssd]
services = nss, sudo, pam, ssh
config_file_version = 2
domains = a.example.tt
[nss]
debug_level = 5
homedir_substring = /home
enum_cache_timeout = 2
entry_negative_timeout = 2
[pam]
debug_level = 5
[sudo]
[autofs]
[ssh]
debug_level = 4
[pac]
debug_level = 4
[ifp]
Thanks,
Jan
BQ_END
--
https://www.redhat.com/mailman/listinfo/freeipa-users
Go to http://freeipa.org for more info on the project
--
/ Alexander Bokovoy
Jan Karásek
2016-07-22 13:19:51 UTC
Permalink
Hi,

thanks a lot for help guys. It's working now. I can successfully read POSIX attributes from AD.

Just now I'am storring uidNumber, gidNumber, gecos, loginShell and unixHomeDirectory in AD.

I have trouble with homedir. It's using subdomain_homedir from sssd.conf and not reflecting the value of unixHomeDirectory attribute.

Is there any way to use value from AD not from subdomain_homedir template for this parameter ?

Regards,
Jan

From: "Justin Stephenson" <***@redhat.com>
To: "Jan Karásek" <***@elostech.cz>, "Alexander Bokovoy" <***@redhat.com>
Cc: freeipa-***@redhat.com
Sent: Thursday, July 21, 2016 3:54:25 PM
Subject: Re: [Freeipa-users] AD trust with POSIX attributes



Hello,

You should remove the following from sssd.conf:



[domain/example.tt]
debug_level = 7
ldap_id_mapping = False
id_provider = ad

With the AD trust configuration, you do not need to specify any additional domain because IPA will contact AD across the trust using the external and POSIX groups you created during the trust setup.

Once done try restarting sssd and removing the /var/lib/sss/db/* cache

Kind regards,
Justin Stephenson

On 07/21/2016 07:56 AM, Jan Karásek wrote:

BQ_BEGIN

Thank you.

Now I have IDMU installed and when creating trust, IPA is correctly autodetecting the range type:

Range name: EXAMPLE.TT_id_range
First Posix ID of the range: 10000
Number of IDs in the range: 200000
Domain SID of the trusted domain: S-1-5-21-4123312533-990676102-3576722756
Range type: Active Directory trust range with POSIX attributes

When asking for uid of the AD user:

[***@ipa1 sssd]# id ***@example.tt
uid=1392001119( ***@example.tt ) gid=1392001119( ***@example.tt ) groups=1392001119( ***@example.tt ),1392000513(domain ***@example.tt ),979000007(external_users)


... so ID-mapping is still in action.

According to doc:

To use existing POSIX attributes, two things must be configured:


*
The POSIX attributes must be published to Active Directory's global catalog. - done with uidNumber, gidNumber

*
ID mapping ( ldap_id_mapping in the Active Directory domain entry) must be disabled in SSSD. - done

Here is my sssd.conf from IPA server. Is there anything else I should do to switch off ID-mapping ?

[domain/a.example.tt]
debug_level = 7
cache_credentials = True
krb5_store_password_if_offline = True
ipa_domain = a.example.tt
id_provider = ipa
auth_provider = ipa
access_provider = ipa
ipa_hostname = ipa1.a.example.tt
chpass_provider = ipa
ipa_server = ipa1.a.example.tt
ipa_server_mode = True
ldap_tls_cacert = /etc/ipa/ca.crt
#subdomain_inherit = ldap_user_principal
#ldap_user_principal = nosuchattribute

[domain/example.tt]
debug_level = 7
ldap_id_mapping = False
id_provider = ad

[sssd]
services = nss, sudo, pam, ssh
config_file_version = 2
domains = a.example.tt, example.tt

[nss]
#debug_level = 5
#homedir_substring = /home
enum_cache_timeout = 2
entry_negative_timeout = 2


[pam]
#debug_level = 5
[sudo]

[autofs]

[ssh]
#debug_level = 4
[pac]

#debug_level = 4
[ifp]


Regards,
Jan

From: "Alexander Bokovoy" <***@redhat.com>
To: "Jan Karásek" <***@elostech.cz>
Cc: "Justin Stephenson" <***@redhat.com> , freeipa-***@redhat.com
Sent: Wednesday, July 20, 2016 6:06:29 PM
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
Post by Jan Karásek
Hi,
thank you.
search: 2
result: 32 No such object
matchedDN: CN=RpcServices,CN=System,DC=rwe,DC=tt
text: 0000208D: NameErr: DSID-03100238, problem 2001 (NO_OBJECT), data 0, best
'CN=RpcServices,CN=System,DC=rwe,DC=tt'
actually when I look under the CN=RpcServices,CN=System,DC=rwe,DC=tt - it is empty.
Do I missed to set something on the AD site ?
Yes. You need to setup IDMU. However, in Windows Server 2016 Microsoft
removed IDMU tools. The LDAP schema will stay but there will
be no means to visually edit POSIX attributes.

https://blogs.technet.microsoft.com/activedirectoryua/2016/02/09/identity-management-for-unix-idmu-is-deprecated-in-windows-server/
Post by Jan Karásek
Thanks,
Jan
Sent: Wednesday, July 20, 2016 4:09:02 PM
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
ldapsearch -H ldap:// <ip-address> -D "DOMAIN\Administrator" -W -b "cn=ypservers,cn=ypserv30,cn=rpcservices,CN=System,dc=example,dc=com" msSFU30OrderNumber msSFU30MaxUidNumber msSFU30MaxGidNumber
Replacing the root suffix in the search base, the ip-address and bind credentials.
Kind regards,
Justin Stephenson
Hi,
thank you for the hint.
It's working with msSFU30MaxUidNumber and msSFU30OrderNumber.
If I understand it right, it is base uid number and the number of uids in range.
If not discovered nor given via CLI, then it generate random base and add some default_range_size.
So these two attributes must be set to use ipa-ad-trust-posix range ?
Could anybody help me how and where to check these attributes ? I have looked in the ldapsearch dump from my AD(Global calaog) and I can see these attributes only in schema - so no values assigned.
I'm using W2012 R2.
Thank you,
Jan
Sent: Tuesday, July 19, 2016 8:36:00 PM
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
Hello,
When adding the AD trust using 'ipa-ad-trust-posix' range type then IPA will search AD for the ID space of existing POSIX attributes to automatically create a suitable ID range inside IPA.
You can check the exact steps and attributes searched by looking at the add_range function definition in /usr/lib/python2.7/site-packages/ipalib/plugins/trust.py
I would suggest reviewing the output of 'ipa idrange-find' to confirm that the range matches up with the uid and gidNumbers of your AD environment.
Kind regards,
Justin Stephenson
BQ_BEGIN
Hi,
I am still fighting with storing user's POSIX attributes in AD. Please can anybody provide some simple reference settings of IPA-AD trust where users are able to get uid from AD - not from IPA ID pool ?
I have tried to set values of attributes before and after creating trust, I have tried different sssd setting but I'm still getting uid from IPA idrange pool instead of from AD user's attribute.
What exactly is IPA checking when it tries to decide what type of trust will be set - ['ipa-ad-trust-posix', 'ipa-ad-trust'] ?
Do I have to mandatory fill some AD user's attributes to get it work ? Currently I'am testing just with uidNumber and gidNumber.
There is almost no documentation about this topic so I don't know what else I can try ...
Thanks for help,
Jan
Date: Tue, 21 Jun 2016 21:38:15 +0200
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
Content-Type: text/plain; charset=iso-8859-1
Post by Jan Karásek
Hi all,
I have a questions about IPA with AD forest trust. What I am trying to do is setup environment, where all informations about users are stored in one place - AD. I would like to read at least uid, home, shell and sshkey from AD.
ipa trust-add EXAMPLE.TT --type=ad --range-type=ipa-ad-trust-posix --admin=administrator
Did you add the POSIX attributes to AD after creating the trust maybe?
Post by Jan Karásek
Range name: EXAMPLE.TT_id_range
First Posix ID of the range: 1392000000
Number of IDs in the range: 200000
Domain SID of the trusted domain: S-1-5-21-4123312533-990676102-3576722756
Range type: Active Directory trust range with POSIX attributes
- uidNumber -10000
- homeDirectory -/home/user
- loginShell - /bin/bash
Also I have tried to switch off id mapping in sssd.conf with ldap_id_mapping = true in sssd.conf but no luck.
This has no effect, in IPA-AD trust scenario, the id mapping properties
are managed on the server.
Post by Jan Karásek
I know, that it is probably better to use ID views for this, but in our case we need to set centrally managed environment, where all users information are externally inserted to AD from HR system - included POSIX attributes and we need IPA to read them from AD.
I think idviews are better for overriding POSIX attributes for a
specific set of hosts, but in your environment, it sounds like you want
to use the POSIX attributes across the board.
Post by Jan Karásek
Is it possible to read user's POSIX attributes directly from AD - namely uid ?
Yes
Post by Jan Karásek
Which atributes can be stored in AD ?
Homedir is a bit special, for backwards compatibility the
subdomains_homedir takes precedence. The others should be read from AD.
I don't have the environment set at the moment, though, so I'm operating
purely from memory.
Post by Jan Karásek
Am I doing something wrong ?
[domain/a.example.tt]
debug_level = 5
cache_credentials = True
krb5_store_password_if_offline = True
ipa_domain = a.example.tt
id_provider = ipa
auth_provider = ipa
access_provider = ipa
ipa_hostname = ipa1.a.example.tt
chpass_provider = ipa
ipa_server = ipa1.a.example.tt
ipa_server_mode = True
ldap_tls_cacert = /etc/ipa/ca.crt
#ldap_id_mapping = true
#subdomain_inherit = ldap_user_principal
#ldap_user_principal = nosuchattribute
[sssd]
services = nss, sudo, pam, ssh
config_file_version = 2
domains = a.example.tt
[nss]
debug_level = 5
homedir_substring = /home
enum_cache_timeout = 2
entry_negative_timeout = 2
[pam]
debug_level = 5
[sudo]
[autofs]
[ssh]
debug_level = 4
[pac]
debug_level = 4
[ifp]
Thanks,
Jan
BQ_END
--
https://www.redhat.com/mailman/listinfo/freeipa-users
Go to http://freeipa.org for more info on the project
--
/ Alexander Bokovoy

BQ_END
Jan Karásek
2016-07-25 14:54:19 UTC
Permalink
Hi,

just for the clarification:

Do I really need IDMU on AD side installed for IPA-AD trust with -range-type=ipa-ad-trust-posix ? In W2012 all POSIX attributes are already in schema and idrange type can be forced. I just tried to remove IDMU from my AD and it's still working. What is the role of IDMU other than allowing to autodetect POSIX idrange type via the msSFU30OrderNumber msSFU30MaxUidNumber attributes ?

Regards,
Jan


From: "Jan Karásek" <***@elostech.cz>
To: "Justin Stephenson" <***@redhat.com>
Cc: "Alexander Bokovoy" <***@redhat.com>, freeipa-***@redhat.com
Sent: Friday, July 22, 2016 3:19:51 PM
Subject: Re: [Freeipa-users] AD trust with POSIX attributes

Hi,

thanks a lot for help guys. It's working now. I can successfully read POSIX attributes from AD.

Just now I'am storring uidNumber, gidNumber, gecos, loginShell and unixHomeDirectory in AD.

I have trouble with homedir. It's using subdomain_homedir from sssd.conf and not reflecting the value of unixHomeDirectory attribute.

Is there any way to use value from AD not from subdomain_homedir template for this parameter ?

Regards,
Jan

From: "Justin Stephenson" <***@redhat.com>
To: "Jan Karásek" <***@elostech.cz>, "Alexander Bokovoy" <***@redhat.com>
Cc: freeipa-***@redhat.com
Sent: Thursday, July 21, 2016 3:54:25 PM
Subject: Re: [Freeipa-users] AD trust with POSIX attributes



Hello,

You should remove the following from sssd.conf:



[domain/example.tt]
debug_level = 7
ldap_id_mapping = False
id_provider = ad

With the AD trust configuration, you do not need to specify any additional domain because IPA will contact AD across the trust using the external and POSIX groups you created during the trust setup.

Once done try restarting sssd and removing the /var/lib/sss/db/* cache

Kind regards,
Justin Stephenson

On 07/21/2016 07:56 AM, Jan Karásek wrote:

BQ_BEGIN

Thank you.

Now I have IDMU installed and when creating trust, IPA is correctly autodetecting the range type:

Range name: EXAMPLE.TT_id_range
First Posix ID of the range: 10000
Number of IDs in the range: 200000
Domain SID of the trusted domain: S-1-5-21-4123312533-990676102-3576722756
Range type: Active Directory trust range with POSIX attributes

When asking for uid of the AD user:

[***@ipa1 sssd]# id ***@example.tt
uid=1392001119( ***@example.tt ) gid=1392001119( ***@example.tt ) groups=1392001119( ***@example.tt ),1392000513(domain ***@example.tt ),979000007(external_users)


... so ID-mapping is still in action.

According to doc:

To use existing POSIX attributes, two things must be configured:


*
The POSIX attributes must be published to Active Directory's global catalog. - done with uidNumber, gidNumber

*
ID mapping ( ldap_id_mapping in the Active Directory domain entry) must be disabled in SSSD. - done

Here is my sssd.conf from IPA server. Is there anything else I should do to switch off ID-mapping ?

[domain/a.example.tt]
debug_level = 7
cache_credentials = True
krb5_store_password_if_offline = True
ipa_domain = a.example.tt
id_provider = ipa
auth_provider = ipa
access_provider = ipa
ipa_hostname = ipa1.a.example.tt
chpass_provider = ipa
ipa_server = ipa1.a.example.tt
ipa_server_mode = True
ldap_tls_cacert = /etc/ipa/ca.crt
#subdomain_inherit = ldap_user_principal
#ldap_user_principal = nosuchattribute

[domain/example.tt]
debug_level = 7
ldap_id_mapping = False
id_provider = ad

[sssd]
services = nss, sudo, pam, ssh
config_file_version = 2
domains = a.example.tt, example.tt

[nss]
#debug_level = 5
#homedir_substring = /home
enum_cache_timeout = 2
entry_negative_timeout = 2


[pam]
#debug_level = 5
[sudo]

[autofs]

[ssh]
#debug_level = 4
[pac]

#debug_level = 4
[ifp]


Regards,
Jan

From: "Alexander Bokovoy" <***@redhat.com>
To: "Jan Karásek" <***@elostech.cz>
Cc: "Justin Stephenson" <***@redhat.com> , freeipa-***@redhat.com
Sent: Wednesday, July 20, 2016 6:06:29 PM
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
Post by Jan Karásek
Hi,
thank you.
search: 2
result: 32 No such object
matchedDN: CN=RpcServices,CN=System,DC=rwe,DC=tt
text: 0000208D: NameErr: DSID-03100238, problem 2001 (NO_OBJECT), data 0, best
'CN=RpcServices,CN=System,DC=rwe,DC=tt'
actually when I look under the CN=RpcServices,CN=System,DC=rwe,DC=tt - it is empty.
Do I missed to set something on the AD site ?
Yes. You need to setup IDMU. However, in Windows Server 2016 Microsoft
removed IDMU tools. The LDAP schema will stay but there will
be no means to visually edit POSIX attributes.

https://blogs.technet.microsoft.com/activedirectoryua/2016/02/09/identity-management-for-unix-idmu-is-deprecated-in-windows-server/
Post by Jan Karásek
Thanks,
Jan
Sent: Wednesday, July 20, 2016 4:09:02 PM
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
ldapsearch -H ldap:// <ip-address> -D "DOMAIN\Administrator" -W -b "cn=ypservers,cn=ypserv30,cn=rpcservices,CN=System,dc=example,dc=com" msSFU30OrderNumber msSFU30MaxUidNumber msSFU30MaxGidNumber
Replacing the root suffix in the search base, the ip-address and bind credentials.
Kind regards,
Justin Stephenson
Hi,
thank you for the hint.
It's working with msSFU30MaxUidNumber and msSFU30OrderNumber.
If I understand it right, it is base uid number and the number of uids in range.
If not discovered nor given via CLI, then it generate random base and add some default_range_size.
So these two attributes must be set to use ipa-ad-trust-posix range ?
Could anybody help me how and where to check these attributes ? I have looked in the ldapsearch dump from my AD(Global calaog) and I can see these attributes only in schema - so no values assigned.
I'm using W2012 R2.
Thank you,
Jan
Sent: Tuesday, July 19, 2016 8:36:00 PM
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
Hello,
When adding the AD trust using 'ipa-ad-trust-posix' range type then IPA will search AD for the ID space of existing POSIX attributes to automatically create a suitable ID range inside IPA.
You can check the exact steps and attributes searched by looking at the add_range function definition in /usr/lib/python2.7/site-packages/ipalib/plugins/trust.py
I would suggest reviewing the output of 'ipa idrange-find' to confirm that the range matches up with the uid and gidNumbers of your AD environment.
Kind regards,
Justin Stephenson
BQ_BEGIN
Hi,
I am still fighting with storing user's POSIX attributes in AD. Please can anybody provide some simple reference settings of IPA-AD trust where users are able to get uid from AD - not from IPA ID pool ?
I have tried to set values of attributes before and after creating trust, I have tried different sssd setting but I'm still getting uid from IPA idrange pool instead of from AD user's attribute.
What exactly is IPA checking when it tries to decide what type of trust will be set - ['ipa-ad-trust-posix', 'ipa-ad-trust'] ?
Do I have to mandatory fill some AD user's attributes to get it work ? Currently I'am testing just with uidNumber and gidNumber.
There is almost no documentation about this topic so I don't know what else I can try ...
Thanks for help,
Jan
Date: Tue, 21 Jun 2016 21:38:15 +0200
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
Content-Type: text/plain; charset=iso-8859-1
Post by Jan Karásek
Hi all,
I have a questions about IPA with AD forest trust. What I am trying to do is setup environment, where all informations about users are stored in one place - AD. I would like to read at least uid, home, shell and sshkey from AD.
ipa trust-add EXAMPLE.TT --type=ad --range-type=ipa-ad-trust-posix --admin=administrator
Did you add the POSIX attributes to AD after creating the trust maybe?
Post by Jan Karásek
Range name: EXAMPLE.TT_id_range
First Posix ID of the range: 1392000000
Number of IDs in the range: 200000
Domain SID of the trusted domain: S-1-5-21-4123312533-990676102-3576722756
Range type: Active Directory trust range with POSIX attributes
- uidNumber -10000
- homeDirectory -/home/user
- loginShell - /bin/bash
Also I have tried to switch off id mapping in sssd.conf with ldap_id_mapping = true in sssd.conf but no luck.
This has no effect, in IPA-AD trust scenario, the id mapping properties
are managed on the server.
Post by Jan Karásek
I know, that it is probably better to use ID views for this, but in our case we need to set centrally managed environment, where all users information are externally inserted to AD from HR system - included POSIX attributes and we need IPA to read them from AD.
I think idviews are better for overriding POSIX attributes for a
specific set of hosts, but in your environment, it sounds like you want
to use the POSIX attributes across the board.
Post by Jan Karásek
Is it possible to read user's POSIX attributes directly from AD - namely uid ?
Yes
Post by Jan Karásek
Which atributes can be stored in AD ?
Homedir is a bit special, for backwards compatibility the
subdomains_homedir takes precedence. The others should be read from AD.
I don't have the environment set at the moment, though, so I'm operating
purely from memory.
Post by Jan Karásek
Am I doing something wrong ?
[domain/a.example.tt]
debug_level = 5
cache_credentials = True
krb5_store_password_if_offline = True
ipa_domain = a.example.tt
id_provider = ipa
auth_provider = ipa
access_provider = ipa
ipa_hostname = ipa1.a.example.tt
chpass_provider = ipa
ipa_server = ipa1.a.example.tt
ipa_server_mode = True
ldap_tls_cacert = /etc/ipa/ca.crt
#ldap_id_mapping = true
#subdomain_inherit = ldap_user_principal
#ldap_user_principal = nosuchattribute
[sssd]
services = nss, sudo, pam, ssh
config_file_version = 2
domains = a.example.tt
[nss]
debug_level = 5
homedir_substring = /home
enum_cache_timeout = 2
entry_negative_timeout = 2
[pam]
debug_level = 5
[sudo]
[autofs]
[ssh]
debug_level = 4
[pac]
debug_level = 4
[ifp]
Thanks,
Jan
BQ_END
--
https://www.redhat.com/mailman/listinfo/freeipa-users
Go to http://freeipa.org for more info on the project
--
/ Alexander Bokovoy

BQ_END
Justin Stephenson
2016-07-26 19:37:43 UTC
Permalink
As Alexander mentioned, the LDAP schema still exists to add POSIX
attributes to users and groups in AD but IDMU simply provides a
convenient Graphical interface to manage this. You should still be able
to use powershell or other windows tools to modify POSIX attributes
going forward, but in general a lot of users are moving towards sssd
automatic ID mapping which means there is no administrative management
of uid/gid values.

There may be some other purpose for IDMU that I am not aware of...

Kind regards,

Justin Stephenson
Post by Jan Karásek
Hi,
Do I really need IDMU on AD side installed for IPA-AD trust with
-range-type=ipa-ad-trust-posix ? In W2012 all POSIX attributes are
already in schema and idrange type can be forced. I just tried to
remove IDMU from my AD and it's still working. What is the role of
IDMU other than allowing to autodetect POSIX idrange type via
the msSFU30OrderNumber msSFU30MaxUidNumber attributes ?
Regards,
Jan
------------------------------------------------------------------------
*Sent: *Friday, July 22, 2016 3:19:51 PM
*Subject: *Re: [Freeipa-users] AD trust with POSIX attributes
Hi,
thanks a lot for help guys. It's working now. I can successfully read
POSIX attributes from AD.
Just now I'am storring uidNumber, gidNumber, gecos, loginShell and unixHomeDirectory in AD.
I have trouble with homedir. It's using subdomain_homedir from
sssd.conf and not reflecting the value of unixHomeDirectory attribute.
Is there any way to use value from AD not from subdomain_homedir
template for this parameter ?
Regards,
Jan
------------------------------------------------------------------------
*Sent: *Thursday, July 21, 2016 3:54:25 PM
*Subject: *Re: [Freeipa-users] AD trust with POSIX attributes
Hello,
/[domain/example.tt]//
//debug_level = 7//
//ldap_id_mapping = False//
//id_provider = ad/
With the AD trust configuration, you do not need to specify any
additional domain because IPA will contact AD across the trust using
the external and POSIX groups you created during the trust setup.
Once done try restarting sssd and removing the /var/lib/sss/db/* cache
Kind regards,
Justin Stephenson
Thank you.
Now I have IDMU installed and when creating trust, IPA is
Range name: EXAMPLE.TT_id_range
First Posix ID of the range: 10000
Number of IDs in the range: 200000
S-1-5-21-4123312533-990676102-3576722756
Range type: Active Directory trust range with POSIX attributes
... so ID-mapping is still in action.
*
The POSIX attributes must be published to Active Directory's
global catalog. - done with uidNumber, gidNumber
*
ID mapping (|ldap_id_mapping| in the Active Directory domain
entry) must be disabled in SSSD. - done
Here is my sssd.conf from IPA server. Is there anything else I
should do to switch off ID-mapping ?
[domain/a.example.tt]
debug_level = 7
cache_credentials = True
krb5_store_password_if_offline = True
ipa_domain = a.example.tt
id_provider = ipa
auth_provider = ipa
access_provider = ipa
ipa_hostname = ipa1.a.example.tt
chpass_provider = ipa
ipa_server = ipa1.a.example.tt
ipa_server_mode = True
ldap_tls_cacert = /etc/ipa/ca.crt
#subdomain_inherit = ldap_user_principal
#ldap_user_principal = nosuchattribute
[domain/example.tt]
debug_level = 7
ldap_id_mapping = False
id_provider = ad
[sssd]
services = nss, sudo, pam, ssh
config_file_version = 2
domains = a.example.tt, example.tt
[nss]
#debug_level = 5
#homedir_substring = /home
enum_cache_timeout = 2
entry_negative_timeout = 2
[pam]
#debug_level = 5
[sudo]
[autofs]
[ssh]
#debug_level = 4
[pac]
#debug_level = 4
[ifp]
Regards,
Jan
------------------------------------------------------------------------
*Sent: *Wednesday, July 20, 2016 6:06:29 PM
*Subject: *Re: [Freeipa-users] AD trust with POSIX attributes
Post by Jan Karásek
Hi,
thank you.
search: 2
result: 32 No such object
matchedDN: CN=RpcServices,CN=System,DC=rwe,DC=tt
text: 0000208D: NameErr: DSID-03100238, problem 2001 (NO_OBJECT),
data 0, best
Post by Jan Karásek
'CN=RpcServices,CN=System,DC=rwe,DC=tt'
actually when I look under the
CN=RpcServices,CN=System,DC=rwe,DC=tt - it is empty.
Post by Jan Karásek
Do I missed to set something on the AD site ?
Yes. You need to setup IDMU. However, in Windows Server 2016 Microsoft
removed IDMU tools. The LDAP schema will stay but there will
be no means to visually edit POSIX attributes.
https://blogs.technet.microsoft.com/activedirectoryua/2016/02/09/identity-management-for-unix-idmu-is-deprecated-in-windows-server/
Post by Jan Karásek
Thanks,
Jan
Sent: Wednesday, July 20, 2016 4:09:02 PM
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
These attributes should be available from port 389 and not the
ldapsearch -H ldap:// <ip-address> -D "DOMAIN\Administrator" -W
-b
"cn=ypservers,cn=ypserv30,cn=rpcservices,CN=System,dc=example,dc=com"
msSFU30OrderNumber msSFU30MaxUidNumber msSFU30MaxGidNumber
Post by Jan Karásek
Replacing the root suffix in the search base, the ip-address and
bind credentials.
Post by Jan Karásek
Kind regards,
Justin Stephenson
Hi,
thank you for the hint.
It's working with msSFU30MaxUidNumber and msSFU30OrderNumber.
If I understand it right, it is base uid number and the number of
uids in range.
Post by Jan Karásek
If not discovered nor given via CLI, then it generate random base
and add some default_range_size.
Post by Jan Karásek
So these two attributes must be set to use ipa-ad-trust-posix range ?
Could anybody help me how and where to check these attributes ? I
have looked in the ldapsearch dump from my AD(Global calaog) and I
can see these attributes only in schema - so no values assigned.
Post by Jan Karásek
I'm using W2012 R2.
Thank you,
Jan
Sent: Tuesday, July 19, 2016 8:36:00 PM
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
Hello,
When adding the AD trust using 'ipa-ad-trust-posix' range type
then IPA will search AD for the ID space of existing POSIX
attributes to automatically create a suitable ID range inside IPA.
Post by Jan Karásek
You can check the exact steps and attributes searched by looking
at the add_range function definition in
/usr/lib/python2.7/site-packages/ipalib/plugins/trust.py
Post by Jan Karásek
I would suggest reviewing the output of 'ipa idrange-find' to
confirm that the range matches up with the uid and gidNumbers of
your AD environment.
Post by Jan Karásek
Kind regards,
Justin Stephenson
BQ_BEGIN
Hi,
I am still fighting with storing user's POSIX attributes in AD.
Please can anybody provide some simple reference settings of
IPA-AD trust where users are able to get uid from AD - not from
IPA ID pool ?
Post by Jan Karásek
I have tried to set values of attributes before and after
creating trust, I have tried different sssd setting but I'm still
getting uid from IPA idrange pool instead of from AD user's attribute.
Post by Jan Karásek
What exactly is IPA checking when it tries to decide what type of
trust will be set - ['ipa-ad-trust-posix', 'ipa-ad-trust'] ?
Post by Jan Karásek
Do I have to mandatory fill some AD user's attributes to get it
work ? Currently I'am testing just with uidNumber and gidNumber.
Post by Jan Karásek
There is almost no documentation about this topic so I don't know
what else I can try ...
Post by Jan Karásek
Thanks for help,
Jan
Date: Tue, 21 Jun 2016 21:38:15 +0200
Subject: Re: [Freeipa-users] AD trust with POSIX attributes
Content-Type: text/plain; charset=iso-8859-1
Post by Jan Karásek
Hi all,
I have a questions about IPA with AD forest trust. What I am
trying to do is setup environment, where all informations about
users are stored in one place - AD. I would like to read at least
uid, home, shell and sshkey from AD.
Post by Jan Karásek
Post by Jan Karásek
ipa trust-add EXAMPLE.TT --type=ad
--range-type=ipa-ad-trust-posix --admin=administrator
Post by Jan Karásek
Did you add the POSIX attributes to AD after creating the trust
maybe?
Post by Jan Karásek
Post by Jan Karásek
Range name: EXAMPLE.TT_id_range
First Posix ID of the range: 1392000000
Number of IDs in the range: 200000
S-1-5-21-4123312533-990676102-3576722756
Post by Jan Karásek
Post by Jan Karásek
Range type: Active Directory trust range with POSIX attributes
- uidNumber -10000
- homeDirectory -/home/user
- loginShell - /bin/bash
Also I have tried to switch off id mapping in sssd.conf with
ldap_id_mapping = true in sssd.conf but no luck.
Post by Jan Karásek
This has no effect, in IPA-AD trust scenario, the id mapping
properties
Post by Jan Karásek
are managed on the server.
Post by Jan Karásek
I know, that it is probably better to use ID views for this,
but in our case we need to set centrally managed environment,
where all users information are externally inserted to AD from HR
system - included POSIX attributes and we need IPA to read them
from AD.
Post by Jan Karásek
I think idviews are better for overriding POSIX attributes for a
specific set of hosts, but in your environment, it sounds like
you want
Post by Jan Karásek
to use the POSIX attributes across the board.
Post by Jan Karásek
Is it possible to read user's POSIX attributes directly from AD
- namely uid ?
Post by Jan Karásek
Yes
Post by Jan Karásek
Which atributes can be stored in AD ?
Homedir is a bit special, for backwards compatibility the
subdomains_homedir takes precedence. The others should be read
from AD.
Post by Jan Karásek
I don't have the environment set at the moment, though, so I'm
operating
Post by Jan Karásek
purely from memory.
Post by Jan Karásek
Am I doing something wrong ?
[domain/a.example.tt]
debug_level = 5
cache_credentials = True
krb5_store_password_if_offline = True
ipa_domain = a.example.tt
id_provider = ipa
auth_provider = ipa
access_provider = ipa
ipa_hostname = ipa1.a.example.tt
chpass_provider = ipa
ipa_server = ipa1.a.example.tt
ipa_server_mode = True
ldap_tls_cacert = /etc/ipa/ca.crt
#ldap_id_mapping = true
#subdomain_inherit = ldap_user_principal
#ldap_user_principal = nosuchattribute
[sssd]
services = nss, sudo, pam, ssh
config_file_version = 2
domains = a.example.tt
[nss]
debug_level = 5
homedir_substring = /home
enum_cache_timeout = 2
entry_negative_timeout = 2
[pam]
debug_level = 5
[sudo]
[autofs]
[ssh]
debug_level = 4
[pac]
debug_level = 4
[ifp]
Thanks,
Jan
BQ_END
--
https://www.redhat.com/mailman/listinfo/freeipa-users
Go to http://freeipa.org for more info on the project
--
/ Alexander Bokovoy
Continue reading on narkive:
Search results for '[Freeipa-users] AD trust with POSIX attributes' (Questions and Answers)
14
replies
Creating a "Why we should switch to Mac" Speech. Help Please?
started 2007-10-26 15:44:14 UTC
desktops
Loading...