Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have only a short question. Is it possible to set up a samba server, who's able to authenticate some users against Active Directory and some users against a local passdb file?

We want to exchange (large) files between company users and our customer. So I cant add the customer users into our AD - the win Admins don't want it. So at the moment I have a separate account db. The company users exists in AD and separately with additional accounts on my linux samba box

Now it would be nice, if i can get the company users via AD and then I'll add the customer (by hand) to a local passdb.

Thanks for you help peter

share|improve this question

This is possible (perhaps in more recent versions of samba):

If you are using security = ads in your smb.conf file, to be part of a domain, you can still add users locally (using useradd) and then use smbpasswd -a username to add a password for them (to the default tdb backend, as I hadn't configured this explicitly).

You'll need to use SERVERNAME\username as the name to connect as, rather than DOMAIN\username, but otherwise this appears to work just fine.

This worked for me on CentOS 7 with samba 4.2.3 with a Windows 7 (domain-joined) client, but I cannot vouch for any other versions.

Note: You'll still need the user to be added to the local passwd file (or another user information source which is in use via NSS, such as LDAP or NIS) so that getent passwd username works, but they don't need to have a valid shell or a system password for samba to work OK.

share|improve this answer

If you got two ips, you can run two instances of samba one that authenticates against ad and one against the local db. see, i do not think it is possible to mix authentication methods on one samba host.

share|improve this answer
It is possible - see my answer. It seems that samba will use the local password database, but only when you explicitly specify the domain as the name of the server. – David Gardner Jan 14 at 16:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.