The code below can be used in a Background Script or Fix Script to reset a User’s password. The key command is to user setDisplayValue. This sets the password.
var userGr = new GlideRecord("sys_user");
userGr.get("user_name", "rtmodule");
userGr.setDisplayValue("user_password","$Douglas1$");
userGr.setValue("first_name","RT");
userGr.update();
Leave a Reply