# Onedb hidden password

**URL:** <https://forum.opennebula.io/t/onedb-hidden-password/6533>\
**Category:** Installation & Configuration\
**Created:** [October 15, 2018, 2:18pm UTC](https://forum.opennebula.io/t/onedb-hidden-password/6533 "2018-10-15T14:18:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsfrerot](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/jsfrerot/32/6690_2.png) [@jsfrerot](https://forum.opennebula.io/u/jsfrerot)\
**Post date:** [October 15, 2018, 2:18pm UTC](https://forum.opennebula.io/t/onedb-hidden-password/6533/1 "2018-10-15T14:18:29Z")

</div>

Hi,  
I’m trying to automate opennebula DB backup. I was wondering if there is a way to load the credentials from some config file when using “onedb backup”. For the moment I know only the way of specifying the username/password on the command line and this is not very secure as password appears in process list and in the bash logs.

Thank you.

---

<div class="post-metadata">

**Author:** ![atodorov\_storpool](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/atodorov_storpool/32/5327_2.png) [@atodorov\_storpool](https://forum.opennebula.io/u/atodorov_storpool)\
**Post date:** [October 15, 2018, 2:56pm UTC](https://forum.opennebula.io/t/onedb-hidden-password/6533/2 "2018-10-15T14:56:11Z")

</div>

Hi,

The following patch to `onedb` enable using a shell variable named `ONE_DB_PASSWORD` for the database password:

```
--- /usr/lib/one/ruby/onedb/onedb.rb.orig	2018-10-15 17:45:31.189788519 +0300
+++ /usr/lib/one/ruby/onedb/onedb.rb	2018-10-15 17:42:01.375619618 +0300
@@ -44,6 +44,9 @@
 
             passwd = ops[:passwd]
             if !passwd
+ passwd = ENV['ONE_DB_PASSWORD']
+ end
+ if !passwd
                 passwd = get_password
             end

```

If this helps please open a [feature request issue](https://github.com/OpenNebula/one/issues) to move such patch upstream.

Best Regards,  
Anton Todorov
