Closed Thetecher closed 3 years ago
@Thetecher storing credentials in a script is agains any kind of secure practise. Better integrate your NAS or fileserver into Active Directory via LDAP.
I agree it is not very secure, but you can add a line around line 240, after the 'Done' section.
cmd.exe /C "cmdkey /add:"servername.domain.local
" /user:"localhost\username
" /pass:"Password123
""
As far as I saw that piece of code isn't copied to the local computer.
I'm not sure if it works. At the first test it seems to work but a few tests later it seems that it doesn't work anymore. Therefore I tested to fill in the credential by a separate script, that works.
How to modify script to include the ability to map a drive and connect to it using different credentials? Thank you for your time