n-n

smbldap-populate 실행시 에러 본문

Linux/CentOS 5.x

smbldap-populate 실행시 에러

n-_-n 2008. 10. 20. 19:07
다음을 살펴보자...
[root@company ~]# smbldap-populate
Populating LDAP directory for domain WORKGROUP (S-1-5-21-1153481521-3496755048-900298837)
(using builtin directory structure)

adding new entry: dc=company,dc=intra
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 498, line 2.
adding new entry: ou=Users,dc=company,dc=intra
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 498, line 3.
adding new entry: ou=Groups,dc=company,dc=intra
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 498, line 4.
adding new entry: ou=Computers,dc=company,dc=intra
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 498, line 5.
adding new entry: ou=Users,dc=company,dc=intra
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 498, line 6.
adding new entry: uid=root,ou=Users,dc=company,dc=intra
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 498, line 7.
adding new entry: uid=nobody,ou=Users,dc=company,dc=intra
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 498, line 8.
adding new entry: cn=Domain Admins,ou=Groups,dc=company,dc=intra
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 498, line 9.
adding new entry: cn=Domain Users,ou=Groups,dc=company,dc=intra
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 498, line 10.
adding new entry: cn=Domain Guests,ou=Groups,dc=company,dc=intra
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 498, line 11.
adding new entry: cn=Domain Computers,ou=Groups,dc=company,dc=intra
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 498, line 12.
adding new entry: cn=Administrators,ou=Groups,dc=company,dc=intra
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 498, line 16.
adding new entry: cn=Account Operators,ou=Groups,dc=company,dc=intra
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 498, line 18.
adding new entry: cn=Print Operators,ou=Groups,dc=company,dc=intra
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 498, line 19.
adding new entry: cn=Backup Operators,ou=Groups,dc=company,dc=intra
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 498, line 20.
adding new entry: cn=Replicators,ou=Groups,dc=company,dc=intra
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 498, line 21.
adding new entry: sambaDomainName=WORKGROUP,dc=company,dc=intra
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 498, line 21.

Please provide a password for the domain root:
No such object at /usr/sbin//smbldap_tools.pm line 406.


이곳 저곳을 뒤지던 끝에, domain root가 근본적인 원인이라는 것이 밝혀지긴 했지만,
또 하나의 문제가 있었다.
어느새인가 삼바가 제대로 가동이 되지 않았다는...

이거이 왜 이러는데?
smb.conf 의 문제?
일단 smb.conf 를 무한 삽질로 변경을 해보면서 수없이

[root@company ~]# service smb restart && service smb status

를 해보았지만, 나오는 메세지는 똑같았다.
계속해서 삽질을 반복...
(누가 이기나 해보자는거냐~)

[root@company ~]# service smb start
Starting SMB services:                                     [  OK  ]
Starting NMB services:                                     [  OK  ]

[root@company ~]# service smb status
smbd dead but pid file exists
nmbd (pid 13503) is running...

아... 좌절에 좌절...
여기서 무심코 다시 한 번 끈기 있게 시도를 해보았다.
서버 세팅 과정에 문제가 있지 않았을까?
또는 비밀 번호 세팅에?

[root@company ~]# smbpasswd -w [rootdn 의 패스워드...]
혹시 [rootdn 의 패스워드...] 가 그 단서?
/etc/openldap/sldap.conf 에 삽입했던
rootpw  값 그대로 넣어볼까라는...

{MD5}P.........==

를 넣고

[root@company ~]# service smb restart && service smb restart && service smb status

(다시 한 번 확인하기 위해서 restart를 두번 시도 하였다.)

오~~ 삼바가 제대로 가동되고 있었다.

다시 한 번 용기를 내어 smbldap-tools 를 재시도

[root@company ~]# cd /usr/share/doc/smbldap-tools-0.9.5 && ./configure.pl

그리고 마지막으로~!!!

