百分百源码网-让建站变得如此简单! 登录 注册 签到领金币!

主页 | 如何升级VIP | TAG标签

当前位置: 主页>网站教程>服务器> CentOS6.5安装LDAP Account Manager 的方法
分享文章到:

CentOS6.5安装LDAP Account Manager 的方法

发布时间:01/15 来源: 浏览: 关键词:
下面我们来介绍CentOS6.5安装LDAP Account Manager的方法,LDAPAccountManager(LAM)是一个用来管理储存在一个LDAP目录中的用户的web前端应用程序,它有很大的用处哦下面一起来看看吧。

管理系统,管理员可以通过加密的方式进行操作,增强了安全性。LAM支持管理的帐号类型有Samba2/3、Unix地址簿接口和计算机需要的信息,包括NIS映射、E-mail假名,MAC地址等。
 LDAP Account Manager强大功能

1、使用LAM,可以通过Web接口较为直观的、简便的管理存储在LDAP目录里的用户、用户组和计算机系统账户。

2、管理Unix的用户、用户组、主机、域名。

3、强大的过滤和排序功能。

4、帐号属性管理。

5、多构造属性。

6、直观树状查看模式。

7、计划查看模式。

8、通过文件上传创建帐号。

9、所有帐号可导出为PDF文件格式。

10、管理用户、用户组、配额和自动创建删除用户的Home目录。

11、支持LDAP+SSL加密模式。

12、多国语言支持,如Catalan、Chinese(Traditional)等。

 

安装需求

1、PHP5语言环境和Perl语言环境。

2、OpenLDAP2.0或更高版本。

3、支持CSS的网页浏览器。

4、Apache WebServer,建议安装SSL、PHP-Module(PHP-Module with ldap、Gettext、XML、Mcrypt+mhash)等模块。

接着上篇文章的安装,本文安装LDAP Account Manager(LAM)

1、扩展PHP LDAP

 代码如下
Python[root@itchenyi-04 ~]# cd php-5.3.5/ext/ldap/
[root@itchenyi-04 ldap]# /software/php/bin/phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
[root@itchenyi-04 ldap]# ./configure --with-php-config=/software/php/bin/php-config --with-ldap=/software/openldap --with-ldap-sasl=/software/sasl2/
[root@itchenyi-04 ldap]# make && make install
[root@itchenyi-04 ldap]# echo -e 'nextension = ldap.so' >> /software/php/etc/php.ini
[root@itchenyi-04 ldap]# service php-fpm restart
Gracefully shutting down php-fpm . done
Starting php-fpm  done

 
2、安装LAM (LDAP Account Manager)

 代码如下
Python[root@itchenyi-04 mnt]# tar jxf ldap-account-manager-4.4.tar.bz2
[root@itchenyi-04 mnt]# cd ldap-account-manager-4.4
[root@itchenyi-04 ldap-account-manager-4.4]# ./configure --with-httpd-user=www --with-httpd-group=www --with-web-root=/data/www.itchenyi.com/lam
[root@itchenyi-04 ldap-account-manager-4.4]# make install
LAM files installed
make[1]: Entering directory `/mnt/ldap-account-manager-4.4'
make[1]: Leaving directory `/mnt/ldap-account-manager-4.4'
HTML docs installed in /usr/local/lam/html
cat install.sh >install
chmod a+x install

 
配置它

 代码如下

Python[root@itchenyi-04 ldap-account-manager-4.4]# cd /data/www.itchenyi.com/lam/config/
[root@itchenyi-04 config]# cp config.cfg_sample config.cfg
[root@itchenyi-04 config]# cp lam.conf_sample lam.conf

