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

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

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

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

  • 大佬,你用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)

    这个怎么解决呢?