还未发布过话题
  • STF 二次开发辛酸之路 at 2018年05月28日

    后面可以了,原来是字段写错了,谢谢大佬👍

  • 大佬,加不了你的微信诶,可以加一下我吗?我的微信是 tuyangusst

  • 其它可用的账号都不行,ldap 日志不知道去哪看😂 ,大佬你的微信是 QW5pa2lrdW4=?为啥说不存在这个用户啊?😂

  • 大佬,你启动时不用加 stf 吗?按照你的指令格式我报 auth-ldap:未找到命令错误诶

  • STF 二次开发辛酸之路 at 2018年05月22日

    大佬,你用 ldap 登录成功了没?我一直不成功,具体是这样的:
    控制台的情况是这样的:

    xshell 报的错如下:
    2018-05-22T05:59:51.988Z WRN/auth-ldap 26040 [::ffff:127.0.0.1] Authentication failure for "admin@cpu-os.com"
    Unhandled rejection InvalidCredentialsError
    at EventEmitter.endListener (/usr/local/tuyang/stf/stf-master/lib/util/ldaputil.js:78:25)
    at emitOne (events.js:116:13)
    at EventEmitter.emit (events.js:211:7)
    at sendResult (/usr/local/tuyang/stf/stf-master/node_modules/_ldapjs@1.0.2@ldapjs/lib/client/client.js:1389:22)
    at messageCallback (/usr/local/tuyang/stf/stf-master/node_modules/_ldapjs@1.0.2@ldapjs/lib/client/client.js:1421:16)
    at Parser.onMessage (/usr/local/tuyang/stf/stf-master/node_modules/_ldapjs@1.0.2@ldapjs/lib/client/client.js:1089:14)
    at emitOne (events.js:116:13)
    at Parser.emit (events.js:211:7)
    at Parser.write (/usr/local/tuyang/stf/stf-master/node_modules/_ldapjs@1.0.2@ldapjs/lib/messages/parser.js:111:8)
    at Socket.onData (/usr/local/tuyang/stf/stf-master/node_modules/_ldapjs@1.0.2@ldapjs/lib/client/client.js:1076:22)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
    at readableAddChunk (_stream_readable.js:250:11)
    at Socket.Readable.push (_stream_readable.js:208:10)
    at TCP.onread (net.js:597:20)

    我启动的命令如下:
    stf local --public-ip='172.19.37.57' --auth-type ldap --auth-options '["--ldap-url","ldap://172.19.37.57", "--ldap-bind-dn","cn=admin, dc=cpu-os, dc=com","--ldap-search-dn","dc=cpu-os, dc=com", "--ldap-bind-credentials","123456", "--ldap-search-class", "top", "--ldap-search-field", "mail"]'

    我的 LDAP 是自己搭建的,运行 ldapsearch -x 结果如下:
    root@seatu-VirtualBox:/usr/local/tuyang/stf/stf-master# ldapsearch -x

    extended LDIF
    #

    LDAPv3
    base (default) with scope subtree
    filter: (objectclass=*)
    requesting: ALL
    #

    cpu-os.com
    dn: dc=cpu-os,dc=com
    objectClass: top
    objectClass: dcObject
    objectClass: organization
    o: cpu-os
    dc: cpu-os

    admin, cpu-os.com
    dn: cn=admin,dc=cpu-os,dc=com
    objectClass: simpleSecurityObject
    objectClass: organizationalRole
    cn: admin
    description: LDAP administrator

    jinlong, cpu-os.com
    dn: cn=jinlong,dc=cpu-os,dc=com
    cn:: IGppbmxvbmc=
    sn: jinlong
    objectClass: inetOrgPerson
    objectClass: top

    taowen, cpu-os.com
    dn: cn=taowen,dc=cpu-os,dc=com
    cn:: IHRhb3dlbg==
    sn: taowen
    objectClass: inetOrgPerson
    objectClass: top

    search result
    search: 2
    result: 0 Success

    numResponses: 5
    numEntries: 4
    另外,我用 java 和 node 去连接我的 ldap 服务器都是可以的,估计是 stf 启动命令格式有问题,大佬求助啊!!!大佬方便留个 QQ 嘛?不方便的话,可以加一下嘛?我的 qq 是:1052113431,真的万分感谢!

  • 控制台的情况是这样的:


    xshell 报的错如下:
    2018-05-22T05:59:51.988Z WRN/auth-ldap 26040 [::ffff:127.0.0.1] Authentication failure for "admin@cpu-os.com"
    Unhandled rejection InvalidCredentialsError
    at EventEmitter.endListener (/usr/local/tuyang/stf/stf-master/lib/util/ldaputil.js:78:25)
    at emitOne (events.js:116:13)
    at EventEmitter.emit (events.js:211:7)
    at sendResult (/usr/local/tuyang/stf/stf-master/node_modules/_ldapjs@1.0.2@ldapjs/lib/client/client.js:1389:22)
    at messageCallback (/usr/local/tuyang/stf/stf-master/node_modules/_ldapjs@1.0.2@ldapjs/lib/client/client.js:1421:16)
    at Parser.onMessage (/usr/local/tuyang/stf/stf-master/node_modules/_ldapjs@1.0.2@ldapjs/lib/client/client.js:1089:14)
    at emitOne (events.js:116:13)
    at Parser.emit (events.js:211:7)
    at Parser.write (/usr/local/tuyang/stf/stf-master/node_modules/_ldapjs@1.0.2@ldapjs/lib/messages/parser.js:111:8)
    at Socket.onData (/usr/local/tuyang/stf/stf-master/node_modules/_ldapjs@1.0.2@ldapjs/lib/client/client.js:1076:22)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
    at readableAddChunk (_stream_readable.js:250:11)
    at Socket.Readable.push (_stream_readable.js:208:10)
    at TCP.onread (net.js:597:20)

    我启动的命令如下:
    stf local --public-ip='172.19.37.57' --auth-type ldap --auth-options '["--ldap-url","ldap://172.19.37.57", "--ldap-bind-dn","cn=admin, dc=cpu-os, dc=com","--ldap-search-dn","dc=cpu-os, dc=com", "--ldap-bind-credentials","123456", "--ldap-search-class", "top", "--ldap-search-field", "mail"]'

    我的 LDAP 是自己搭建的,运行 ldapsearch -x 结果如下:
    root@seatu-VirtualBox:/usr/local/tuyang/stf/stf-master# ldapsearch -x

    extended LDIF

    #

    LDAPv3

    base (default) with scope subtree

    filter: (objectclass=*)

    requesting: ALL

    #

    cpu-os.com

    dn: dc=cpu-os,dc=com
    objectClass: top
    objectClass: dcObject
    objectClass: organization
    o: cpu-os
    dc: cpu-os

    admin, cpu-os.com

    dn: cn=admin,dc=cpu-os,dc=com
    objectClass: simpleSecurityObject
    objectClass: organizationalRole
    cn: admin
    description: LDAP administrator

    jinlong, cpu-os.com

    dn: cn=jinlong,dc=cpu-os,dc=com
    cn:: IGppbmxvbmc=
    sn: jinlong
    objectClass: inetOrgPerson
    objectClass: top

    taowen, cpu-os.com

    dn: cn=taowen,dc=cpu-os,dc=com
    cn:: IHRhb3dlbg==
    sn: taowen
    objectClass: inetOrgPerson
    objectClass: top

    search: 2
    result: 0 Success

    numResponses: 5

    numEntries: 4

    另外,我用 java 和 node 去连接我的 ldap 服务器都是可以的,估计是 stf 启动命令格式有问题,大佬求助啊!!!大佬方便留个 QQ 嘛?不方便的话,可以加一下嘛?我的 qq 是:1052113431,真的万分感谢!

  • 大佬,可以说说你是怎么实现 ldap 登录的嘛?我的报错了,详细在本楼的回复里面😂 😂

  • 楼主,我这边使用 ldap 启动 stf,命令如下:
    stf local --public-ip='172.19.37.57' --auth-type ldap --auth-options '["--ldap-url","ldap://172.19.37.57", "--ldap-bind-dn","cn=admin,dc=cpu-os,dc=com","--ldap-search-dn","dc=cpu-os, dc=com", "--ldap-bind-credentials","123456", "--ldap-search-class", "user", "--ldap-search-field", "mail"]'

    结果报错如下:
    2018-05-21T10:30:55.267Z WRN/auth-ldap 20434 [::ffff:127.0.0.1] Authentication failure for "admin@cpu-os.com"
    Unhandled rejection InvalidCredentialsError
    at EventEmitter.endListener (/usr/local/tuyang/stf/stf-master/lib/util/ldaputil.js:78:25)
    at emitOne (events.js:116:13)
    at EventEmitter.emit (events.js:211:7)
    at sendResult (/usr/local/tuyang/stf/stf-master/node_modules/_ldapjs@1.0.2@ldapjs/lib/client/client.js:1389:22)
    at messageCallback (/usr/local/tuyang/stf/stf-master/node_modules/_ldapjs@1.0.2@ldapjs/lib/client/client.js:1421:16)
    at Parser.onMessage (/usr/local/tuyang/stf/stf-master/node_modules/_ldapjs@1.0.2@ldapjs/lib/client/client.js:1089:14)
    at emitOne (events.js:116:13)
    at Parser.emit (events.js:211:7)
    at Parser.write (/usr/local/tuyang/stf/stf-master/node_modules/_ldapjs@1.0.2@ldapjs/lib/messages/parser.js:111:8)
    at Socket.onData (/usr/local/tuyang/stf/stf-master/node_modules/_ldapjs@1.0.2@ldapjs/lib/client/client.js:1076:22)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
    at readableAddChunk (_stream_readable.js:250:11)
    at Socket.Readable.push (_stream_readable.js:208:10)
    at TCP.onread (net.js:597:20)

    这个怎么解决呢?