Decrypt DSN password ENP to PWD - sybase-asa

I have a file dsn containing encrypted password. I need to get the decrypted password and perform the steps). We are not storing password anywhere else.
Is there any way to get the PWD using some routine or sybase tool?
We are using Sybase version 9.0.2 (DBODBC9.DLL)..pretty old
Any help is highly appreciated.
Thanks

Check out the link.
http://sqlanywhere-forum.sap.com/questions/6636/decrypt-dsn-password-enp-to-pwd
This should give you all information on this.

Related

How to use encrypted password with Postgres and psycopg2

I have a Docker container which used for a Flask application and I have defined the password in the environment variable like the following
ENV DATABASE_PASSWORD=mypassword
Now in this scenario, I need to put the password in the file and this file is part of the version control. I need to hide the password in such a way that the other people including the DevOps will not be able to get the password. I can do encryption and decryption, but then also, the code is visible and other developers can print the password. I am using psycopg2 to connect to the database and has the following code:
conn = psycopg2.connect(
host=os.environ['DATABASE_HOST'],
database=os.environ['DATABASE_NAME'],
user=os.environ['DATABASE_USER'],
password=os.environ['DATABASE_PASSWORD']
)
I am looking for a way that I can hide the password from the outside. I am not sure this is even possible. Or is there any other way that I can store the passwords and use them in the code? Any service I can use for this purpose? Please suggest.

DB2: Is it possible to connect to DB2 from application suppressing password and using trusted connectivity

DB2 is our Application DB and we are connecting from our application using the DB2 libraries.
However, we store the credentials in an encrypted format and use that for connecting.
If DB2 has an option to connect using a trusted user (like Informix), we could remove the password stored, though it is encrypted.
Anyone knows, is it possible with DB2?
Any help is much appreciated.
Thanks
You may try the Client authentication method or Kerberos Authentication.
Authentication methods for servers.
Kerberos authentication.

how to protect the mongo password in shell script?

I have backed up the data from my deployed database successfully using the following commands:
mongodump admin -u user -p password
Is there a shell script to do this automatically with the password hidden(to protect the password even someone get the script)?
You can use crontab to create scheduled task on the server that will run this command for you. in that way only those who have access to the server can get your password.
Here is a link how to do it https://sheharyar.me/blog/regular-mongo-backups-using-cron/
You should implement the solution by Ariel with a read-only user. This limits the damage when someone still manages to obtain the script. It would also be good practice to store the password encrypted and let the scrip that runs the backup decrypt it.

Recover admin password and email Odoo server

Months ago, I installed an Odoo server and it worked perfectly !
Problem is that I forgot the identification (email/pass) for the admin, wich is real bad.
After uninstalling the server and reinstalling it I found out that the database was not wiped. So it didn't change at all !
Please, can anyone help me finding the admin's email and password ?
I'm not very familiar with progresql but res_users displays empty passwords:
You may change admin password using progresql from the terminal. You just need to do like these
odoo#odedra:~$ psql testing_db
psql (9.1.14)
Type "help" for help.
testing_db=# UPDATE res_users SET password='new_password' WHERE login = 'admin';
UPDATE 1
where testing_db is database name.
Now login with new password and change user details whatever you want.
You need to generate password with pbkdf2_sha512 hashing algorithm. Then update the record id = 1 with password_crypt field not password.
For example:
Generating hash from python code:
from passlib.context import CryptContext
print CryptContext(['pbkdf2_sha512']).encrypt('<PASSOWORD>')
Then:
update res_users set password='' ,password_crypt='<HASH>' where id = <ID>;
Replace , with the generated output from the script and designated id.

How to get the password and username from odbc.ini elegantly in Perl

ODBC driver api has a function SQLGetPrivateProfileString in C/C++.I can use it to get the username and password from odbc.ini and connect to db.
But for perl DBI module, there are not any functions like this, I have to read the file directly and it's not recommended.
Is there any good solution? Thanks.