hi 

system users are created without a password and the oak implementation doesn't 
allow them to have a password at all. see constraintviolation error codes 0032 
and 0033 in 
http://jackrabbit.apache.org/oak/docs/security/user/default.html#validation 

kind regards
angela
________________________________________
From: 周旭 <[email protected]>
Sent: Thursday, March 21, 2019 11:12 AM
To: oak-dev
Subject: how to change password for a new system user?

hello expert!

     i create a system user  named dmadmin succefully,but i donot know how to 
set user password.the code like these:

    JackrabbitSession jackrabbitSession = (JackrabbitSession) jcrSession;
    UserManager userManager = jackrabbitSession.getUserManager();
    User user = userManager.createSystemUser("dmadmin", null);
    user.setProperty("description", new StringValue("这是一个超级用户"));
    user.setProperty("role", new StringValue("super_user"));
   jackrabbitSession.save();







------------------
周旭
上海市黄浦区北京东路668号科技京城西楼24层B1
邮编:200002
手机:86-21-13472548356电话:86-21-5296 5638
传真:86-21-5296 5638
邮箱:[email protected]

Reply via email to