· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
ADDwithSMB

Active Directory Domain with Samba Domain Member Server


작업시 유의사항

  • 시스템 마이그레이션 작업시에 ad 와 uid , gdi 매핑이 풀리는 경우가 있다.
  • 유의하자 -_-;; ( 아직 해결책 못찼음 )

추가 요청 사항 , 변경요구점

  • 작성해주십시오.

연계절차

설정 파일은 다음과 같습니다.

/etc/samba/smb.conf

   unix charset = CP949
   netbios name = URSERVERNAME
   workgroup = URWORKGROUP
   server string = URSERVERNAME
   hosts allow = 111.222.333.444
   log file = /var/log/samba/%m.log
   max log size = 50
   realm = UR ACTIVE DIRECTORY REALM
   security = ADS
   encrypt passwords = yes
   username map = /etc/samba/smbusers
   socket options = TCP_NODELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
   ldap ssl = no
   dns proxy = no
   idmap uid = 10000-20000
   idmap gid = 10000-20000
   template shell = /bin/false
   winbind enum users = yes
   winbind gid = 10000-20000
   winbind enum groups = yes
   winbind separator = +
   winbind cache time = 10
   winbind use default domain = Yes 
   # yes 일시에는 조금 틀려짐 
   template primary group = "UR AD GROUP NAME"
   template shell = /bin/bash
   template homedir = /samba/users/%U
   # 유저 맵핑이 풀리는 경우가 있어서 다음줄 추가
   client schannel = no

/etc/nsswitch.conf 를 다음처럼 바꿉니다.


나머지 부분은 유지합니다.
passwd:     compat winbind
shadow:     files
group:      compat winbind
hosts : files dns wins 

/etc/samba/*.tdb 를 삭제합니다

rm -f /etc/samba/*.tdb 
==== /var/cache/samba/*.tdb 를 삭제합니다.====
rm -f /var/cache/samba/*.tdb

/etc/krb5.conf 를 다음과 같이 수정한다


[logging]
 default = FILE:/var/log/krb5libs.log
 kdc = FILE:/var/log/krb5kdc.log
 admin_server = FILE:/var/log/kadmind.log

[libdefaults]
 default_realm = '''UR ACTIVE DIRECTORY REALM'''
 ticket_lifetime = 24000
 dns_lookup_realm = false
 dns_lookup_kdc = false


[realms]
 '''UR ACTIVE DIRECTORY REALM''' = {
        kdc = '''UR ACTIVE DIRECTORY HOSTNAME''':88
 }

active directory 에 로긴합니다.

kinit administrator@UR ACTIVE DIRECTORY REALM
passwd:암호 넣음 (관리자 암호 )

파일써버를 연동시킵니다

net ads join -UAdministrator@UR ACTIVE DIRECTORY REA
passwd:암호 넣음 (관리자암호 )

rpc 에 조인합니다

net rpc join -UAdministrator@UR ACTIVE DIRECTORY REALM
passwd:관리타암호

winbind 와 smb 서비스를 올립니다

chkconfig --add smb
chkconfig --add winbind
service smb restart
service winbind restart 

유저와 그룹의 연동을 확인합니다


wbinfo -u : 유저 확인
wbinfo -g : 그룹 확인

다음과 같이 나옵니다.
[root@file var]# wbinfo -u
TEST+MAIN$
TEST+Administrator
TEST+DC$
TEST+Guest
TEST+IUSR_MAIN
TEST+IWAM_MAIN
TEST+test3
TEST+test1
TEST+test2
...

[root@kiwi var]# wbinfo -g
BUILTIN+System Operators
BUILTIN+Replicators
BUILTIN+Guests
BUILTIN+Power Users
BUILTIN+Print Operators
BUILTIN+Administrators
BUILTIN+Account Operators
BUILTIN+Backup Operators
BUILTIN+Users
... 중간 생략 ...
TEST+개발실
...

다음과 같이 삼바의 영역을 설정해봅니다

[devel]
   comment = 개발실
   path = /samba/devel
   read list = @개발실
   writable = yes
   write list = @개발실
   create mask = 0770

uid/sid 문제 해결을 위한 nuri 님의 팁

  • net idmap restore 로 winbindd_idmap.tdb 만들어두면 uid /sid 문제 없다
  • net idmap dump > idmap_dump 로 덤프
  • net idmap restore < idmap_dump 로 리스토어 ( 윈바인드 구동전에 )
  • fc5 에 있는 samba 3.0.23 버젼은 여러가지 sync 문제들이 해결되었음


ID
Password
Join
You attempt things that you do not even plan because of your extreme stupidity.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2006-08-23 18:48:24
Processing time 0.0053 sec