Advertisement
Guest User

Untitled

a guest
Oct 5th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. $ uname -a
  2. Linux lx-vb 3.8.0-19-generic #29-Ubuntu SMP Wed Apr 17 18:16:28 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
  3. $ grep VERSION /etc/os-release
  4. VERSION="13.04, Raring Ringtail"
  5. $ grep "^passwd" /etc/nsswitch.conf
  6. passwd: files ldap
  7. $ ldapsearch -LLL -h localhost -p 1389 -D "cn=directory manager" -w xxxxxxxx "uid=testuser" userPassword
  8. dn: uid=testuser,ou=People,dc=example,dc=com
  9. userPassword:: e1NTSEF9b2JWYXFDcjhNQmNJVXZXVHMzbE40SFlReStldC9XNFZ0NU4yRmc9PQ==
  10. userPassword:: e1NTSEF9eDlnRGZ5b0NhKzNROTIzOTFha1NiR2VTMFJabjNKSWYyNkN3cUE9PQ==
  11. $ grep testuser /etc/passwd
  12. $ getent passwd testuser
  13. testuser:*:12345:12345:ldap test user:/home/testuser:/bin/sh
  14. $ sshpass -p pass1 ssh testuser@localhost id
  15. uid=12345(testuser) gid=12345 groups=12345
  16. $ sshpass -p pass2 ssh testuser@localhost id
  17. uid=12345(testuser) gid=12345 groups=12345
  18. $ sshpass -p pass3 ssh testuser@localhost id
  19. Permission denied, please try again.
  20.  
  21. $ useradd -d /home/newuser newuser
  22.  
  23. $ passwd newuser
  24.  
  25. newuser:$6$....password #1...:15963:0:99999:7:::
  26. newuser:$6$....password #2...:15963:0:99999:7:::
  27.  
  28. su - newuser
  29.  
  30. newuser:$6$....password #2...:15963:0:99999:7:::
  31. newuser:$6$....password #1...:15963:0:99999:7:::
  32.  
  33. joe ALL=(yourusername) ALL
  34.  
  35. user1 ALL = (user2) ALL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement