修改SVN密码命令行

发布于 2024-11-04 13:31:37 字数 55 浏览 4 评论 0原文

如何从命令行更改 SVN 密码?

如果可以从命令行完成,这对我来说是最好的方法。

How do I change the SVN password from command line?

It is the best way for me if it can be done from the command line.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

不即不离 2024-11-11 13:31:37

在 Subversion 上设置密码的方法有多种。这取决于您使用的服务器(svnserve、http、svn+ssh)以及管理员设置一切的方式。

Subversion 不包含内置的身份验证方法。相反,它可以使用许多不同的外部身份验证方法,从非常简单到极其复杂。有些将允许用户更改自己的密码,甚至设置自己的帐户。其他则需要系统管理员来完成。这完全取决于您的特定设置。

  • 在我们的网站上,我们使用 Apache http 来为我们的 Subversion 存储库提供服务 (svn co http://server/src/repos)。我已将其设置为使用 Windows Active Directory,因此用户的用户名和密码是其 Windows 用户名和密码。这意味着我不必处理用户的我忘记了密码请求,并将整个帐户问题交给我们的 Windows 管理员。
  • 有些站点使用 Apache http,但使用位于 Apache 服务器本身的密码文件。这通常称为 htpasswd ,其位置由 Subversion 管理员配置。系统管理员可能有办法让用户设置自己的密码,但这不一定是真的。在这种情况下,您必须联系管理员并要求他们更改您的密码。
  • 某些站点使用 svnserve (svn co svn://server/repos)。标准的设置方式是 Subversion 存储库的 config 目录中有一个 passwd 文件。它位于运行服务器的系统上,您无权访问它。同样,您必须联系系统管理员。
  • 某些网站使用 SASL 进行身份验证。这可以使用 Windows Active Directory、LDAP 或任意数量的身份验证方法。有时您可以设置自己的密码,有时您必须询问管理员如何完成。

因此,您必须询问 Subversion 管理员如何更改您的密码。如果幸运的话,还有一种方法可以自己做。如果不是,您必须要求 Subversion 管理员进行更改。

There are multiple ways passwords are setup on Subversion. It depends upon the server you're using (svnserve, http, svn+ssh), and the way the administrator has set everything up.

Subversion doesn't contain a built in authentication method. Instead, it can use many different external authentication methods from the very simple to the extremely complex. Some will allow users to change their own passwords and even setup their own accounts. Others require a system administrator to do it. It all depends upon your particular setup.

  • On our site, we use Apache http to serve our Subversion repository (svn co http://server/src/repos). I've set it up to use our Windows Active Directory, so the user's username and password is their Windows' username and password. It means I don't have to handle users' I forgot my password requests, and passed the whole account headache to our Windows administrators.
  • Some sites use Apache http, but use a password file located on the Apache server itself. This is usually called htpasswd and its location is configured by the Subversion administrator. It's possible that the System administrator has a way to let the users set their own passwords, but that's not necessarily true. In this instance, you have to contact the administrator and ask them to change your password.
  • Some sites use svnserve (svn co svn://server/repos). The standard way this is setup is that there's a passwd file in the Subversion repository's config directory. This is located on the system that's running the server, and you have no access to it. Again, you have to contact the system administrator.
  • Some sites use SASL for their authentication. This can use Windows Active Directory, LDAP, or any number of authentication methods. Sometimes you can set your own password, sometimes you have to ask the administrator how it's done.

So, you're going to have to ask your Subversion administrator how to change your password. If you're lucky, there's a way to do it yourself. If not, you'll have to ask your Subversion administrator to change it.

沉溺在你眼里的海 2024-11-11 13:31:37

您必须使用命令行编辑器编辑 /repo/conf/passwd 下的文件,例如 Vim
使用 svnadmin 等 Subversion 命令行实用程序无法做到这一点。

You must edit a file under your /repo/conf/passwd using a command line editor like Vim.
There is no way to do this with Subversion command-line utilities like svnadmin.

初见你 2024-11-11 13:31:37

如果使用https,则密码可能由 Apache 定义。这就是我更改密码所需执行的操作,以防对其他人有帮助:

# using root account
cd /etc/apache2
cat foo.passwd # the right user, foobar was found here
# copy the line for foobar, in case you want to restore it!
man htpasswd # a little refresher on what the command does
htpasswd foo.passwd foobar
# new password is prompted
cat foo.passwd # check that the line for this user actually got changed

然后使用 https 进行结账,以验证是否更改了正确的密码。

If https is used, the password may be defined by Apache. This is what I needed to do to change password, in case it helps someone else:

# using root account
cd /etc/apache2
cat foo.passwd # the right user, foobar was found here
# copy the line for foobar, in case you want to restore it!
man htpasswd # a little refresher on what the command does
htpasswd foo.passwd foobar
# new password is prompted
cat foo.passwd # check that the line for this user actually got changed

Then do checkout with https to verify the right password got changed.

信仰 2024-11-11 13:31:37

这就是我必须做的:

cd /etc/httpd/conf/svn

备份当前的 svn-auth 以防万一

cp svn-auth.htdigest svn-auth.htdigest«yymmDD»
htdigest svn-auth.htdigest “Subversion Repository” «user-name»

它要求新的密码

This is what I have to do:

cd /etc/httpd/conf/svn

backup current svn-auth just in case

cp svn-auth.htdigest svn-auth.htdigest«yymmDD»
htdigest svn-auth.htdigest “Subversion Repository” «user-name»

It was ask for new passwsord

吾性傲以野 2024-11-11 13:31:37

htpasswd -m C:\csvn\data\conf\svn_auth_file admin

htpasswd -m C:\csvn\data\conf\svn_auth_file admin

熊抱啵儿 2024-11-11 13:31:37

我建议安装 Collabnet SubVersion Edge 捆绑包,因为它包含一个允许用户自行更改密码的 Web 工具。

I recommend installing the Collabnet SubVersion Edge bundle, since it includes a Web tool for allowing users to change their passwords on their own.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文