建立乙個賬號,以備客戶端測試登陸
useradd test1
passwd test1
這些使用者只是在系統上的,要是要將這些用的資訊匯入ldap資料庫中,要生成字尾為ldif的檔案。這是文字檔案,手動可以書寫。
鑑於我使用的這個例子是匯入linux系統的所有使用者資訊,要手動書寫就比較麻煩了,這裡我會用到乙個自動生成的乙個工具migrationtools.
yum install migrationtools
cd /usr/share/migrationtools/
vim migrate_common.ph
# default dns domain
$default_mail_domain = "example.com";
# default base
$default_base = "dc=example,dc=com";
修改# ./migrate_base.pl > /tmp/base.ldif
# ./migrate_passwd.pl /etc/passwd > /tmp/passwd.ldif
# ./migrate_group.pl /etc/group > /tmp/group.ldif
這樣三個文字的資訊就生成了。
接下來要匯入三個檔案到ldapserver中,
# ldapadd -x -d "cn=admin,dc=example,dc=com" -w -f /tmp/base.ldif
# ldapadd -x -d "cn=admin,dc=example,dc=com" -w -f /tmp/passwd.ldif
# ldapadd -x -d "cn=admin,dc=example,dc=com" -w -f /tmp/group.ldif
到此三個檔案的資料就匯入到ldap的資料庫中。
ldapsearch檢視使用者的資料:
ldapsearch -x -w -d "uid=test1,ou=people,dc=example,dc=com" -b "uid=test1,ou=people,dc=example,dc=com"
輸入ldapuser1的密碼就能看到該使用者的資訊了。
JMeter之建立LDAP測試計畫
新增併發使用者 新增登入配置元件 新增ldap請求預設值 新增ldap請求 4個 新增響應斷言 新增 用於檢視 儲存測試結果 乙個簡單的測試計畫,用於測試ldap伺服器。建立4個併發使用者,並向ldap伺服器傳送4個請求。另外,測試人員需要告訴併發使用者執行4遍測試計畫。因此,總的請求數目是 4併發...
ldap簡單命令使用方法
ldap是輕量目錄訪問協議,英文全稱是lightweight directory access protocol,一般都簡稱為ldap。ldap以樹狀結構儲存資料,非常適合儲存大量資料,而且資料不經常修改,但是需要快速查詢的場景,比如業務系統的鑑權操作。ldap支援tcp ip協議,分為server...
LDAP客戶端加入LDAP域配置
下面介紹幾個配置檔案再後面我們會進行修改,我這裡簡單介紹一下。1 圖形化部署 一般通過 setup authconfig gui命令呼叫圖形介面實現配置。通過圖形方式將客戶端加入到openldap服務端配置非常簡單,只需要根據提示並正確選擇選單以及正確輸入server和base dn對應的值即可。當...