DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Anyone in here able to build me a quick plink script for debian machines?
I want it to log in, go to SUDO and run an adduser command, log out, and log any resulting messages. Move on to the next machine, do the same.
if the commands were in a second text file that I could modify easily, that'd be a bonus.
I would rather see that, too. However I'm limited on what tools the windows machines allow to be run, and plink is one that it does.
I normally load the files I use for an upgrade to the windows servers, do the upgrade to the Deb11 machines, and then delete the files, so I'm not concerned about storing the plain text password- it's literally only on the machine an hour at most, and the server has a very narrow allowance of people able to log in.
The idea is to not have to individually log into each linux host (about 200 of them) to run the script.
The Debian machines are very stripped with extremely limited tools on them, but bash scripts can be run.
I also would like a single log file that tells me what host and the results. (knowing of course that if the account was created, there is no CLI feedback, but if the account was there, it will tell me that).
By limited I am guessing you need a Windows batch versus powershell script? plink can read commands from a text file using the -m option. I rarely need to write a batch script and it takes me a bit of effort to remember its syntax as compared to linux scripting...
Your asking members who volunteer their time to write the script for you instead of helping is considered rude by some.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.