Install and use cvsnt in Windows

Source: Internet
Author: User

Install and use cvsnt in Windows

 

Source: http://www.xmsc.com.cn/InfoView/Article_117452.html

 

Write down the case.

The content of some online tutorials and my own practices are integrated here, and the source cannot be given one by one. If you are offended, please forgive me.

I am using cvsnt 2.0.51c. Using the latest version in eclipse, I cannot list the content on the server. I just want to change this version. Now I don't know what's going on.

First install. If you are using the installation package version, it is very simple. Next, if you are using a directly decompressed version, decompress the package and run cvsnt. CPL and setuid. copy the DLL to % winroot %/system32 and run the following command in the current directory to register the cvsnt System Service:

Cvsservice-I
Cvslock-I

After that, you can see the CVs for NT icon in the control panel. Start the CVS service and CVS lock service first. Note that if you are using the decompressed version, run genkey in the cvsnt directory to generate the SSL key:

Genkey.exe cvsnt-default.pem

Select the generated key file in the SSL settings file. It seems that it is useless without SSL login. If so, it is useless.


Set the repository, that is, the location of the cvsnt resource library. Switch to the repositories tab and add to add the location of the cvsnt resource library. Here, the location is E:/cvsnt/Repository, And the name is the path name used to access, by default, I am/cvsnt/Repository. If it is a new directory, you will be prompted whether to initialize repository and agree.

Switch to advanced. First, hook the local users for pserver authentication instead of Domain Users and pretend to be a Unix CVS version, this allows cvsnt to use a local account as the pserver authentication method and simulate the cvsnt server as a Unix CVS server,

The cvsnt server has been configured, and the next step is the user configuration with the most problems I encountered during use.

First, let's talk about the cvsnt user authentication method. cvsnt's user authentication methods can be divided into two types: Windows users and cvsnt users coexist in a hybrid authentication method, and cvsnt user single authentication method, by default, Hybrid Authentication is used. Of course, it is easier to manage users using a single authentication method. Therefore, the following configuration is based on this method. The authentication methods and user configurations used by each resource library are determined by the configuration files in the cvsroot directory. There are several important files.

1. config file

The configuration file is used to control cvsnt verification. Note the first two lines of the file:

# Set this to 'no' if pserver shouldn't check system users/passwords
# Systemauth = Yes

The second line is the content to be modified. The default status is commented out. systemauth has two values: Yes and no:

Yes: pserver uses Windows users and cvsnt users for joint verification (if cvsnt users are not defined, Windows users are used for verification). The default value is yes, cvsnt is defined in the passwd file to be introduced later.

No: Only cvsnt users are used for verification.

This file can be modified on the client, so we can check it out and change the second line to systemauth = No, and commit it to cvsnt to enable a single authentication method, note that after a single authentication method is enabled, the original Windows user will become invalid. Therefore, pay attention to the time to perform this step.

2. admin file

This file saves the cvsnt administrator user list in the following format:
User1
User2
User3
Each row defines an administrator user. By default, this file is not available, but you can add and add it on the client and then commit it to cvsnt. However, this file does not take effect only, add it to the checklist file so that cvsnt can read the content of the file. The format of the file list added to the checklist is as follows:

[Space] File Name error message

The space before the file name must exist. Otherwise, an error occurs.
You can add the admin file to cvsnt and modify the checklist file commit to make the admin file take effect.

3. passwd file

When the server is working in a single cvsnt User Authentication mode, this file defines the cvsnt user information, which stores the user name, user password, and alias information. This file does not exist by default. However, when cvsnt is still working in the Hybrid Authentication mode, we can log on as a system administrator and use the Add USER command to allow cvsnt to automatically create a passwd file.

Example of adding a user's command:

CVS passwd-r administrator-A cvsadmin

Then the system prompts you to enter the password. after entering the password, the server will create a new passwd file.

The content of this file is simple in the following format:

Cvsadmin: fqr1fs4gdghrt: Administrator
Kid: atxrfs31bm6ja
Mystique: yna4qcxz9deqd

Take the first behavior as an example: cvsadmin as the user name, fqr1fS4gDghrt is the result of using the UNIX standard encryption function to encrypt the password, and administrator is the alias of the user, the Windows user name is used for Hybrid Authentication.

Note: This file cannot be modified on the client or checkout.

4. group file

This file defines the group information in CVSNT. users in the same group have the same permissions. The modification of group permissions is the same as the modification of user permissions.

The content of the group file is

Administrators: cvsadmin kid mystique
Users: User1 User2 User3

You can see that the content of this file is also very simple, group name: User Name, multiple user names are separated by spaces.

The Group file can be modified on the client. The system automatically takes effect without modifying the checkoutlist file.

You can assign specific permissions to a specific member in a group.

After learning about the above content, I will talk about my own configuration steps. I did not use WinCVS for operations, but directly modified it using the command line. I think this idea is clear:

1. Add the system variable CVSROOT = E:/CVSNT/Repository and add E:/CVSNT to the system Path.

2. Enter the command prompt. Because the mode is mixed verification, you do not need to log on to the system to perform checkout directly. You can create a working directory to operate it. Here I am E:/CVSNT/Works.

Check out the CVSROOT directory:
 
Cvs co CVSROOT

3. Add a CVSNT system administrator user. The system will prompt you to set the user password:

Cvs passwd-r administrator-a cvsadmin

4. Modify the cvsroot access permission:

CD cvsroot
CVS chown cvsadmin // change the owner to cvsadmin
CVS chacl default: N // The default permission is N.
CVS chacl cvsadmin: RWC // Add cvsadmin

5. Modify the config file and follow the above method to modify the commit:

CVS Ci

6. At this time, the single authentication method has been enabled, that is, you can only log on with the added cvsadmin, in this case, you can disable use local users for pserver authentication instead of domain users on the cvsnt control panel. You need to change the system variable cvsroot before logging on, close the Command Prompt window, and change cvsroot:

: Pserver: cvsadmin@192.168.0.1: 4021/cvsnt/Repository

Here, 192.168.0.1 is the Server IP address, and/cvsnt/Repository is the name set in the previous repository setting. You can change it to the configuration on your machine. After modifying the system variables, perform the following steps on any machine connected to the server. Of course, the machine should have the cvsnt executable file.

7. To avoid errors, restart the cvsnt server and then start the command prompt to E:/cvsnt/works. Because a single authentication method has been enabled, you must log on first.

CVS Login
 
Enter the password and log on with cvsadmin.
 
8. Add the admin file, check out cvsroot, and create a new admin file under cvsroot. The content is
 
Cvsadmin
 
Run the following command:
 
CVS Add Admin
CVS Ci
 
9. Modify the checklist file and add a line at the end of the file:

[Space] admin error message
 
Note: there must be no less space before admin.
 
Run the following command:
 
CVS Ci
 
After the above steps, we can say that the user configuration has been basically completed, and cvsnt can work well in a single verification method. For further management, run the following command:

Add User: CVs passwd-a username. You do not have to worry about the alias prompt when using it.

Modify user permissions: CVs chacl Username: rwcn, (R: read W: Write c: control N: None)

To add group management, you only need to create a group file according to the format requirements, just like Adding admin.

If you still have any questions, you can refer to the built-in documents for more details.

Okay, this is almost the case. If you have any mistakes, please help us to point out that you are still learning ing.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.