[Samba] clients not connecting to samba shares
Gary Dale
gary at extremeground.com
Sat Apr 1 18:10:31 UTC 2023
On 2023-04-01 13:24, Rowland Penny via samba wrote:
>
>
> On 01/04/2023 17:51, Gary Dale via samba wrote:
>
>>
>> The single point of authority requires modifying every Linux
>> installation I've got to point to that authority. And what happens
>> when the Authority isn't accessible (e.g. a laptop while on
>> vacation)? It needs to fallback to a local password authority.
>
> If the laptop is running Linux, then add 'winbind offline logon = yes'
> to the smb.conf, winbind will cache the required credentials.
>
>
>> Again, these lines are from the Samba wiki. They weren't my idea. If
>> something is now obsolete, the wiki pages should be updated by
>> someone who knows how Samba currently operates. I note that the wiki
>> distinguishes between pre and post 4.6. If further changes to Samba
>> were made, the wiki doesn't reflect it.
>
> Can you please tell me just where in the Samba wiki it says add those
> lines to a DC's smb.conf ?
> Failing that, can you please say where in the wiki you think it says
> that ?
> Either way, I will fix it so it explicitly says to never add those
> lines to a DC's smb.conf, they have never been used or worked on a DC.
https://wiki.samba.org/index.php/Idmap_config_ad in the Configuring the
ad Back End section.
>
>>
>>
>>>
>>>> vfs objects = acl_xattr
>>>
>>> Now that is a really, really big mistake. Whilst 'acl_xattr' is one
>>> of the vfs objects used by a DC, you have just turned off the main
>>> one ' dfs_samba4'
>>
>> See previous comment.
>
> See my previous comment and here:
> https://wiki.samba.org/index.php/Using_the_acl_xattr_VFS_Module
>
> Where it states:
>
> On a Samba Active Directory (AD) domain controller (DC), the acl_xattr
> module is automatically globally enabled and cannot be deactivated.
> You must not add it to your smb.conf file manually.
>
> Also see here:
>
> https://wiki.samba.org/index.php/Setting_up_Samba_as_an_Active_Directory_Domain_Controller
>
>
> Where amongst other things it says this:
>
> You should be aware that if wish to use a vfs object on a DC share
> e.g. recycle, you must not just set vfs objects = recycle in the
> share. Doing this will turn off the default vfs objects dfs_samba4 and
> acl_xattr. You must set vfs objects = dfs_samba4 acl_xattr recycle.
>
> That is under the 'Using the Domain Controller as a File Server
> (Optional)' heading
Which shows that the documentation is fragmented and contradictory (not
to mention obfuscated). If something is OK to set in one instance but
not another, shouldn't that be highlighted? We have hyperlinks these days.
>
>>>
>> That may be true for full-time domain admins. However it seems less
>> apt for people using Linux at home who need to run a windows
>> (virtual) machine occasionally. Linux isn't built around AD and even
>> using Kerberos is rarely something home users do.
>
> Yes, historically, Linux wasn't built around AD, but that isn't a
> reason to not use it. You will find it easier to maintain than
> individual machines, just one place to maintain users, groups etc,
> rather than on every machine. Want to change a users password ? Either
> do it once on an AD DC, or go to every machine and change it, this can
> get tiring if you have a lot of machines.
>
>>
>> And from what I've been seeing, you actually need to run a Windows
>> client to administer AD - Linux programs no longer seem to be capable
>> of doing everything that is needed. That makes advising using AD
>> problematic - something to be avoided if possible.
>
> You can use samba-tool or one of the numerous other methods.
Not according to a lot of the recent documentation. It's telling me to
use the Windows tools, which are a nightmare, to do things that I'd
prefer to do through the Linux tools.
>
>>
>> As for forgetting NT4-style domains, I'm following documentation that
>> deals strictly with Samba 4. I'd been running AD servers in various
>> locations for a long time (an office with only Windows clients, my
>> home with a mix of Linux and Windows clients). It's only in the last
>> year that (some) things have stopped working. That's not due to a
>> switch from NT4 to AD. It's due to AD breaking things.
>
> An NT4-style domain relies on SMBv1, this is going away and is
> generally turned off now.
How would that stop my Windows 10 VM from accessing shares? I recall
some registry settings being needed to get Windows 7 to work with Samba
but that's ancient history...
>
>>
>> My Linux server has been a great single-point of maintenance without
>> my needing to jump through hoops. Conversely, getting any Linux
>> workstation to authenticate to an AD instance has never worked. I
>> tried that a few times over the last decade with zero success. In
>> fact my workstation's /etc/nssswitch.conf still has the settings to
>> use winbind for authentication. Fortunately it allows a fallback...
>
> If you cannot get a Linux machine to authenticate to AD, then it
> sounds like you are doing something wrong.
>
> Can you share the smb.conf from your workstation ?
Haven't tried it since pre-pandemic - certainly not with a Bullseye
server - so it is not going to be interesting to look at. It definitely
predates the backports version of Samba.
That's why I'm looking for something more recent so I can retry.
>
>>
>> Can you point me to an up-to-date and accurate howto on setting up a
>> Linux client to use AD and NFS4?
>
> I will get back to you on that, as I said, I do not know much about
> NFS because I do not use it, I just use Samba, on everything.
>
> Rowland
Thanks.
I tried using Samba once rather than NFS but that broke things. I keep
my mail on the server and Thunderbird didn't work properly. Reverting to
NFS fixed that. Also, Samba shares seemed slower and less reliable. NFS
just works.
More information about the samba
mailing list