Configure Samba to use domain accounts for authentication

by on April 13, 2006 · 4 comments· LAST UPDATED January 31, 2007

in , ,

Q. How can I configure Samba to use domain accounts for authentication, so that user will be authenticated?

A. Samba server provides an options that allows authentication against a domain controller. Edit your smb.conf file using vi text editor:
Type the following command as root user

# vi /etc/samba/smb.conf
OR
$ sudo /etc/samba/smb.conf

Make sure parameters are set as follows [global] section of smb.conf file:

workgroup = YOUR-DOMAIN-CONTROLLER
netbios name = YOUR-SAMBA-SERVER-NAME
password server = IP-ADDRESS-OF-YOUR-DOMAIN-CONTROLLER
encrypt passwords = Yes
preferred master = No
domain master = No

Where,

  • Workgroup: This controls what workgroup your server will appear to be in when queried by clients.
  • netbios name : This sets the NetBIOS name by which a Samba server is known.
  • encrypt passwords : This boolean controls (YES or NO value) whether encrypted passwords will be used with the client. Note that Windows NT 4.0 SP3 and above and also Windows 98 will by default expect encrypted passwords unless a registry entry is changed. This is what you need to use for Window XP/2000/2003 systems.

Restart samba serve:
# /etc/init.d/samba restart

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 4 comments… read them below or add one }

1 Lowell Boggs February 1, 2007 at 10:30 pm

I am using a Samba server on a Solaris box with Windows domain controllers for certification. Every file request coming from a pc running XP is resulting in a certification request from the Samba server to the domain controller. Since we deal in thousands of files, this is consuming a bit of time.

Is there a way to configure Samba such that the granted certification is assumed to be valid for some extended period of time — such as 5 minutes?

Thanks for any advice you can give.

Reply

2 Md. Asaduzzaman Shuvo February 9, 2010 at 6:04 am

I configured linux redhat samba server and already shared a directory which will be use for data sharing but problem is when we want to connect from windows Xp then we can see the share directory but we are unable to access when we double click on the share directory then appear below error message.
===============Error message=================
\\192.168.159.234\\home is not accessible. You might have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.
Access is denied.
===========================================
Please advice how do I solve the problem

Reply

3 configure domain January 12, 2011 at 9:44 am

Very helpful information.Thank you so much. I’ve been trying to figure out this issue. great job.Keep going

Reply

4 Hari Krishna March 7, 2011 at 11:25 am

The Samba share can be accessed even if we are not integrated with Domain Controller. The Share will authenticate by Username itself. If we have configured the samba share for user andrew and in domain controller there is user andrew, we can open the samba share folder.

Is this an Bug???

Reply

Leave a Comment

Tagged as:

Previous Faq:

Next Faq: