LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


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

Rep: Reputation: 15
Samba and Active Directory


Hi,

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:

[global]
workgroup = BENCHCAN
server string = Virtual Linux
wins server = 192.168.64.20
netbios name = BACKUP
realm = BENCHMARKCANADA.COM
password server = castor-srvr1.benchmarkcanada.com
security = ADS

[share]
path = /
guest ok = no
read only = no

Thanks!
 
Old 12-10-2006, 01:16 PM   #2
zmanea
Member
 
Registered: Sep 2003
Location: Colorado
Posts: 85

Rep: Reputation: 15
From http://ccfaq.valar.co.uk/modules.php...rticle&sid=155

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:

security=mydomain
workgroup=mydomain
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:

[mysharedfolder]
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, 11:01 AM   #3
Yig
Member
 
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.
 
  


Reply



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 08:39 AM
SAMBA and Active Directory Jer1234 Red Hat 1 07-03-2006 04:56 AM
Samba Active Directory Authentication zenix Linux - Networking 1 09-17-2005 04:26 AM
Samba and win2k active directory unforgivn Linux - Networking 1 06-07-2004 06:04 AM
Samba in Active Directory bentman78 Linux - General 2 05-06-2003 11:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:51 AM.

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