HTTP ERROR 404
Problem accessing /csvn/user/index. Reason: Not Found --------------------------------------------------------------------------------
Powered by Jetty:// 控制台用户管理:
相关重要文件:{安装路径}\data\csvn-production-hsqldb.script 和{安装路径}\data\csvn-production-hsqldb.properties 原理推测(可能不正确):
我找了几天后来才发现,控制台管理用的是hsql数据库,并且数据全部存储在内存中。
第一步:服务启动(指服务CollabNetSubversionServer绑定的httpd.exe)时,执行csvn-production-hsqldb.script在内存中初始化表和数据;
第二步:期间的所有操作都是保存在内存中;
第三步:服务关闭是,内存中的所有数据更新到csvn-production-hsqldb.script文件中。 因为无法在页面修改删除用户,所以采用关闭服务修改csvn-production-hsqldb.script的方式可以实现用户的管理。
csvn-production-hsqldb.script示例: CREATE SCHEMA PUBLIC AUTHORIZATION DBA
CREATE MEMORY TABLE CATEGORY(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION BIGINT NOT NULL,NAME VARCHAR(255) NOT NULL)
...........................
INSERT INTO USER VALUES(1,1,'admin user','admin@rouselife.com',TRUE,'0ef9a776d895692b2710e8b996f12af6','Super Administrator','admin')
用户存储文件为{安装路径}\data\conf\svn_auth_file,使用{安装路径}\bin\htpasswd.exe进行管理。
需要在控制台下运行,以下为输出内容(先打印三次 用户名/密码的文件存储值,然后再增加用户,最后删除用户):
Microsoft Windows [版本 6.1.7600]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\meteor>d:
D:\>cd D:\csvn\bin
D:\csvn\bin>htpasswd
Usage:
htpasswd [-cmdpsD] passwordfile username
htpasswd -b[cmdpsD] passwordfile username password
htpasswd -n[mdps] username
htpasswd -nb[mdps] username password
-c Create a new file.
-n Don't update file; display results on stdout.
-m Force MD5 encryption of the password (default).
-d Force CRYPT encryption of the password.
-p Do not encrypt the password (plaintext).
-s Force SHA encryption of the password.
-b Use the password from the command line rather than prompting for it.
-D Delete the specified user.
On Windows, NetWare and TPF systems the '-m' flag is used by default.
On all other systems, the '-p' flag will probably not work.
D:\csvn\bin>htpasswd -nb test test
Automatically using MD5 format.
test:$apr1$8zaa10Xj$H5vxdhlLDGCo94D5Xkfeu.
D:\csvn\bin>htpasswd -nb test test
Automatically using MD5 format.
test:$apr1$SlijYX9/$ahxS8zf3PPZHszCNump17/
D:\csvn\bin>htpasswd -nb test test
Automatically using MD5 format.
test:$apr1$kTeZJZWN$lg0VepXgOfutEgCd1kaM8.
//增加用户
D:\csvn\bin>htpasswd -b D:\csvn\data\conf\svn_auth_file test test
Automatically using MD5 format.
Adding password for user test
//删除用户
D:\csvn\bin>htpasswd -D D:\csvn\data\conf\svn_auth_file test
Automatically using MD5 format.
Deleting password for user test