From: Erik B. <er...@br...> - 2005-04-01 14:24:51
|
Erik Bruchez wrote: > Wolfgang Meier wrote: > >> Yes, why not? Internally, users are stored in an XML document: >> /db/system/users.xml (only accessible for admin by default). >> >> Concerning the web-based interface: all user management functions are >> also available from XQuery, so you don't necessarily need >> UserManagementService to create new users. > > > Great to know! I was not looking forward to handling writing code to > access the UserManagementService interface. I will try going through the > extension functions first. I have a question about the admin user. The doc says that by default the password is null. Now if I run these from XQuery: xmldb:authenticate('/db/', 'admin', ()) xmldb:authenticate('/db/', 'admin', '') xmldb:authenticate('/db/', 'admin', 'admin') I get false(). What I then tried to do is setting a password for the admin user. So I tried: xmldb:change-user('admin', 'password', (), ()) But this throws "you are not allowed to change this user". I was tring to emulate setting the admin password as done in XmldbRealm: User adminUser = service.getUser(SecurityManager.DBA_USER); if(adminUser.getPassword() == null){ adminUser.setPassword("admin"); log("Update Admin User on inital start"); } Can I actually do this from XQuery, or do I have to use the admin interface? Note that here I am using eXist as an embedded db. Thanks, -Erik |