Manage CVS servers

xiaoxiao2021-03-06  14

After the CVS server is established, everyone is most concerned about how to manage the server. For example, I want someone to read and / or write the authority of the CVS warehouse, but don't want to give it system permissions? It is not difficult, there is a cvsroot directory in the cvs administrator user (in the cvsroot user), this directory has three profiles, passwd, readers, Writers, we can configure CVS by setting these three files. The server, the following introduces the role of these files: Passwd: CVS user list file, its format is very like shadow file: {CVS user name}: [Encrypted password]: [Equivalent system user name] If you I hope that a user is just a CVS user, not a system user, then you have to set this file. After you have just installed this file, this file may not exist, you need to create a CVS administrator user, of course, according to the format, the second field It is the user's encryption password, which is encrypted with CRYPT (3). You can write a program to do encryption, you can also use the lazy way I introduced: first create a system user, name, and CVS users, password is Prepare the CVS user password, copy the second field from / etc / shadow after creating, then remove this user. This method is more convenient to deal with fewer users, and people are not suitable, and there are also safety hazards of conflict conditions, and Root privileges, it is not good. However, the equivalent is. Write a small program is not difficult, you can search for the LinuxForum programming version, have a friend has written a post above. The third field is an equivalent system username. In fact, it is to assign an equivalent system user with a CVS user. Look at the following example you understand its function. Readers: A user list file with CVS read rights. It is a one-dimensional list. Users in this file have only read permissions for CVS. Writers: a list of users with CVS write permissions. Like readers, it is a one-dimensional list. Users in this file have write access to CVS. The above three files may not exist when the default installation, you need to create it yourself, ok, now let us use an example to teach. Suppose we have the following users to use CVS: Laser, Gumpwu, Henry, Betty, Anonymous. Where Laser and Gumpwu are system users, and Henry, Betty, Anonymous we don't want to give system user privileges, and Betty and Anonymous are read-only users, and Anonymous is even more than. So well, let's do some ready to work, first create a CVSPUB user, this user's responsibility is to read and write CVS warehouses on behalf of all non-system users. #adduser ... then edit / etc / group, let CVSPUB users in the CVS group while adding other users with system user privileges to the CVS group.

(See above) and edit the CVSRoot / Passwd file in the CVS administrators, add the following lines: Laser: $ xxefajfka; faffa33: CVSPUB GUMPWU: $ AJFAAL; 323R0OFeeanv: CVSPUB HENRY: $ FAJKDPAIEJE: CVSPUB BETTY: FJKAL; ffjieInfn /: CVSPUB Anonymous :: CVSPU Note: The second field above (separator is :) is a secret text, you want to use the program or use my dirt. Edit Readers file, add the following line: Anonymous Betty Edit Writers file, add the following line: Laser Gumpwu Henry Note: Users in Writers cannot be in Readers, or you cannot upload update files. For users who use CVS to modify its environment variables, such as Laser users' environment variables, open the .bash_profile file under the / home / laser (Laser), join cvsroot = / home / cvsroot export cvsroot with laser login Establish a CVS project, if you want root, you can modify the / etc / profile file. Now we have set it well, so how to use it, I have written a simplest (estimate is also the most common) command: First, establish a new CVS project, usually there are some project files. In this way we can use the following steps to generate a new CVS project: enter your existing project directory, such as CVSTest: $ cd cvstest running command: $ cvs import -m "this is a cvstest project" cvstest v_0_0_1 start description : Import is one of the commands of CVS, indicating an input project file to the CVS warehouse. The string behind the -m parameter is a description text, and write some meaningful things. If you do not add -M parameters, then CVS will automatically run an editor (generally VI, but can change to you by modifying environment variable editor) I like to use the editor.) Let you enter information, cvstest is the project name (actually a warehouse name, which is stored in the warehouse named after this name.) V_0_0_1 is the total mark of this branch. Nothing is used (or is not common.) Start is a tag of the input level of the import logo file, no use. This way we have built a CVS warehouse. The folder for establishing a CVS warehouse should be "clean" folder, that is, only the source code file and the documentation described, and should not include the compiled file code, etc.! Reference: http://case.51cmm.com/cm/no095.htm

转载请注明原文地址:https://www.9cbs.com/read-47173.html

New Post(0)