[root@company ~]# smbldap-populate
!!!! 뜨아~!! 감격의 순간.
일주일간의 허무했던 날들을 생각하면 ㅠㅠ
간신히 samba + ldap + with smbldap-tools 가 제대로 세팅이 완료되었다.


혹시나 하는 단서이지만,


smbpasswd -w ...
에서 {MD5}... 비밀번호를 넣어줬어야 하는 이유가
"Use MD5 Passwords" 가 체크되지 않아서였을까?
내공의 부족을 뼈저리게 느낀다. OTZ


2008년 10월 20일 추가

정상적으로 samba 가 가동된다고 착각하고 있었으나,
이상하게도 도메인에 연결이 되지 않는 현상이 일어났다.
다음과 같은 코맨드를 실행했으나 계속적인 에러의 연발!

[root@company ~]# smbclient //localhost/profile -U user
Error connecting to 127.0.0.1 (Connection refused)

ㅠㅠ;
 [root@company ~]# service smb status
smbd (pid 5678) is running...
nmbd (pid 5681) is running...
samba 는 정상적으로 가동되고 있다는 메시지임에도 불구하고,
연결이 안된다는 에러 메시지에
로그를 살펴보았더니~~ 헉! 왠걸...
[root@company ~]# tail /var/log/samba/log.smbd
[2008/10/20 16:50:51, 1, pid=6028, effective(0, 0), real(0, 0)] lib/smbldap.c:another_ldap_try(1153)
  Connection to LDAP server failed for the 2 try!
[2008/10/20 16:50:52, 1, pid=6028, effective(0, 0), real(0, 0)] lib/smbldap.c:another_ldap_try(1153)
  Connection to LDAP server failed for the 3 try!
[2008/10/20 16:50:53, 1, pid=6028, effective(0, 0), real(0, 0)] lib/smbldap.c:another_ldap_try(1153)
  Connection to LDAP server failed for the 4 try!
[2008/10/20 16:50:54, 1, pid=6028, effective(0, 0), real(0, 0)] lib/smbldap.c:another_ldap_try(1153)
  Connection to LDAP server failed for the 5 try!
[2008/10/20 16:50:55, 1, pid=6028, effective(0, 0), real(0, 0)] lib/smbldap.c:another_ldap_try(1153)
  Connection to LDAP server failed for the 6 try!
어절씨구~!!!
검색을 해본 결과...
다음과 같은 곳에 힌트가 있었다.

akky’s log >> CentOS5 に sambaを使ってドメインコントローラー
http://www.akky.org/archives/77
부분의 하단을 참조

# service smb start
/var/log/samba/smbd.log に下のエラーが手続けるのは、 ldapに管理者で接続できていない。のが原因
/var/log/samba/smbd.log 에 아래와 같은 에러가 계속되는 이유는, ldap에 관리자의 접속이 되지 않는것이 그 원인!
이라는....
설명대로,

[2008/01/25 11:45:31, 1] lib/smbldap.c:another_ldap_try(1153)
Connection to LDAP server failed for the x try!

対応は
・「smbpasswd -w パスワード」を再実行
・/etc/samba/smb.conf の 「ldap admin dn」を確認

대응은,
* "smbpasswd -w 패스워드" 를 재실행
* /etc/samba/smb.conf 의 "ldap admin dn" 을 확인
다시 확인을 했더니 정상적으로 작동 하였다.
[root@company ~]# service ldap start && service smb start
Checking configuration files for slapd:  config file testing succeeded
                                                           [  OK  ]
Starting slapd:                                            [  OK  ]
Starting SMB services:                                     [  OK  ]
Starting NMB services:                                     [  OK  ]
[root@company ~]# smbclient //localhost/homes -U user
Password:
Domain=[TESTGROUP] OS=[Unix] Server=[Samba 3.0.28-1.el5_2.1]
smb: \> exit

아~! 감동감동감동~~!!!!

Comments