[Samba] Can only access new SAMBA fileshare from Windows as privileged user SAMDOM/Administrator, not as an ordinary user.
rpenny at samba.org
Fri Mar 29 18:02:15 UTC 2019
On Fri, 29 Mar 2019 17:21:54 +0000
Stephen via samba <samba at lists.samba.org> wrote:
> Hi Rowland!
> On 29/03/2019 16:33, Rowland Penny via samba wrote
> > Roll on 'Buster' ;-) 4.5.x is well EOL.
> Its not ideal I know! ;) Unfortunately I (and every other Raspberry
> Pi user) is stuck with this for now since this is the default Samba
> package that Raspbian currently uses unfortunately. I did check to
> see if it could be upgraded using apt to something a little more
> recent but apparently not :(
> > dns forwarder = XXX XXX XXX (obliterated here for privacy reasons!)
> > You might as well 'obliterate' totally, it is only used on a DC.
> Duly noted, thanks for the tip.
> > So, stephenellwood is an AD user, but is it also a Unix user?
> Aha! That's probably why my setup is not working! My passwd file on
> fs1 below suggests there is no stephenellwood unix user account
> pi at fs1:~ $ cat /etc/passwd
> list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
> gnats:x:41:41:Gnats Bug-Reporting System
> systemd-timesync:x:100:103:systemd Time
> systemd-network:x:101:104:systemd Network
> systemd-bus-proxy:x:103:106:systemd Bus
> sshd:x:107:65534::/run/sshd:/usr/sbin/nologin avahi:x:108:112:Avahi
> mDNS daemon,,,:/var/run/avahi-daemon:/bin/false
> There is obviously a major gap in my understanding here. Have I
> understood you correctly Rowland? You appear to be suggesting that
> there must be separate individual linux user account on EVERY samba
> file server, one new unix user account corresponding to every active
> directory account?
Err no, exactly the opposite ;-)
What I was trying to get across is that whilst 'wbinfo -u' shows your
user, it doesn't mean that the Unix OS knows your user.
For the Unix OS to know your user, you must use Samba to make the
Windows user a Unix user as well.
There are two main ways to do this, using the rid or ad winbind
Using 'rid' is easiest, you just set up smb.conf correctly, but you
have set up your smb.conf to use the 'ad' backend and this involves
more work. You must add a uidNumber attribute containing a unique
number, inside the range you have set in smb.conf, to every user you
want to be a Unix user AND give 'Domain Users' a gidnumber attribute
containing a number inside the same range.
> So what's the point in using a centralised
> authentication service like active directory then - I don't
> understand - what does AD actually achieve in Windows networking?
I think I answered that above.
> I used the following Samba tutorials to setup my fileserver fs1 but
> unfortunately these do not mention the need to create user accounts
> to complement those that active directory creates.
Under 'Configuring Samba' there is this:
If you need your users to have different login shells and/or Unix home
directory paths, or you want them to have the same ID everywhere, you
will need to use the winbind 'ad' backend and add RFC2307 attributes to
Underneath that, in a blue box, with a big blue 'i' sign, there is
The RFC2307 attributes are not added automatically when users or groups
> How do I rectify this? Can you point me at a suitable tutorial?
You don't need to rectify that ;-)
> > Have you added RFC2307 attributes to AD ?
> I don't know what this means, can you please clarify?
If you do not know what it means, then you very probably did not do it
and it is compulsory for the 'ad' backend.
The RFC2307 attributes are what you need to add to an AD user to make
Unix know who your users are.
I explained this above, so to make 'stephenellwood' a Unix user, do
Log into a Samba DC as root (or use sudo) and run:
ldbedit -e nano -H /var/lib/samba/private/sam.ldb
search for 'stephenellwood' (use Ctrl-w)
Add into the object:
Search again for 'dn: cn=Domain Users'
Add into the object:
Close and save with 'Ctrl-x'
Go back to your fileserver and type 'getent passwd stephenellwood'
This should produce output.
> > Have you installed these packages: libpam-winbind libnss-winbind
> > libpam-krb5
> Yes I definitely installed those packages.
> > Have you added 'winbind' to the 'passwd' & 'group' lines
> > in /etc/nsswitch.conf ?
> Yes, please see my nsswitch.conf below:
> pi at fs1:~ $ cat /etc/nsswitch.conf
> # /etc/nsswitch.conf
> # Example configuration of GNU Name Ser
> # If you have the `glibc-doc-reference'
> # `info libc "Name Service Switch"' for
> passwd: files winbind
> group: files winbind
> shadow: compat
> gshadow: files
> hosts: files mdns4_minimal [NO
> networks: files
> protocols: db files
> services: db files
> ethers: db files
> rpc: db files
> netgroup: files winbind
Remove 'winbind' from the 'netgroup' line.
More information about the samba