dsh ls /etc/bashrc | perl -ne 'BEGIN { printf "export ss=\${1};shift;export args=\$@;" }{ $_=~s/://g;@x=split /\s+/;printf "ssh -t %s \"echo \${ss} | sudo -S -u tibcosilver \${args} \"\n",$x[0], $x[2]}' | tee out
perl -i -pe "s/#/'/g" out
echo "Please run: . out [Password]"
Rants and ravings of a semi-autistic developer who has a hard time remembering idiotic nonsense details. Why remember it, when you know where to find it.
Showing posts with label sudo. Show all posts
Showing posts with label sudo. Show all posts
Thursday, July 20, 2017
Sledgehammer with sudo over remote hosts
Subscribe to:
Posts (Atom)