[root@itchenyi-04 config]# cat lam.conf | egrep -v "^#|^$"
serverURL: ldap://1.1.1.5:389
admins: cn=Manager,dc=itchenyi,dc=com
passwd: {SSHA}RjBruJcTxZEdcBjPQdRBkDaSQeY= iueleA==
treesuffix: dc=itchenyi,dc=com
defaultLanguage: en_GB.utf8:UTF-8:English (Great Britain)
scriptPath:
scriptServer:
scriptRights: 750
cachetimeout: 5
searchLimit: 0
modules: posixAccount_minUID: 10000
modules: posixAccount_maxUID: 30000
modules: posixAccount_minMachine: 50000
modules: posixAccount_maxMachine: 60000
modules: posixGroup_minGID: 10000
modules: posixGroup_maxGID: 20000
modules: posixGroup_pwdHash: SSHA
modules: posixAccount_pwdHash: SSHA
activeTypes: user,group,host,smbDomain
types: suffix_user: ou=People,dc=itchenyi,dc=com
types: attr_user: #uid;#givenName;#sn;#uidNumber;#gidNumber
types: modules_user: inetOrgPerson,posixAccount,shadowAccount,sambaSamAccount
types: suffix_group: ou=group,dc=itchenyi,dc=com
types: attr_group: #cn;#gidNumber;#memberUID;#description
types: modules_group: posixGroup,sambaGroupMapping
types: suffix_host: ou=machines,dc=itchenyi,dc=com
types: attr_host: #cn;#description;#uidNumber;#gidNumber
types: modules_host: account,posixAccount,sambaSamAccount
types: suffix_smbDomain: dc=itchenyi,dc=com
types: attr_smbDomain: sambaDomainName:Domain name;sambaSID:Domain SID
types: modules_smbDomain: sambaDomain
lamProMailSubject: Your password was reset
lamProMailText: Dear @@givenName@@ @@,+::++::+your password was reset to: @@newPassword@@+::++::++::+Best regards+::++::+deskside support+::+
[root@itchenyi-04 config]# chown www:www /data/www.itchenyi.com/lam/ -R

 

openldap-lam

首次登入 会根据配置文件中预设的组织关系提醒你创建!

创建组织架构
创建组织架构

LDAP Account Manager 提供了很多功能,比如树状结构

LDAP 树状结构
LDAP 树状结构

通过web 新建一个组

openldap-lam3
openldap-lam3

新建用户,归纳到新建的组里

通过LAM  新建用户
通过LAM 新建用户

查看用户~

openldap-lam5
openldap-lam5

查询根域下的所有数据:

 代码如下

Python[root@itchenyi-04 config]# /software/openldap/bin/ldapsearch -x -b "dc=itchenyi,dc=com" -p 389 -h 1.1.1.5
# extended LDIF
#
# LDAPv3
# base <dc=itchenyi,dc=com> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# itchenyi.com
dn: dc=itchenyi,dc=com
objectClass: dcObject
objectClass: organization
o: www.itchenyi.com,blog.
dc: itchenyi

# Manager, itchenyi.com
dn: cn=Manager,dc=itchenyi,dc=com
objectClass: organizationalRole
cn: Manager

# People, itchenyi.com
dn: ou=People,dc=itchenyi,dc=com
objectClass: organizationalUnit
ou: People

# group, itchenyi.com
dn: ou=group,dc=itchenyi,dc=com
objectClass: organizationalUnit
ou: group

# test-itcy, group, itchenyi.com
dn: cn=test-itcy,ou=group,dc=itchenyi,dc=com
objectClass: posixGroup
description: test openldap
gidNumber: 10000
cn: test-itcy

# itchenyi, People, itchenyi.com
dn: cn=itchenyi,ou=People,dc=itchenyi,dc=com
objectClass: posixAccount
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
homeDirectory: /home/itchenyi
loginShell: /bin/bash
uid: itchenyi
cn: itchenyi
uidNumber: 10000
gidNumber: 10000
description: test
sn: itchenyi
postOfficeBox: itchenyi@gmail.com

# machines, itchenyi.com
dn: ou=machines,dc=itchenyi,dc=com
objectClass: organizationalUnit
ou: machines

# search result
search: 2
result: 0 Success

# numResponses: 8
# numEntries: 7

 
查询sn以itchenyi开头匹配的数据:

 代码如下

Python[root@itchenyi-04 config]# /software/openldap/bin/ldapsearch -x -b "dc=itchenyi,dc=com" "sn=itchenyi*" -p 389 -h 1.1.1.5
# extended LDIF
#
# LDAPv3
# base &lt;dc=itchenyi,dc=com&gt; with scope subtree
# filter: sn=itchenyi*
# requesting: ALL
#

# itchenyi, People, itchenyi.com
dn: cn=itchenyi,ou=People,dc=itchenyi,dc=com
objectClass: posixAccount
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
homeDirectory: /home/itchenyi
loginShell: /bin/bash
uid: itchenyi
cn: itchenyi
uidNumber: 10000
gidNumber: 10000
description: test
sn: itchenyi
postOfficeBox: itchenyi@gmail.com

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

 
就这些吧,我的需求其实不是这个,主要是帮助一下关心的我博友,主要还是时间限制了人,不然可以多和大家分享,一起学习,呵呵~~~

打赏

打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

百分百源码网 建议打赏1~10元,土豪随意,感谢您的阅读!

共有4人阅读,期待你的评论!发表评论
昵称: 网址: 验证码: 点击我更换图片
最新评论

本文标签

广告赞助

能出一分力是一分吧!

订阅获得更多模板

本文标签

广告赞助

订阅获得更多模板