Configuration of cvsnt in windows (full)

Source: Internet
Author: User

After installing cvs on the server, create one or more databases. In this way, the CVSROOT folder is automatically generated in each database, which contains many important configuration files, some files automatically exist (such as config and passwd. The passwd file does not exist when no user is added. When a user is added with a command, the file is automatically generated ), some of them need to be manually created by the cvs system administrator (such as admin and group ).

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.

The config FILE cannot be modified on the server (because the FILE format cannot be edited and saved on the CVSNT server), but it can be changed after being checkout to the client, change the second row to SystemAuth = no and then commit it to the CVSNT server. Then, you can enable a single authentication method.

Note: After a single authentication method is enabled, the original Windows user will become invalid. Therefore, pay attention to the time to perform this step. Make sure that the passwd file already exists and has users. Otherwise, no one can log on to this database, and the config file checkout cannot be modified.One solution is:Find a SystemAuth = yes config file under the CVSROOT directory of another database and copy it to overwrite the config file under CVSROOT.

 

The config file is automatically generated in the CVSROOT directory when the database is created. The conclusion is as follows,Different authentication methods can be provided for different libraries.Therefore, these prerequisites must be set before each database is created.

 

2. admin file

After systemAuth is set, the admin file is created under the cvsroot directory. This file is the file that saves the CVSNT administrator list. CVSNT checks whether a user is an administrator based on this file.

Some users prefer to create an admin file directly under the CVSROOT directory of the server. If you want to migrate the file from the CVSROOT directory of the server to the local machine, the file will not be checkout.Therefore, the best way is to create an admin file under the CVSROOT directory of the local client after the server checkout cvsroot directory to the local machine, and then add and commit to the server, in this way, the next file can be checkout!

Create an admin file on the client:

First go to The cvsroot directory and run the command: echo> admin

The content of this file is simple in the following format:
User1
User2
User3
Each row defines a Manager User. By default, this file is not available, but you can add and add the file on the client and then commit it to CVSNT,However, this file does not take effect. You must add it to the checklist file so that CVSNT can read the content of this file.,The format of adding a file list to the checkoutlist 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.

Checkoutlist is a maintenance file list, which can be placed into the system automatically build user-defined system file list. Note: it does not take effect for passwd !!

 

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, but we can log on as a system administrator when CVSNT is still working in the Hybrid Authentication Mode and add user commands to make CVSNTAutomatic CreationA 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.

After this file is created on the server, you do not need to manually modify it. When you delete the password on the client or add or delete a user, the system automatically updates the file. This file manages all users in the CVSNT system. Therefore, you should pay special attention to it. If you do not know the file format, do not modify it at will,Do not try to modify it on the client

 

4. group file

This file is used to define group information in CVSNT,Users in the same group have the same permissions.,The modification of group permissions is the same as that of user permissions (that is, cvs chacl groupname/username: r/w/c/n ).
Some people prefer to create the group and admin files directly under the CVSROOT directory of the server. In this way, if you want to migrate the files from the CVSROOT directory of the server to the local machine, they will not be checkout.Therefore, the best way is to create a group and admin file on the client, add the file, and then commit. In this way, the file can be checkout out!

Create a group file on the client:

First go to The cvsroot directory and run the command: echo> group

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.

As a specific member of a group, you can also grant specific permissions. The permissions are divided into two types: c, w, r, and n (r: Read w: write c: control n: none ), deny permissions has a high priority.

 

5. perms File

This file exists in every directory in CVS repository. CVSNT uses this file to control the user's permissions on the current folder. CVS user permission: r | w | c | n (r: Read w: write c: control n: none)

For example:

Default: n

Admin: rwc

User: r

The first row in the above file indicates that the default permission of the current folder is none (no permission), and the admin user/group permission is rwc (read, modify, and create ), the user/group permission is r (read ).

 

------------------------------------

After learning about the above content, let's talk about the configuration operation without using WinCVS, that is, directly using the command line. I think this idea is clearer:

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

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

Check out the CVSROOT directory:

Cvs co CVSROOT

3,After adding 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:

([From]: You can also use this method to set permissions for a folder to be controlled, that is, use the command: "cd folder path" to enter this folder, then, modify and control the permissions of different users)

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 Use the added cvsadmin to log on. At this time, you can turn off the 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 first log on.

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: r | w | c | n, (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.

Related Article

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.