The Phreak Geek!

Search This Blog

Tuesday, September 11, 2018

Redirect output of echo to root owned files

sudo and echo command does not work together if you have to redirect output of echo to root owned files you can execute

sudo sh -c "echo 'bar' > /etc/foo.conf"
Posted by ash_ishh_
Labels: #c0d
Newer Posts Older Posts Home

Follow @ash_ishh_

Blog Archive

  • ►  2024 (1)
    • ►  June (1)
  • ►  2022 (1)
    • ►  February (1)
  • ►  2021 (4)
    • ►  October (2)
    • ►  January (2)
  • ►  2020 (5)
    • ►  November (1)
    • ►  April (1)
    • ►  February (1)
    • ►  January (2)
  • ►  2019 (5)
    • ►  October (1)
    • ►  July (2)
    • ►  April (1)
    • ►  March (1)
  • ▼  2018 (16)
    • ►  December (1)
    • ►  November (1)
    • ►  October (1)
    • ▼  September (1)
      • Redirect output of echo to root owned files
    • ►  August (1)
    • ►  July (11)