Search code examples
passwordspassword-protectionpassword-encryptionnet-use

Batch | Net use Password


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


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).