Advertisement
Guest User

Untitled

a guest
Apr 18th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. AuthorizedKeysCommand /usr/bin/auth
  2. AuthorizedKeysCommandUser root
  3.  
  4. #!/bin/bash
  5.  
  6. cn=$1
  7. server=ldap.myad.net #Put your server IP
  8. basedn=dc=mydomain,dc=net #Put your basedn
  9. port=389
  10. bindUser=myBindUser
  11. bindPass=myBindUserPassword
  12. #cn=mathieu
  13.  
  14. ldapsearch -LLL -o ldif-wrap=no -x -h $server -p $port -b $basedn -D $bindUser -w $bindPass -s sub "(sAMAccountName=$cn)" | sed -n 's/^[ t]*odiSSHPubKeys:[ t]*(.*)/1/p'
  15.  
  16. Apr 18 11:56:26 MLL-HV-UBU-16 sshd[9103]: Invalid user mathieu from 192.168.0.114
  17. Apr 18 11:56:26 MLL-HV-UBU-16 sshd[9103]: input_userauth_request: invalid user mathieu [preauth]
  18. Apr 18 11:56:26 MLL-HV-UBU-16 sshd[9103]: Connection closed by 192.168.0.114 port 50152 [preauth]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement