[Samba] Samba 4 + Squidguardian

mathias dufresne infractory at gmail.com
Tue Oct 20 10:43:01 UTC 2015


2015-10-20 11:10 GMT+02:00 Rowland Penny <rowlandpenny241155 at gmail.com>:

> On 20/10/15 09:05, mathias dufresne wrote:
>
>>
>> 2015-10-19 18:08 GMT+02:00 Rowland Penny <rowlandpenny241155 at gmail.com
>> <mailto:rowlandpenny241155 at gmail.com>>:
>>
>>
>>     On 19/10/15 16:46, mathias dufresne wrote:
>>
>>         AD from Samba or Microsoft is mainly a database for storing
>>         users (and
>>         associated stuffs). It comes also with stuffs (protocols) to
>>         connect and
>>         retrieve information.
>>
>>         How the client uses these information is, as always, a choice
>>         from that
>>         specific client.
>>
>>         Your AD client is your Squid/Squidguard(ian) server. Its job
>>         as AD client
>>         is to get some users information from AD to build system
>>         users. I insist on
>>         the fact system users are forged. Purely.
>>
>>         What is responsible of that forging process? What you declared in
>>         /etc/nsswitch.conf.
>>         Generally it is winbind, sssd or nlscd.
>>
>>         Each one of these tools comes with its own set of option,
>>         tweak and
>>         configuration files to define how to forge users from local
>>         system point of
>>         view.
>>
>>         Each one except for Winbind which forge users as it decide to,
>>         no matter
>>         the desires of local system admin. At least this is how I
>>         understood
>>         winbind behaviour (which has no configuration file for what I
>>         know).
>>
>>
>>     Well, apart from idmap.ldb on a DC and the idmap_config lines in
>>     smb.conf on a domain member, there are no configuration files. :-D
>>
>>
>> idmap.ldb -> TDB database version 6, little-endian hash size 10000 bytes
>> idmap_config lines in smb.conf -> how would you set them to configure
>> Winbind to not add domain to user?
>>
>
> Well, I will give you this one, on DC you cannot, but on a domain member
> you can: winbind use default domain = yes
> However, it is not recommended to use the DC as a fileserver


OK for that option I didn't knew which is effectively to remove domain part
of user name.
Not OK with your remark regarding file server: why changing the way system
users are created means to share files?


>
>
> To use gidNumber rather than 100 which seems to reflect "primaryGroupID:
>> 513",
>>
>
> Give the users unique uidNumbers and Domain Users a gidNumber


What gidNumber is given to system user? Is it gidNumber attribute content
or something else?
What I mean is simple: if I configure gidNumber for all my users, don't you
think I do that for my system users have this gidNumber in use rather gid
set to 100?
Are you telling me I'm stupid to want users with different GID? Isn't it a
common UNIX practice? Are you telling me all others admins doing that are
also stupid?


>
>
> to set up home directory to unixHomeDirectory or to homeDirectory rather
>> than /home/<short domain name>/ sAMAccountName?
>>
>
> template homedir = /home/%U


False. Here you gave me an option to force one kind of home directory for
all users. This is not what I was asking. Can't you imagine that some users
could need some other home directory? What if some applicative user is
named "toto" and this user needs to have a home directory set to
/home/toto_applicative_folder?
Should I modify this user .bashrc or .profile to force an export of HOME
variable? Is it a nice way to proceed when using the right tool I can set
this different home directory directly in AD?


>
>
> Is it possible to use CN or userPrincipalName rather SAMAccountName when
>> building the system user?
>>
>
> No, you have lost me again, what do you mean by 'building the system user'


OK, here we going further.
AD is a database. When we want to use users from AD into Linux or UNIX
systems, we retrieve some information from AD (Login, UID, GID, Gecos, Home
directory, Shell) and we use these information to generate lines looking
like lines from /etc/passwd. This process is the fact of building system
user.

Using the very same AD and changing what attribute is used to fill some
field of these user lines will result in different user.

Example:
uid:x:uidNumber:gidNumber:gecos:homeDirectory:loginShell
or
sAMAccountName:x:uidNumber:gidNumber:displayName:unixHomeDirectory:loginShell

These are two ways to use AD content to generate system users. Different
users.

I'm not telling one way is better than the other, I'm telling AD can be
used in several ways. And using winbind is minimizing this number of ways
as it is lacking configuration options.


>
>
>
>> So it is not configurable.
>>
>
> Yes it is, fully on a domain member, partially on a DC


Show me. Stop telling it is possible without example as it has no value.
I gave two different user lines, show me how with winbind I can obtain both.


>
>
>
>>
>>
>>         Perhaps you are using winbind, in that case winbind is
>>         responsible to add
>>         domain and backslashes when forging your users.
>>
>>         I don't know at all nlscd but some are using it on that
>>         mailing list. So I
>>         expect it does its job too.
>>
>>         I tried SSSD for the company I'm working these days and it
>>         comes with lot
>>         of configuration options. I expect it can force addition of AD
>>         domain to
>>         username but it is not the default behaviour.
>>
>>         On some DC where it uses winbind to forge users:
>>
>>
>>     No, sorry, I cannot understand what you mean by forge, in English
>>     this word is used for creating your own banknotes or a thing used
>>     by a blacksmith.
>>
>>
>> In fact a blacksmith forges items using blacksmith tools. He creates
>> these items. These items can be something else than his own tools. In fact
>> if a blacksmith was only able to craft its own tools and nothing else for
>> other peoples, this kind of job would have quickly disappeared...
>>
>
> So what you meant was 'create a user', please don't try to get creative
> with the English language, just say what you mean.
> As for forge and a blacksmith, the word can mean the place a blacksmith
> works, the 'action' of the blacksmith doing something i.e. a blacksmith
> forges horseshoes (technical note: no, this actually done by a farrier)
> (further note: blacksmiths have virtually disappeared)
> Have we played enough with *my* language yet?


In fact what I meant was "using some tool to retrieve some information from
AD to create a system user using these information". I just thought forging
was clear enough, my bad.


>
>
>
>> Anyway you get the point, forging, crafting, building, assembling
>> elements to obtain something else, they are same concept.
>>
>
> Same basic concept, but they all mean totally different things.


Perhaps, I'm not English native. In my own language, French, all these
words have a similar background described by "assembling elements to obtain
something else". Which is what winbind and consort are doing. Assembling
elements from AD.


>
>
>
>>
>>
>>     If you add a Uidnumber to user a user in AD, then it should show
>>     on a DC, even if you are not using winbind.
>>
>>
>> Here you should have meant "if you are using winbind" which is true for
>> UID and wrong for GID which is not reflecting gidNumber configured into AD.
>>
>
> Ah, that is because you think that giving a user a gidNumber, this becomes
> the users main GID, it doesn't. The users primary gid number is obtained
> from what is set in the aptly named 'PrimaryGidNumber' attribute, AD
> obtains this and then uses whatever gidNumber that groups object contains.


False. In system point of view user primary group is the one declared in
user line (the equivalent of line from /etc/passwd) and this can be changed
using "sg" command for example.

And what attribute is used to generate that line is a choice. Samba team
has chosen to use 'PrimaryGidNumber' attribute, well, that's their choice
and it is most certainly relevant in certain conditions. Not all. And
that's so obvious other tools used to generate system users from AD have
this configurable.


>
>
>
> Should I speak again about home dir ? Shell ? Gecos ? login attribute ?...
>
> No, because I have already dealt with that.


I still don't see where you dealt with that : )


>
>
>
>> SSSD grant sys admin possibility to chose all that, forging users as
>> sysadmin wants to (which is most generally what his bosses asked to him).
>> Winbind can't.
>> And here the question is "how can the user have username using <username>
>> syntax rather than <domainname>\<username>. Is it possible to remove domain
>> part from username when using winbind? With the idmap_config lines perhaps
>> ? :p
>>
>
> Anything that sssd can do, winbind can do, but, as I have admitted, only
> fully on a domain member.


Wrong. Very wrong. One thing to push us a bit outside of the current
subject: SSSD can connect on several domains and several LDAP trees which
are not domains at same time. Can winbind do that? Just for fun : )

I know you were speaking about generating user lines from one and only one
AD domain. Once more: show me how to generate different user lines for the
same user into the same AD, without changing anything into that AD. Then
I'll start to accept winbind is configurable. Until now, for me it is not.


>
>
>
>> And more: how system is configured to retrieve users from AD! AD seems
>> well configured: it works. The question is about how to obtain system users
>> according to what this user needs and not according to what winbind thinks
>> it is the right way.
>>
>
> As I said, winbind will do what sssd does, in fact winbind is that good,
> the later versions of sssd implements a lot of the winbind code.


I never say winbind is not well coded, useless or anything like that. I say
winbind is not as configurable as SSSD which makes SSSD more suitable for
some needs.

And once again, show me how to generate different user lines with winbind
when using the AD DB, just changing what attribute is used for parts of
these lines (gecos, username, home dir, all of them).


>
>
> Rowland
>
>
> --
> 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