[Samba] User permissions of profile/home directory lost
rpenny at samba.org
Fri Mar 2 09:23:34 UTC 2018
On Thu, 1 Mar 2018 20:08:29 -0700
"Paul R. Ganci via samba" <samba at lists.samba.org> wrote:
> Hi Rowland,
> Whatever is occurring has happened again today. I had to "chown -R"
> my wife's home/Profile directories and files. Very strange and makes
> me wonder if she doesn't have some kind of malware on her laptop. I
> am checking that now.
> In any case let me answer your questions. The DC is an AD DC. I
> originally set it up with an early 4.0 version of Samba. Over time I
> haven't really done anything to the configuration. However, there
> were a few things necessary as the behavior of Samba ADs changed with
> new versions. Before I show the smb.conf file several historical
> things should be noted.
> 1.) I originally used a RID back-end. However, I was persuaded on a
> 10/22/2013 thread to switch to an AD back-end. I did that but kept
> the RID generated UID/GID. You had mentioned in another thread that
> was confusing but I never changed to saner UIDs/GIDs because
> everything worked as it was.
As you are running Samba as a DC, you only have two choices of backend
and RID isn't one of them ;-)
By default a DC uses xidNumber attributes stored in idmap.ldb, these
numbers start at '3000000', you can override these by giving your users
a uidNumber and these will be used instead.
If you do not have any other Unix machines, there is no point in
overriding the xidNumber attributes.
> 2.) There is a long "server services" line that at one point you had
> questioned in an early thread when winbind on the DC behavior
> changed. You pointed out what I had was equivalent to something
> simpler albeit I couldn't find the thread but it was around the time
> I updated from 4.1.18 to 4.2.2.
You only need the long 'server services' line if you want to turn off
one (or more) of the servers (in your case, dns), you could also
replace your line with 'server services = -dns' , it means the same
thing. I think your reference to winbind goes back to when the
'winbind' part of the 'samba' daemon was replaced by the separate
> 3.) I have the winbind enum groups/users set to yes purposely. I have
> so few users there is no penalty really. It is nice to have getent
> enumerate all the users and groups for debug reasons. That is usually
> one of the first things I do after an upgrade.
At least you understand that just because 'wbinfo -u' shows users, it
doesn't mean the OS knows who they are.
> 4.) The original set up is what I could find on the web back in the
> fall of 2013 when I setup the domain. Everything has worked
> relatively flawlessly until this week (2/25/2018) so that is nearly 5
> years without doing much maintenance except Samba updates.
Yes, the smb.conf on a DC hasn't changed much ;-)
> Presently the AD DC runs on a Dell 2950iii with Centos 6.9, the
> Sernet packages version 4.7.5-10. I am not sure but I think this
> problem occurred with an update from a 4.7.4 version. I was thinking
> of downgrading to see if the problem disappears.
> Here is a sanitized version of the smb.conf on the AD DC and some
> other linux stuff on the DC
> server string = Active Directory Server
> workgroup = MYDOM
> realm = MYDOM.NURDOG.COM
> netbios name = NIKITA
> server role = active directory domain controller
> server services = s3fs, rpc, nbt, wrepl, ldap, cldap, kdc,
> drepl, winbindd, ntp_signd, kcc, dnsupdate
> bind interfaces only = yes
> interfaces = br0 lo
> encrypt passwords = true
> kerberos method = secrets and keytab
> winbind use default domain = yes
> winbind offline logon = false
> winbind enum groups = yes
> winbind enum users = yes
> # winbind separator = +
> winbind nss info = rfc2307
> map untrusted to domain = no
> template homedir = /home/%U
> template shell = /bin/bash
> idmap_ldb:use rfc2307 = yes
There are a couple of default settings, but you have 'map untrusted to
domain = no', this was the default until 4.7.0, but this changed to
'auto', it might be an idea to read 'man smb.conf'
> The two users have these IDs as determined by getent:
Ah, I think I see where your 'RID' backend comes from, you have added
the users RID to '3000000' and then added this as a uidNumber attribute
There is nothing really wrong with your set up, I think you may be
doing the right thing by examining the windows client.
More information about the samba