Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way of hide a password?

I have a Python script that is connecting to the database. To that, obviously, I need the password. I need to hide it somewhere.

My problem is that this code is stored in a folder that everybody who has access to the server can look. So, if I write this password encrypted in a file, in the code will appear the key to discover it and people can figured it out.

So, please, if anyone has an idea..

like image 649
Frias Avatar asked Mar 15 '11 17:03

Frias


People also ask

What does hide password mean?

Generally, password masking is helpful to hide the characters from any user when the screen is exposed to being projected so that the password is not publicized. In this article, we will learn to hide the password using HTML.


1 Answers

You're using a scripting language and accessing a database directly with a password. No matter what you do, at some level that password is going to be easily accessible. Obscuring it doesn't really buy you much.

You have to rely on the machine's security and permissions, and perhaps the database (restricting access from that particular machine and user).

like image 52
Brian Roach Avatar answered Sep 23 '22 12:09

Brian Roach