[Samba] Shares not accessible when using FQDN

mathias dufresne infractory at gmail.com
Wed Aug 30 09:54:07 UTC 2017


2017-08-30 11:25 GMT+02:00 Gaetan SLONGO via samba <samba at lists.samba.org>:

> Rowland,
>
>
> Yes, I mean uidNumber and gidNumber.
> I'm aware I need to work with AD but at this time I need my unix IDs (on
> NSS) to keep services working. Not only for files ownership, but also for
> some other services. Yeah, that's complex...
> If I undestand well, the best way to do is to join the server using "net
> ads join" and use nss_winbind. This what I do but I only use the NSS LDAP
> backend instead of NSS (to keep correct ownership).
>

The best way to do is to chose correctly UID/GID and how you will manage to
have this UIDF/GID and not others UID/GID.
Two main choices:
- using uidNumber and gidNumber LDAP attributes in AD LDAP tree
- using idmap-rid which relies on Microsoft RID to generate UID/GID.

As you have some historical UID/GID usage, I would chose usage of uidNumber
and gidNumber in which you can set any number you want. As you can chose
what UID/GID you give to every AD object, you will certainly be able to
re-attribute UID/GID which are already in use.
Plus using uidNumber and gidNumber you give same UID or GID to several
different objects.

To be able to use uidNumber and gidNumber in LDAP tree you have several
choices:
- Winbind
- sssd
- nslcd
- certainly others but these 3 should be sufficient for you have what you
want.

Usage of nss_ldap and pam_ldap in old fashion don't use Kerberos...

Winbind is certainly the simpler way to proceed... if you can modify AD
schema (if not already done) to have access to "UNIX attributes" tab in
ADUC (when accessing to user properties).

If no modification of the schema is possible and you have Samba 4 DC you
can avoid modifying the schema adding "idmap_ldb:use rfc2307 = yes" in
smb.conf on your Samba DC. Please note that without modifying the schema
ADUC tool won't work when accessing to "UNIX attributes" tab in user
properties.
If no modification of the schema is possible and you have only Microsoft DC
you will have to use SSSD.



> This will be cleaned in the future (within next migration steps) but for
> now I think I have no other choice beacause it seems I cannot obtain unix
> IDs through Winbind on a domain member (or maybe I missed the solution??).
>

>
> Thanks
>
> ----- Mail original -----
>
> De: "Rowland Penny via samba" <samba at lists.samba.org>
> À: samba at lists.samba.org
> Envoyé: Mercredi 30 Août 2017 11:00:18
> Objet : Re: [Samba] Shares not accessible when using FQDN
>
> On Wed, 30 Aug 2017 10:43:39 +0200 (CEST)
> Gaetan SLONGO <gslongo at it-optics.com> wrote:
>
> > Hi Rowland,
> >
> >
> > Thank you for your answer.
> > I think I have found a solution which could solve the issue until the
> > next migration step. It tested it on another server which is not
> > critital :
> >
> >
> >
> >
> > * Joining the server as a member and setup the shares as you
> > suggest
> > * Use nss_ldap instead of nss_winbind (idmap) which will pick my
> > unix ids
>
> Well 'nss_ldap' is not supported by Samba and normally anything that it
> can do, can also be done by winbind. What I am wondering about is what
> you are calling 'unix ids', where are these coming from ? are they
> from 'uidNumber' & 'gidNumber' attributes stored in AD or
> from /etc/passwd & /etc/group ?
> If the later, are you aware that you cannot have a user with the same
> name in AD and /etc/passwd.
>
> I think you may be trying to 'bend' AD to fit in with the old way
> Samba worked as a PDC or standalone, this is doomed to ultimate
> failure in my opinion. You need to work with AD, this will make things
> easier in the long run.
>
> >
> >
> > In this setup it seems I can access to the shares with any DNS
> > aliases/CNAME
>
> You should be able do this using winbind.
>
> >
> >
> > I know it is not a very proper setup but it seem to work and we can
> > do it quickly
>
> Yes, but will it be reliable in the long run ?
>
> Rowland
>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: https://lists.samba.org/mailman/options/samba
>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>


More information about the samba mailing list