The link LVC posted has a Users section containing:
> By convention 3 users are always created by default every time you create
> a new database. Passwords are the same as the user name. Default users are:
On Friday, June 28, 2013 6:23:36 AM UTC-4, Arthur Embleton wrote:
>
> In order to do that, I will need to open the database, which requires that
> I have a username and password.
>
> On Thursday, 27 June 2013 17:28:05 UTC+1, Lvc@ wrote:
>>
>> Hi Arthur,
>> you've to access to the database and then create the user via Java API.
>> You can issue SQL commands or get the Security manager through:
>>
>> OSecurity security = db.getMetadata().getSecurity();
>> security.createUser("arthur", "arthur-password");
>>
>> Lvc@
>>
>>
>> On 27 June 2013 17:16, Arthur Embleton <[email protected]> wrote:
>>
>>> I did read that. I understand that what I'm asking for is possible
>>> through SQL-like queries. However, I am trying to do this through the Java
>>> API.
>>>
>>> Is this possible? Can I execute SQL-like queries from an OServer object?
>>>
>>>
>>> On Thursday, 27 June 2013 16:08:48 UTC+1, Lvc@ wrote:
>>>
>>>> Hi Arthur,
>>>> your question tells you didn't read the link I posted before. Take a
>>>> look at: https://github.com/nuvolabase/orientdb/wiki/
>>>> Security#work-with-users
>>>>
>>>> Lvc@
>>>>
>>>>
>>>>
>>>> On 27 June 2013 17:04, Arthur Embleton <[email protected]> wrote:
>>>>
>>>>> How do I add a DB user, either in code or XML?
>>>>>
>>>>>
>>>>> On Thursday, 27 June 2013 15:53:02 UTC+1, Lvc@ wrote:
>>>>>
>>>>>> Hi,
>>>>>> look at: https://github.com/nuvolabase/orientdb/wiki/Security
>>>>>>
>>>>>> db's users are different than server's users.
>>>>>>
>>>>>> Lvc@
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 27 June 2013 16:35, Arthur Embleton <[email protected]> wrote:
>>>>>>
>>>>>>> I'm trying to write a basic Hello World style example using
>>>>>>> OrientDB. I just want to put a key-value pair and then retrieve it
>>>>>>> later
>>>>>>> from embedded OrientDB. This is my code:
>>>>>>>
>>>>>>> public static void main(String[] args) throws Exception {
>>>>>>> OServer server = OServerMain.create();
>>>>>>> server.startup(new File("orientdb-server-config.xml"));
>>>>>>> server.activate();
>>>>>>>
>>>>>>> ODatabaseFlat db = new ODatabaseFlat("local:/temp/db");
>>>>>>> db.open("root", "password");
>>>>>>> db.getDictionary().put("greeting", "hello world");
>>>>>>>
>>>>>>> System.out.println("Greeting: " + db.getDictionary().get("
>>>>>>> greeting"));
>>>>>>>
>>>>>>> db.close();
>>>>>>>
>>>>>>> server.shutdown();
>>>>>>> }
>>>>>>>
>>>>>>> Here is orientdb-server-config.xml:
>>>>>>>
>>>>>>> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
>>>>>>> <orient-server>
>>>>>>> <network>
>>>>>>> <protocols>
>>>>>>> <protocol implementation="com.orientechnologies.orient.
>>>>>>> server.network.protocol.binary.ONetworkProtocolBinary" name="binary"
>>>>>>> />
>>>>>>> </protocols>
>>>>>>> <listeners>
>>>>>>> <listener protocol="binary" port-range="2424-2430"
>>>>>>> ip-address="127.0.0.1"/>
>>>>>>> </listeners>
>>>>>>> </network>
>>>>>>> <storages/>
>>>>>>> <users>
>>>>>>> <user resources="*" password="password" name="root"/>
>>>>>>> <user resources="connect,server.listDatabases,server.dblist"
>>>>>>> password="guest" name="guest"/>
>>>>>>> </users>
>>>>>>> <security>
>>>>>>> <users/>
>>>>>>> <resources/>
>>>>>>> </security>
>>>>>>> </orient-server>
>>>>>>>
>>>>>>>
>>>>>>> When I execute this, I get heaps of WARN segment file * was not
>>>>>>> closed correctly last time messages followed by User or password not
>>>>>>> valid
>>>>>>> for database: 'db'
>>>>>>>
>>>>>>> Do I need to specify the db users separately in the XML?
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> ---
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "OrientDB" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>> send an email to [email protected].
>>>>>>>
>>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>
>>>>> ---
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "OrientDB" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "OrientDB" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.