manywaypark's Blog
개발, 검색, 함수

[개발환경] LDAP Server 설치

카테고리 없음 2011. 6. 14. 20:15 by manywaypark
중앙집중화된 로그인 관리를 위해서 LDAP를 설치한다.

1. 설치
$ sudo apt-get install slapd ldap-utils
설치 시 admin password를 입력하라고 나오면 입력한다. 

2. 관리도구
ldap 관리는 Apache Directory Studio를 다운 받아 설치한다. RCP 버전이나 eclipse plugin 중에서 입맛에 맞는 것을 설치하면 된다.
RCP 버전을 실행하거나 플러그인 설치의 경우 LDAP perspective로 전환하면 LDAP 브라우징이 가능하다.
Connections view에서 새연결을 선택하고, 상기 slapd를 설치한 호스트 주소를 입력하고, 관리자계정을 등록한다.
도메인 설정이 localdomain으로 설치되었다면, 계정을 다음과 같이 입력하면 된다[각주:1].
cn=admin,dc=localdomain

3. 계정/그룹 설정
LDAP Browser view에서 Root DSE > dc=localdomain을 선택한 후 오른쪽 클릭 후 "New Entry..."를 선택한 다음,
다음 절차를 거쳐서 group 유닛을 생성한다.
1. Create entry from scratch를 선택 후 Next
2. Available object classes에서 organizationUnit 선택 후 Add, 그 다음 Next
3. RDN에 ou=group으로 입력후 Finish
상기 절차를 반복하여 machines, people, project 등의 unit을 생성한다[각주:2].

ou=people 선택 후 오른쪽 클릭 "New Entry..." 선택한 다음 다음 정보로 사용자 계정 생성
objectClass: inetOrgPerson
objectClass:posixAccount
objectClass: shadowAccount
cn: 사용자이름
gidNumber: 10000
homeDirectory: /home/아이디
sn: 성
uid: 사용자 아이디
uidNumber: 사용자 아이디 번호
givenName: 이름
loginShell: /bin/bash
mail: 메일 주소
userPassword: 암호
id 관련 내용을 다르게하여 다른 사용자도 추가 한다.

ou=group 선택 후 오른쪽 클릭 "New Entry..." 선택한 다음 다음 정보로 포직스 그룹 생성
objectClass: posixGroup (structural)
cn: svnusers
gidNumber: 10000
추가적으로 cn을 tracusers, hudsonusers, reviewboardusers 등의 제공할 service 명칭으로 차례로 생성한다.

cn=svnusers 선택후 오른쪽의 Entry Editor에서 New Attribute... 선택 후 memberUid attribute를 추가하고 svn을 사용할 사용자의 cn을 추가한다.
(다른 서비스들도 동일하게 처리한다)

refs: 
https://help.ubuntu.com/community/OpenLDAPServer
http://directory.apache.org/studio/ 
LDAP Trouble Shooting 

happy hackin'
  1. /etc/ldap에서 grep -iR rootdn으로 정확한 설정을 알 수 있다. [본문으로]
  2. Use existing entry as template 옵션을 사용하면 좀 더 편리하다. [본문으로]
기초:
기본적으로 /systemro(read-only)로 mount되므로 rw로 mount하기 위해 다시 마운트한다.
adb remount

문제:
adb push/system의 하위에 파일을 쓰려고 하면 다음과 같은 에러가 나면서 안된다.
error msg:
failed to copy 'foo.bar' to '/system/foo.bar': Out of memory


