2012년 7월 12일 목요일

윈도우 AD 와 리눅스 계정, samba 연동하기 -2

윈도우 AD 와 리눅스 계정, samba 연동하기
..이지만 실제로 내부에서 손봐야할 것이 한두개가 아니다.

/etc/hosts - AD 서버 위치 지정
/etc/nsswitch.conf - 리눅스 login 시 해당 우선 순위 지정

그 외 LDAP, Kerberos 등을 설치하고 conf 파일을 수정해 주자.
/etc/ldap.conf
/etc/krb5.conf

/etc/nsswitch.conf 추가 및 설정
passwd: files winbind compact
shadow: files winbind compact
group: files winbind compact

hosts : files mdns4_minimal [NOTFOUND=return] dns mdns4

service: files
protocols: files winbind
rpc: files winbind
ethers: files

netmasks: files
networks: files
netgroup: files winbind
publickey: nisplus

bootparams: nisplus [NOTFOUND=return] files
automount: files winbind
aliases: files nisplus

/etc/ldap.conf 추가 및 설정
ex. AD 도메인이 google.dev.net 이고 AD 서버 이름이 AD1, AD2 가 있다고 가정해 보자.
이 이름은 /etc/hosts 에 등록이 되어 있어야 한다.
192.168.0.10 AD1 AD1.google.dev.net 이런식이라도 말이다.
...그래야 통신이 되지.

그리고 이번 내용 중 대소문자를 잘 써야할 내용이 많다.
괜히 소문자로 써서 안된다 하지 말고 대문자로 된 것은 대문자로 할 것.

host [AD 서버 이름을 써준다.] -> host AD1.google.dev.net AD2.google.dev.net
이 이름은 간혹 전체 이름을 영문대문자로만 써야할 때도 있다.
base [AD 도메인] -> base dc=google,dc=dev,dc=net
uri ldap://127.0.0.1/
scope sub
timelimit 120
bind_timelimit 120
bind_policy soft
idle_timelimit 3600
ssl no

nss_base_passwd dc=GOOGLE,dc=DEV,dc=NET
nss_base_shadow dc=GOOGLE,dc=DEV,dc=NET
nss_base_group dc=GOOGLE,dc=DEV,dc=NET

nss_map_objectclass posixAccount User
nss_map_objectclass shadowAccount User
nss_map_objectclass posixGroup Group

nss_map_attribute gecos con
nss_map_attribute homeDirectory unixHomeDirectory
nss_map_attribute uniqueMember member

/etc/krb5.conf 추가 및 설정
[libdefaults]
default_realm = GOOGLE.DEV.NET
clockskew = 300
ticket_lifetime = 24000
dns_lookup_realm = false
dns_lookup_kdc = false
forwardable = yes

[realms]
GOOGLE.DEV.NET = {
kdc = ad1.google.dev.net:88
kdc = ad2.google.dev.net:88
default_admin = google.dev.net
admin_server = ad1.google.dev.net:749
}

[appdefaults]
pam = {
debug = yes
ticket_lifetime = 36000
renew_lifetime = 36000
forwardable = true
proxiable = false
minimum_uid = 1
}

[admin_realm]
.google.dev.net = GOOGLE.DEV.NET
google.dev.net = GOOGLE.DEV.NET

하...많기도 하다.
일단은 여기까지...

댓글 없음:

댓글 쓰기