title: Hadoop Credentials using Password File
body: <p>I was going through the doncumentaion of Hadoop Credentials as provided in 
  <a href="https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/CredentialProviderAPI.html" rel="nofollow noreferrer">https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/CredentialProviderAPI.html</a></p>
  
  <p>But while using the 3rd option to Provide password for keystone using password file, I am getting a failure everytime. An excerpt of the command used is provided below. Can anyone tell me what is the error and how to rectify this.</p>
  
  <p>hadoop credential -Dhadoop.security.credstore.java-keystore-provider.password-file=/home/dir/test.txt create mssql2.password -value 'SomePassword' -provider localjceks://file/home/dir/aws3.jceks</p>
  
  <p>The Error is provided below:</p>
  
  <p>java.io.IOException: Password file does not exist
      at org.apache.hadoop.security.ProviderUtils.locatePassword(ProviderUtils.java:135)
      at org.apache.hadoop.security.alias.AbstractJavaKeyStoreProvider.locateKeystore(AbstractJavaKeyStoreProvider.java:323)
      at org.apache.hadoop.security.alias.AbstractJavaKeyStoreProvider.(AbstractJavaKeyStoreProvider.java:86)
      at org.apache.hadoop.security.alias.LocalJavaKeyStoreProvider.(LocalJavaKeyStoreProvider.java:58)
      at org.apache.hadoop.security.alias.LocalJavaKeyStoreProvider.(LocalJavaKeyStoreProvider.java:50)
      at org.apache.hadoop.security.alias.LocalJavaKeyStoreProvider$Factory.createProvider(LocalJavaKeyStoreProvider.java:177)
      at org.apache.hadoop.security.alias.CredentialProviderFactory.getProviders(CredentialProviderFactory.java:58)
      at org.apache.hadoop.security.alias.CredentialShell$Command.getCredentialProvider(CredentialShell.java:181)
      at org.apache.hadoop.security.alias.CredentialShell$CreateCommand.validate(CredentialShell.java:345)
      at org.apache.hadoop.security.alias.CredentialShell.run(CredentialShell.java:81)
      at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
      at org.apache.hadoop.security.alias.CredentialShell.main(CredentialShell.java:460)</p>