해결:
[Android SDK 설치 디렉토리]/platforms/android-[#target]/images/system.img 파일을 avd image가 있는 곳으로 복사한다.
보통은 ~(home)/.android/avd/[avd이름.avd] 아래에 있다.
또한 emulator 실행시에 system, data용으로 파티션을 잡아준다 (파티션을 안잡아도 상기 에러가 나는 것같다).
$ ./emulator -avd Android2.2 -partition-size 96

원인은 아마도 기본 SDK 설치 디렉토리의 이미지들은 변경이 불가한듯하다 (생각해보면 뭐 당연한 디자인이다).
난 AVD 생성시 모든 시스템이 통째로 다 생기는 줄 알고 있어서 한참을 헤맸던 것이다. Orz.

ref: http://forum.xda-developers.com/archive/index.php/t-880831.html

happy hackin'
 
문제:
python에서 unittest 모듈을 써서 unit test를 할 때 다음과 같이 썼다.

if __name__ == '__main__':
unittest.main()


수행하면 다음과 같이 테스트케이스 다 실행하고 OK 뜬 후에 exception이 났다. 좀 찜찜했다.

......
......
Ran 2 tests in 12.545s

OK
Exception in thread "main" Traceback (most recent call last):
  File "D:\comms_share\csm-gui-test\sikuli\csmLogin.sikuli\csmLogin.py", line 11
1, in <module>
    unittest.main()
  File "D:\comms_share\csm-gui-test\sikuli-script.jar\Lib\unittest.py", line 768
, in __init__
  File "D:\comms_share\csm-gui-test\sikuli-script.jar\Lib\unittest.py", line 806
, in runTests
SystemExit: False


해결:
여기저기 뒤져봤더니 IDLE 문제라고 이미 알려져있었다.
다음과 같이 쓰면 된다.

class FooTest(unittest.TestCase) :
def setUp(self) :
......
def tearDown(self):
......
def testSomething() :
......

if __name__ == '__main__':
suite = unittest.TestLoader().loadTestsFromTestCase(FooTest)  
unittest.TextTestRunner(verbosity=2).run(suite)


python 버전 정보는 다음과 같다

Python 2.6.5 (r265:79063, Jun 12 2010, 17:07:01)
[GCC 4.3.4 20090804 (release) 1] on cygwin


refs:
오류 상황:

git clone https://github.com/KentBeck/junit.git
Cloning into junit...
error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://github.com/KentBeck/junit.git/info/refs

fatal: HTTP request failed


해결:
환경변수 GIT_SSL_NO_VERIFY를 true로 설정하면 된다.

GIT_SSL_NO_VERIFY=true


refs:

happy hackin'

MacPort 전체 정리

tips & tricks 2011. 4. 6. 18:32 by manywaypark
생각없이 쓰다보니 맥북의 하드가 꽉찼다. Orz
다운로드 폴더에서 이거 저거 지우다가 문득 든 생각... 어제 port upgrade outdated를 하고 나서 disk full이 난거같았다.
MacPort가 생성한 임시 파일들 정리하는 법은 의외로 간단했다.

$ sudo port clean --all all


추가적으로 비활성(inactive) 패키지 삭제(uninstall) :

$ sudo port uninstall inactive


다 하고 나니 약 4G 정도 늘어난듯...

refs:
Clean way to uninstall outdated inactive ports

happy hackin' 
간만에 방치(?)되어있던 테스트 박스에서 뭔가 작업을 하려고 했는데 버전이 좀 오래되어서 신경쓰였다.
버릇처럼 apt-get upgrade 했으나 필요한 파일들을 가지고 오지 못했다.
지원이 중단된 것이다. Orz.

해결은 배포판을 업그레이드 해야했다.
sudo do-release-upgrade

ref: http://www.ubuntu.com/desktop/get-ubuntu/upgrade

happy hackin'

Mac OS X용 R 설치 직후에 한글을 표시하려 하면 Quartz 화면에서는 한글이 제대로 표시되지 않고 네모 상자로 표시되는 문제가 있다.
~/.Rprofile 파일(없으면 생성)에 다음 내용을 추가:
setHook(packageEvent("grDevices", "onLoad"), function(...){ if(capabilities("aqua")) grDevices::quartzFonts( sans =grDevices::quartzFont(rep("AppleGothic",4)), serif=grDevices::quartzFont(rep("AppleMyungjp",4))) grDevices::pdf.options(family="Korea1") grDevices::ps.options(family="Korea1") } ) attach(NULL, name = "KoreaEnv") assign("familyset_hook", function() { macfontdevs=c("quartz","quartz_off_screen") devname=strsplit(names(dev.cur()),":")[[1L]][1] if (capabilities("aqua") && devname %in% macfontdevs) par(family="sans") }, pos="KoreaEnv") setHook("plot.new", get("familyset_hook", pos="KoreaEnv")) setHook("persp", get("familyset_hook", pos="KoreaEnv"))
refs:
http://www.mail-archive.com/r-sig-mac@stat.math.ethz.ch/msg04538.html

happy hackin'

[TIP] Erlang on Android

tips & tricks 2010. 12. 23. 19:24 by manywaypark
이제는 안드로이드 폰에서도 Erlang을 쓸 수 있다. ㅋㅋㅋ

refs:
http://www.burbas.se/artiklar/erlang-for-the-android-plattform/
http://www.erlang-solutions.com/section/72/packages

happy hackin'

[TIP] mylyn update site url

카테고리 없음 2010. 10. 26. 13:22 by manywaypark
예전에 알고 있던 것과는 다르게 바뀐듯...
http://download.eclipse.org/tools/mylyn/update/e3.4/

2011-06-23:
connector가 하나도 설치 되어 있지 않다면 "Install connectors"가 Task List view에서 보인다. 선택하고 추가하면된다.
새로운 connector를 추가하고 싶다면, Add Repository 선택하면 추가 가능하다.
happy hackin'
문제:
다음 처럼 adb로 장치를 리스팅했을 때 ????????????로 표시되며 정상동작하지 않을 때가 있다.
$ adb devices
List of devices attached
????????????    no permissions

해결:
1. 장치 ID 확인 및 설정
$ lsusb
......
Bus 002 Device 005: ID 04e8:6850 Samsung Electronics Co., Ltd
......
장치 ID는 04e8이다.

다음 내용으로 /etc/udev/rules.d/51-android.rules 파일을 생성
SUBSYSTEM=="usb", SYSFS{idVendor}="04e8", MODE="0666"

2. adb 재시작
$ sudo adb kill-server
$ sudo adb start-server


refs:
http://www.google.com/support/forum/p/android/thread?tid=08945730bbd7b22b&hl=en
http://developer.android.com/guide/developing/device.html

happy hackin'
1 ··· 16 17 18 19 20 21 22 ··· 31 
분류 전체보기 (306)
잡담 (20)
함수형 언어 (65)
emacs (16)
java (18)
tips & tricks (154)
사랑 (1)
가사 (0)
독서 (4)
mobile (6)
비함수형 언어 (2)

공지사항

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

05-14 16:44