{"id":6420,"date":"2021-11-19T07:31:10","date_gmt":"2021-11-19T07:31:10","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=6420"},"modified":"2021-11-19T07:35:57","modified_gmt":"2021-11-19T07:35:57","slug":"batch-file-sudo-su-login","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/batch-file-sudosu-login\/20869.html","title":{"rendered":"Batch File Sudo\/Su Login"},"content":{"rendered":"<p>Hi,<br \/>\nI want to create a DOS Batch file:<br \/>\n1. That login on 100 sun solaris\/Unix servers.<br \/>\n2. search syslog.0, syslog.1, syslog.2&#8230;n so on<br \/>\n3. Then remove them.<br \/>\nTo use RM command i have to login with SU.<\/p>\n<p>Please help me to create that script.<\/p>\n<p>I have already used a login script<\/p>\n<p>@echo off<br \/>\nc:\\Plink.exe -ssh -l xyz 192.168.1.155 -pw &#8220;123456&#8221; -m input.txt &gt;&gt; result.txt<\/p>\n<p>but i can not remove those file because to remove i have to login with &#8220;su&#8221;.<br \/>\nand &#8220;su&#8221; can not login remotely.<br \/>\ni also unable to use sudo, because ask for password, I i dont know how to enter password in sudo script.<\/p>\n<p>Please help<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":7},"question-category":[55],"question_tags":[],"class_list":["post-6420","question","type-question","status-publish","hentry","question-category-programming"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/6420","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=6420"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=6420"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=6420"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=6420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}