-Re: scripted way to create users
Adam Fuchs 2013-01-18, 16:41
Using the Java API through JRuby or Jython would be another option. With
Jython, that would look something like this:
> jython adduser.jython
____contents of adduser.jython_____
from org.apache.accumulo.core.client import ZooKeeperInstance
from org.apache.accumulo.core.security import Authorizations
from org.python.core.util import StringUtil
inst = ZooKeeperInstance("instanceName","localhost")
conn = inst.getConnector("root","password")
On Tue, Jan 15, 2013 at 1:12 PM, Ask Stack <[EMAIL PROTECTED]> wrote:
> echo password_file | cbshell -f command_file seems to work. any better
> I am not a programmer so I am not going to try the java option but thanks.
> From: William Slacum <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]; Ask Stack <[EMAIL PROTECTED]>
> Sent: Tuesday, January 15, 2013 12:07 PM
> Subject: Re: scripted way to create users
> You could redirect input from a file.
> On Tue, Jan 15, 2013 at 8:20 AM, Ask Stack <[EMAIL PROTECTED]> wrote:
> > I like to make an accumulo commands file to create users. Something like
> "createuser hello -s low" But "createuser" command does not have an option
> to provide user password. The script will stop and prompt me for the new
> user password. Does anyone know how to solve this problem?