Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 12-08-2006, 11:33 AM   #1
Registered: Aug 2005
Location: Montreal, Qc
Distribution: CentOs 4.5/5.0
Posts: 113

Rep: Reputation: 15
Samba and Active Directory


I compiled Samba 3.0.23d on a CentOS 4.4 machine. Then I configured /etc/krb5.conf for my domain. Was able to successfully run kinit and join my Windows 2003 domain with a net ads join. Net ads user and net ads group returns the users and the groups of the domain.

So far so good.

I'm kinda stuck on the next step. I would like to grant access to the share defined in smb.conf to anybody in the domain. How do I make it authenticate users on the domain instead of using the server?

Content of smb.conf:

workgroup = BENCHCAN
server string = Virtual Linux
wins server =
netbios name = BACKUP
password server =
security = ADS

path = /
guest ok = no
read only = no

Old 12-10-2006, 02:16 PM   #2
Registered: Sep 2003
Location: Colorado
Posts: 85

Rep: Reputation: 15

If you've got an NT/2000 Domain you can configure Samba to use your NT usernames and passwords to connect to shares on your Linux machine.

To configure Samba to use NT Domain authentication, follow these steps:

1. Give you linux machine a netbios name in the file /etc/samba/smb.conf. This is defined in the line that starts netbios name =
2. In Server Manager on NT, add your linux computer to the domain using it's netbios name
3. Stop all Samba daemons on your linux box and issue the following command:

smbpasswd -j MYDOMAIN -r DOMAINPDC

You should replace MYDOMAIN and DOMAINPDC with the appropriate info
You should get a response similar to:
2002/11/19 22:09:38 : change_trust_account_password: Changed password for domain MYDOMAIN.
Joined domain MYDOMAIN.

4. Add/change the following lines to the global section of your smb.conf:

encrypt passwords=yes
password server=DOMPDC

5. Your linux server is now configured to use NT Domain credentials to allow/deny access to shares, but you'll need to specify who get's access first. To create a share add the following lines:

comment = my shared folder
path = /home/somewhere
writable = yes
public = yes
printable = no
admin users = Comma Separated NTUser List
write list = Comma Separated NTUser List
read list = Comma Separated NTUser List

6. If you want to amend an existing share just add the admin users=/write list=/read list= line(s) to the share definition
7. Finally, start samba up again.

It should be noted that user's specified in the admin users directive will do all file operations as root.
Old 12-11-2006, 12:01 PM   #3
Registered: Aug 2005
Location: Montreal, Qc
Distribution: CentOs 4.5/5.0
Posts: 113

Original Poster
Rep: Reputation: 15
I'm using Win 2003.

I nearly got everything working. I cannot authenticate but net ads user and wbinfo -u both returns the users of my domain so I know I'm on the right track.

So close yet so far.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
samba 3.0.23 and active directory (ads) jtmillard Linux - Software 2 08-04-2006 09:39 AM
SAMBA and Active Directory Jer1234 Red Hat 1 07-03-2006 05:56 AM
Samba Active Directory Authentication zenix Linux - Networking 1 09-17-2005 05:26 AM
Samba and win2k active directory unforgivn Linux - Networking 1 06-07-2004 07:04 AM
Samba in Active Directory bentman78 Linux - General 2 05-06-2003 12:33 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:27 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration