Advertisement
Guest User

Untitled

a guest
Feb 19th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. {"code":"ETIMEDOUT","errno":"ETIMEDOUT","syscall":"connect"}
  2.  
  3. var path = require('path');
  4. var ActiveDirectory = require('activedirectory');
  5. var directoryConfig = {
  6. url: 'ldap://'+process.env['USERDNSDOMAIN'],
  7. baseDN: 'dc=xxx,dc=yyy,dc=zzz',
  8. username: process.env['USERPROFILE'].split(path.sep)[2],
  9. password: 'test'
  10. }
  11.  
  12. router.get('/', function(req, res) {
  13. var ad = new ActiveDirectory(directoryConfig);
  14. ad.userExists(directoryConfig.username, function(err, exists) {
  15. if (err) {
  16. console.log('ERROR: ' +JSON.stringify(err));
  17. return;
  18. }
  19. console.log(directoryConfig.username + ' exists: ' + exists);
  20. });
  21. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement