Answer the question
In order to leave comments, you need to log in
What is the best way to not store a password in a batch or bash script?
There is a user script that, using a login / password, and does nothing else, does something remotely, for example, via HTTP.
I don't want to manually enter the password. In addition, the script can run automatically. I don't want to store the password in the script either.
What is better to use in such cases?
I do not count on maximum security, but I would like a more or less standard, more or less proven solution and that the password in its naked form does not glow at least.
The environment is primarily cmd.exe, but bash, linux, cygwin are also interested.
Answer the question
In order to leave comments, you need to log in
As an option, set a login / password by setting environment variables as a separate batch file, which, of course, should be in a protected (NTFS permissions, user catalog) place. From the first batch file we call "call ..." and login / password in variables.
I join the question, but I'm more interested in bash. I would arrange a variant like how sudo works - some time of inactivity and you need to enter a password to access the file / s with passwords.
chmod 0700 and do not pass passwords in arguments when calling a script/application.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question