【ranger】ranger-usersync更新ldap最短时间为1hour / 3600s 修改

一、编译ranger

npm config set strict-ssl false
# when log: ` Running 'npm run r.js` a application that related to js file would be opened, just close the application, to let job continue. 
mvn clean package "-Dmaven.test.skip=true" "-Pranger-admin" "-DskipJSTests" "-Denunciate.skip"

注意win环境下编译时候自动弹出,和r.js "-o" "../security-admin-web-2.6.0/minify.build.js 有关系的文件时候,请关闭编辑器,关闭窗口不可以,必须关闭整个编辑器(比如我的js文件关联的编辑器是notepad++)。
修改下类:
org.apache.ranger.unixusersync.config.UserGroupSyncConfig
的值就可单位是毫秒

private static final long UGSYNC_SLEEP_TIME_IN_MILLIS_BETWEEN_CYCLE_LDAP_DEFAULT_VALUE = 30000L;

将编译好的unixusersync-2.6.0.jar复制到/some-dir/ranger-2.6.0-usersync/dist,重启ranger-usersync即可。

posted @ 2025-09-02 11:41  lisacumt  阅读(9)  评论(0)    收藏  举报