Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

scano_183208 avatar image
scano_183208 asked ·

Issues with providing credentials to DSEFS through environment variables

Hello,

I am having trouble creating/mod the .profile file inside of my linux machine to add the Variables needed in order to run dse fs without having to specify the user and password. It does not seem like by adding the variables, saving, then running the command works. I have also tried doing export DSE_USERNAME="", which works, however, it only works throughout the session. After i exit and log back in the export command does not save.

I want to be able to do dse fs without specifying the user and password and whether i am logged as the super user or a different user.

Thank you,

Simon

authenticationdsefs
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

jaroslaw.grabowski_50515 avatar image
jaroslaw.grabowski_50515 answered ·

Hi, could you add the `export x=y` statements to ~/.bashrc file?

1 comment Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

@jaroslaw.grabowski_50515 I tried adding the export statement to the /.bashrc file but it did not work. I ended up adding it to the /etc/bash.bashrc file instead and it seemed to work. Not sure if this is the right approach tho.

0 Likes 0 ·
Erick Ramirez avatar image
Erick Ramirez answered ·

You can provide credentials using environment variables by defining the following variables:

export DSE_USERNAME=username
export DSE_PASSWORD=password

It can be set in the .profile or .bash_profile files in the OS user's home directory. This ultimately depends on your operating system and shell environment as it differs from one Linux distribution to the next.

Consult your operating system manual for details. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.