Guest User

Untitled

a guest
Oct 23rd, 2019
97
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. 1. Adaugarea
  3. a. sudo su - root
  4. b. adduser test
  5. c. usermod -aG sudo test
  6.  
  7. 2. Schimbarea de parola
  8. a. cd /usr/bin
  9. b. sudo chmod u-s passwd
  10. c. PASSWD
  11. passwd: Authentication token manipulation error
  12. passwd: password unchanged
  13.  
  14. 3. Capabilitati
  15. a. setcap + cap_chown + cap_dac_override + cap_fowner
  16. b. setcap cap_chown,cap_dac_override,cap_fowner+ep /usr/bin/passwd
  17. + Conform articolului https://github.com/tsgates/arch-wiki-markdown/blob/master/wiki/Using_File_Capabilities_Instead_Of_Setuid.md
  18.  
  19. 4. Comanda Shadow - conform articolului si testat.
  20. # chmod u-s /usr/bin/chage
  21. # setcap cap_dac_read_search+ep /usr/bin/chage
  22.  
  23. # chmod u-s /usr/bin/chfn
  24. # setcap cap_chown,cap_setuid+ep /usr/bin/chfn
  25.  
  26. # chmod u-s /usr/bin/chsh
  27. # setcap cap_chown,cap_setuid+ep /usr/bin/chsh
  28.  
  29. # chmod u-s /usr/bin/expiry
  30. # setcap cap_dac_override,cap_setgid+ep /usr/bin/expiry
  31.  
  32. # chmod u-s /usr/bin/gpasswd
  33. # setcap cap_chown,cap_dac_override,cap_setuid+ep /usr/bin/gpasswd
  34.  
  35. # chmod u-s /usr/bin/newgrp
  36. # setcap cap_dac_override,cap_setgid+ep /usr/bin/newgrp
  37.  
  38. # chmod u-s /usr/bin/passwd
  39. # setcap cap_chown,cap_dac_override,cap_fowner+ep /usr/bin/passwd
RAW Paste Data