Add user
If you already have some users, the password file [filename] will already exist.
htpasswd2 /var/svn/conf/[filename] [username]
The -c flag will create a new file, so don't use it if you only want to add a user to an existing file otherwise you'll overwrite the entire file (hence delete all existing users).
htpasswd2 -c /var/svn/conf/[filename] [username]
Edit user
This is the same as creating a new one.
htpasswd2 /var/svn/conf/[filename] [username]
Delete user
htpasswd2 -D /var/svn/conf/[filename] [username]
Specifying password on the command line as an argument
In all examples, you can use the -b to allow you to specify the password as an argument rather than being prompted for it. e.g:
htpasswd2 -b /var/svn/conf/[filename] [username] [password]
No comments:
Post a Comment