Question

Sorry for my bad English, but if you can help my it will be great. I have couple of file system over my network and every night I need to take one file from another file system to mine. for that to happen i'm using a Batch script how mapping me the drive with net use command. my problem is that i don't want the password will go through clear text ( To see my password or to sniff it). my questions is :

there is any way that i can encrypt my password and still login with the same credentials.

Thank You

Was it helpful?

Solution

If you can set up a Domain controller using either one of your Windows machines, or Samba, then you could use Trusted authentication based on the user executing the scheduled job that executes the batch file.

Alternately, you could encrypt the password and have a program decrypt it and execute the net use, but you're always* going to be faced with the fact that if your computer can send the password out when you don't type it in, then your computer knows your password, and anyone with physical access to that computer can get your password.

*Unless your computer doesn't know the password, and instead relies on an HSM (Hardware Security Module).

OTHER TIPS

I had the same thing but found a nice workaround. The passwords are not stored in DOS so I went from the run menu and simply typed the name of the path like "\server\files". When it asked for credentials I ticked the checkbox "Save credentials" The password will then be stored in your Windows Credential Manager (control panel) and this way your dos batch file fwill always now the password.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top