openbsd5.2+openldap-server phpldapadmin
-
- 钾 K
- 帖子: 16
- 注册时间: 2013-03-30 15:31
openbsd5.2+openldap-server phpldapadmin
openbsd 5.2 安装 openldap-server phpldapadmin 出现
You don't have permission to access /phpldapadmin/ on this server.
安装后出现提示,我都按照步骤做了:
The following new rcscripts were installed: /etc/rc.d/saslauthd /etc/rc.d/slapd
See rc.d(8) for details.
Look in /usr/local/share/doc/pkg-readmes for extra documentation.
--- +php-5.3.14p1 -------------------
To enable the php-5.3 module please create a symbolic link from
/var/www/conf/modules.sample/php-5.3.conf to
/var/www/conf/modules/php.conf. As root:
ln -sf /var/www/conf/modules.sample/php-5.3.conf /var/www/conf/modules/php.conf
The recommended php configuration has been installed to:
/etc/php-5.3.ini.
--- +php-ldap-5.3.14p0 -------------------
You can enable this module by creating a symbolic link from
/etc/php-5.3.sample/ldap.ini to
/etc/php-5.3/ldap.ini. As root:
ln -sf /etc/php-5.3.sample/ldap.ini /etc/php-5.3/ldap.ini
--- +php-mcrypt-5.3.14p0 -------------------
You can enable this module by creating a symbolic link from
/etc/php-5.3.sample/mcrypt.ini to
/etc/php-5.3/mcrypt.ini. As root:
ln -sf /etc/php-5.3.sample/mcrypt.ini /etc/php-5.3/mcrypt.ini
--- +phpldapadmin-1.2.2 -------------------
phpLDAPAdmin has been installed into /var/www/phpldapadmin
Edit /var/www/phpldapadmin/config/config.php to configure phpLDAPAdmin
You should point this to the DocumentRoot of your web-server:
# ln -s ../phpldapadmin /var/www/htdocs/phpldapadmin
(make sure you use a relative symlink since Apache is chrooted)
For jpeg photos to work properly, you must configure the variable
$config->custom->jpeg['tmpdir'] in config.php.
You can ensure you have a working install by accessing:
http://<localhost>/phpldapadmin/index.php
/etc/php-5.3/ldap.ini. As root:
ln -sf /etc/php-5.3.sample/ldap.ini /etc/php-5.3/ldap.ini
--- +php-mcrypt-5.3.14p0 -------------------
You can enable this module by creating a symbolic link from
/etc/php-5.3.sample/mcrypt.ini to
/etc/php-5.3/mcrypt.ini. As root:
ln -sf /etc/php-5.3.sample/mcrypt.ini /etc/php-5.3/mcrypt.ini
--- +phpldapadmin-1.2.2 -------------------
phpLDAPAdmin has been installed into /var/www/phpldapadmin
Edit /var/www/phpldapadmin/config/config.php to configure phpLDAPAdmin
You should point this to the DocumentRoot of your web-server:
# ln -s ../phpldapadmin /var/www/htdocs/phpldapadmin
(make sure you use a relative symlink since Apache is chrooted)
For jpeg photos to work properly, you must configure the variable
$config->custom->jpeg['tmpdir'] in config.php.
You can ensure you have a working install by accessing:
http://<localhost>/phpldapadmin/index.php
You don't have permission to access /phpldapadmin/ on this server.
安装后出现提示,我都按照步骤做了:
The following new rcscripts were installed: /etc/rc.d/saslauthd /etc/rc.d/slapd
See rc.d(8) for details.
Look in /usr/local/share/doc/pkg-readmes for extra documentation.
--- +php-5.3.14p1 -------------------
To enable the php-5.3 module please create a symbolic link from
/var/www/conf/modules.sample/php-5.3.conf to
/var/www/conf/modules/php.conf. As root:
ln -sf /var/www/conf/modules.sample/php-5.3.conf /var/www/conf/modules/php.conf
The recommended php configuration has been installed to:
/etc/php-5.3.ini.
--- +php-ldap-5.3.14p0 -------------------
You can enable this module by creating a symbolic link from
/etc/php-5.3.sample/ldap.ini to
/etc/php-5.3/ldap.ini. As root:
ln -sf /etc/php-5.3.sample/ldap.ini /etc/php-5.3/ldap.ini
--- +php-mcrypt-5.3.14p0 -------------------
You can enable this module by creating a symbolic link from
/etc/php-5.3.sample/mcrypt.ini to
/etc/php-5.3/mcrypt.ini. As root:
ln -sf /etc/php-5.3.sample/mcrypt.ini /etc/php-5.3/mcrypt.ini
--- +phpldapadmin-1.2.2 -------------------
phpLDAPAdmin has been installed into /var/www/phpldapadmin
Edit /var/www/phpldapadmin/config/config.php to configure phpLDAPAdmin
You should point this to the DocumentRoot of your web-server:
# ln -s ../phpldapadmin /var/www/htdocs/phpldapadmin
(make sure you use a relative symlink since Apache is chrooted)
For jpeg photos to work properly, you must configure the variable
$config->custom->jpeg['tmpdir'] in config.php.
You can ensure you have a working install by accessing:
http://<localhost>/phpldapadmin/index.php
/etc/php-5.3/ldap.ini. As root:
ln -sf /etc/php-5.3.sample/ldap.ini /etc/php-5.3/ldap.ini
--- +php-mcrypt-5.3.14p0 -------------------
You can enable this module by creating a symbolic link from
/etc/php-5.3.sample/mcrypt.ini to
/etc/php-5.3/mcrypt.ini. As root:
ln -sf /etc/php-5.3.sample/mcrypt.ini /etc/php-5.3/mcrypt.ini
--- +phpldapadmin-1.2.2 -------------------
phpLDAPAdmin has been installed into /var/www/phpldapadmin
Edit /var/www/phpldapadmin/config/config.php to configure phpLDAPAdmin
You should point this to the DocumentRoot of your web-server:
# ln -s ../phpldapadmin /var/www/htdocs/phpldapadmin
(make sure you use a relative symlink since Apache is chrooted)
For jpeg photos to work properly, you must configure the variable
$config->custom->jpeg['tmpdir'] in config.php.
You can ensure you have a working install by accessing:
http://<localhost>/phpldapadmin/index.php
-
- 钾 K
- 帖子: 16
- 注册时间: 2013-03-30 15:31
Re: openbsd5.2+openldap-server phpldapadmin
openldap以前我看过,看不懂;最近在看 openbsd 4.0 crash course 电子书,突然想再读读openldap这个软件,实战操作一下,在openbsd5.2 下面安装还是出问题了,这也在意料之中;但更重要的是我不知道openldap能做通迅录?它的功能还是看不懂~~~但每天学习一点点,进步一点点~
Re: openbsd5.2+openldap-server phpldapadmin
你创建链接的时候是不是用的相对路径,或者说“/var/www/htdocs/phpmyadmin"这个链接应该是指向../phpmyadmin,而不是/var/www/phpmyadmin,因为apache是chroot的,它是看不到你服务器上的实际的/var/目录的。
-
- 钾 K
- 帖子: 16
- 注册时间: 2013-03-30 15:31
Re: openbsd5.2+openldap-server phpldapadmin
你讲得对,“/var/www/htdocs/phpmyadmin"这个链接应该是指向../phpmyadmin,而不是/var/www/phpmyadmin。
但在phpldapadmin界面上输入dn与密码后,出现
E_WARNING: mcrypt_create_iv(): Cannot open source device
但如果匿名登录却能登录上;请帮忙
但在phpldapadmin界面上输入dn与密码后,出现
E_WARNING: mcrypt_create_iv(): Cannot open source device
但如果匿名登录却能登录上;请帮忙
Re: openbsd5.2+openldap-server phpldapadmin
试试这个(以root用户):
cd /var/www/dev
/dev/MAKEDEV random
还是和apache的chroot有关...
cd /var/www/dev
/dev/MAKEDEV random
还是和apache的chroot有关...
-
- 钾 K
- 帖子: 16
- 注册时间: 2013-03-30 15:31
Re: openbsd5.2+openldap-server phpldapadmin
不行,问题依旧!
E_WARNING: mcrypt_create_iv(): Cannot open source device
PHP Debug Backtrace
文件 /phpldapadmin/lib/functions.php (184)
函数 error (a:5:{i:0;s:56:"E_WARNING: mcrypt_create_iv(): Cann...)
文件 /phpldapadmin/lib/functions.php ()
函数 app_error_handler (a:5:{i:0;i:2;i:1;s:45:"mcrypt_create_iv(): Cannot ...)
文件 /phpldapadmin/lib/functions.php (750)
函数 mcrypt_create_iv (a:2:{i:0;i:8;i:1;i:1;})
文件 /phpldapadmin/lib/ds.php (227)
函数 blowfish_encrypt (a:1:{i:0;s:25:"cn=Manager,dc=test,dc=com";})
文件 /phpldapadmin/lib/ds_ldap.php (276)
函数 setLogin (a:3:{i:0;s:25:"cn=Manager,dc=test,dc=com";i:1;s:11...)
文件 /phpldapadmin/htdocs/login.php (25)
函数 login (a:3:{i:0;s:25:"cn=Manager,dc=test,dc=com";i:1;s:11...)
文件 /phpldapadmin/htdocs/cmd.php (59)
函数 include (a:1:{i:0;s:30:"/phpldapadmin/htdocs/login.php";})
E_WARNING: mcrypt_create_iv(): Cannot open source device
PHP Debug Backtrace
文件 /phpldapadmin/lib/functions.php (184)
函数 error (a:5:{i:0;s:56:"E_WARNING: mcrypt_create_iv(): Cann...)
文件 /phpldapadmin/lib/functions.php ()
函数 app_error_handler (a:5:{i:0;i:2;i:1;s:45:"mcrypt_create_iv(): Cannot ...)
文件 /phpldapadmin/lib/functions.php (750)
函数 mcrypt_create_iv (a:2:{i:0;i:8;i:1;i:1;})
文件 /phpldapadmin/lib/ds.php (227)
函数 blowfish_encrypt (a:1:{i:0;s:25:"cn=Manager,dc=test,dc=com";})
文件 /phpldapadmin/lib/ds_ldap.php (276)
函数 setLogin (a:3:{i:0;s:25:"cn=Manager,dc=test,dc=com";i:1;s:11...)
文件 /phpldapadmin/htdocs/login.php (25)
函数 login (a:3:{i:0;s:25:"cn=Manager,dc=test,dc=com";i:1;s:11...)
文件 /phpldapadmin/htdocs/cmd.php (59)
函数 include (a:1:{i:0;s:30:"/phpldapadmin/htdocs/login.php";})
Re: openbsd5.2+openldap-server phpldapadmin
phpldapadmin/lib/functions.php的750行是(1.2.3版):
$iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td),MCRYPT_DEV_URANDOM);
表示它要从(chroot下的)/dev/urandom读入随机数。你看一下你的/var/www/dev下面是否创建了urandom这个设备文件
如果有这个文件但是还不行,就把上面functions.php中的MCRYPT_DEV_URANDOM替换成MCRYPT_RAND(806行左右还有一处,也换掉)试试
(根据: http://php.net/manual/en/function.mcrypt-create-iv.php)
$iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td),MCRYPT_DEV_URANDOM);
表示它要从(chroot下的)/dev/urandom读入随机数。你看一下你的/var/www/dev下面是否创建了urandom这个设备文件
如果有这个文件但是还不行,就把上面functions.php中的MCRYPT_DEV_URANDOM替换成MCRYPT_RAND(806行左右还有一处,也换掉)试试
(根据: http://php.net/manual/en/function.mcrypt-create-iv.php)
-
- 钾 K
- 帖子: 16
- 注册时间: 2013-03-30 15:31
Re: openbsd5.2+openldap-server phpldapadmin
能登录上;但是显示
已登录为: cn=Manager,dc=test,dc=com
dc=test,dc=com
This base cannot be created with PLA.
已登录为: cn=Manager,dc=test,dc=com
dc=test,dc=com
This base cannot be created with PLA.
Re: openbsd5.2+openldap-server phpldapadmin
这个就是LDAP本身的配置问题了。不是很熟悉。
不过根据http://www.live-in.org/archives/1731.html:
创建一个具有以下内容的 base.ldif文件(替换其中的live-in和org):
然后添加数据库(替换其中的live-in和org):
输入密码后会提示:
adding new entry "dc=ldap,dc=live-in,dc=org"
你可以试一下
不过根据http://www.live-in.org/archives/1731.html:
创建一个具有以下内容的 base.ldif文件(替换其中的live-in和org):
代码: 全选
dn: dc=ldap,dc=live-in,dc=org
o: ldap
objectclass: dcObject
objectclass: organization
代码: 全选
ldapadd -f base.ldif -x -D cn=admin,dc=ldap,dc=live-in,dc=org -W
adding new entry "dc=ldap,dc=live-in,dc=org"
你可以试一下
-
- 钾 K
- 帖子: 16
- 注册时间: 2013-03-30 15:31
Re: openbsd5.2+openldap-server phpldapadmin
我参考 http://www.siamvpn.com/wordpress/?p=47 这篇文章,可以登录 ;修改了 ldap.conf,slapd.conf
/var/ww/phpldapadmin/config/config.php 里面的数据;可以登录,但显示:
Authenticate to server
Successfully logged into server.
已登录为: cn=Manager,dc=my-domain,dc=com
dc=my-domain,dc=com
This base cannot be created with PLA.
/var/ww/phpldapadmin/config/config.php 里面的数据;可以登录,但显示:
Authenticate to server
Successfully logged into server.
已登录为: cn=Manager,dc=my-domain,dc=com
dc=my-domain,dc=com
This base cannot be created with PLA.
Re: openbsd5.2+openldap-server phpldapadmin
我上次回帖中的方法试过了吗?
你的那个链接中是对OpenBSD 4.9的,而且它没有类似的错误,可能不适合你的情况。
而且,如果你对OpenLDAP感兴趣,建议你了解一下LDAP协议,至少先了解它的基本概念,有哪些基本对象(用户,域等等),相互之间的关系如何。
你的那个链接中是对OpenBSD 4.9的,而且它没有类似的错误,可能不适合你的情况。
而且,如果你对OpenLDAP感兴趣,建议你了解一下LDAP协议,至少先了解它的基本概念,有哪些基本对象(用户,域等等),相互之间的关系如何。
-
- 钾 K
- 帖子: 16
- 注册时间: 2013-03-30 15:31
Re: openbsd5.2+openldap-server phpldapadmin
谢谢您;试过了;我把 httpd_flags ="-u"所有问题都解决了;也可能我的配置出问题了,但奇怪的是可以登录,但不可以用PLA创建!
Re: openbsd5.2+openldap-server phpldapadmin
今天我自己试了一下,你所说的问题应该是和OpenLDAP服务器有关。
我把自己操作的过程录了下来,给需要的朋友一个参考。
http://www.kdump.org/media/openldap-24- ... openbsd-52
我把自己操作的过程录了下来,给需要的朋友一个参考。
http://www.kdump.org/media/openldap-24- ... openbsd-52
-
- 钾 K
- 帖子: 16
- 注册时间: 2013-03-30 15:31
Re: openbsd5.2+openldap-server phpldapadmin
我按您的步骤在 openbsd 5.3 上做出现:
当 http://192.*.*.*/phpldapadmin/ 出现
Notice: Undefined variable: _SESSION in /var/www/phpldapadmin/lib/page.php on line 379 Fatal error: Call to a member function getValue() on a non-object in /var/www/phpldapadmin/lib/page.php on line 379
当 http://192.*.*.*/phpldapadmin/ 出现
Notice: Undefined variable: _SESSION in /var/www/phpldapadmin/lib/page.php on line 379 Fatal error: Call to a member function getValue() on a non-object in /var/www/phpldapadmin/lib/page.php on line 379
在线用户
正浏览此版面之用户: 没有注册用户 和 2 访客