Tag Archives: NewAdmin

How to obscure passwords in batch files

14 Sep

batch file

I came up with this one the other day for a client. Suppose you are creating a user account from a batch file, as follows:

  net user NewAdmin MyPassword /ADD

Now, of course, having such a line in a batch file is a Really Bad IdeaTM because you have the password in clear text. The client asked if there was a way that I could obscure the password. I told him that it wouldn’t be really secure, and he replied that that was fine; he just wanted to “keep honest people honest.” Continue reading