I'm trying to stand up a new CentOS 7 server running Samba and I'm unable to get access to the shared directories from my Windows 7 local machine. As I'm not super familiar with CentOS 7, I followed the tutorial here and can login and SSH into the server with my AD account and have access to the folder on the server with that same account. When I try to hit the server from my Windows 7 machine, I get: "Logon failure: unknown username or bad password."

Here is my smb.conf file:

    workgroup = MYDOMAINLOCAL
    server string = Samba Server Version %v for CRL publishing
    hosts allow = 127. 10.0.
    interfaces = lo ens160\16

    log file = /var/log/samba/log.%m
    log level = 3
    max log size = 50

    security = ads
    encrypt passwords = yes
    passdb backend = tdbsam
    realm = MYDOMAIN.LOCAL

    load printers = no
    cups options = raw
    printcap name = /dev/null

    comment = IT Share
    path = /data/IT
    public = no
    writable = yes
    guest ok = no
    valid users = @"itdept@mydomain.local"

I'm at a loss at this point and I've spent the past several hours scouring the internet for any answer to no avail.

Other things I've done:

# firewall-cmd --permanent --zone=public --add-service=samba
# chcon -t samba_share_t /data/IT
# groups myusername@mydomain.local
myusername@mydomain.local: itdept@mydomain.local
  • Likely not the issue, and you've probably already checked, but have you confirmed that your win7 box has an IP that falls within your allowed host range? – Gravy Feb 9 '15 at 20:24
  • Also, what method are you using to connect from the windows side? – Gravy Feb 9 '15 at 20:36
  • Have you already joined the CentOS server to your AD domain? – Alfonso Feb 9 '15 at 20:41
  • Yes. I can login and ssh in with my AD account – cypher Feb 9 '15 at 20:53
  • Yes, my win7 box has a valid IP in the same range and can ping the server. – cypher Feb 9 '15 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.