You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by vi...@apache.org on 2012/07/16 23:10:54 UTC

svn commit: r1362257 - /accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java

Author: vines
Date: Mon Jul 16 21:10:54 2012
New Revision: 1362257

URL: http://svn.apache.org/viewvc?rev=1362257&view=rev
Log:
ACCUMULO-691 - fixed


Modified:
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java?rev=1362257&r1=1362256&r2=1362257&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java Mon Jul 16 21:10:54 2012
@@ -268,7 +268,7 @@ public class Shell extends ShellOptions 
       this.setTableName("");
       connector = instance.getConnector(user, pass);
       this.credentials = new AuthInfo(user, ByteBuffer.wrap(pass), connector.getInstance().getInstanceID());
-      
+      updateUser(credentials);
     } catch (Exception e) {
       printException(e);
       configError = true;
@@ -911,6 +911,8 @@ public class Shell extends ShellOptions 
   public void updateUser(AuthInfo authInfo) throws AccumuloException, AccumuloSecurityException {
     connector = instance.getConnector(authInfo);
     credentials = authInfo;
+    if (!connector.securityOperations().authenticateUser(authInfo.user, authInfo.getPassword()))
+      throw new RuntimeException("Unable to authenticate user " + authInfo.user);
   }
   
   public AuthInfo getCredentials() {