Add users to CVS in Linux

Source: Internet
Author: User
Linux adds users to CVS-Linux Enterprise Application-Linux server application information. The following is a detailed description. When using a Linux-based CVS server, you must add users to cvs. If you are using a linux system, the security of the system will be greatly affected.

Cvs provides another solution.

In the cvs repository, there is the CVSROOT Directory, which contains the passwd, readers, and writers files. If not, you can create them by yourself. Where

The data format in the passwd file is as follows:
Cvs User: Password: linux User
Cvs User: Password: linux User
Cvs User: Password: linux User

This file implements the cvs ing between cvs users and linux users.

Readers and writers file formats:
CVS user 1
CVS user 2
CVS user 3

Users who read and write cvs are defined respectively.

The passwd file contains the password of the CVS user, which is generated by encryption. Therefore, you must generate an encrypted password using a tool. The following code is used to generate an encrypted password.

As follows :/*---------------------------------

Filename: cvsuser. cpp

Desc: generate an encrypted password

Version: 1.0.0

Right:

*/

# Include

Using namespace std;

# Ifndef _ XOPEN_SOURCE

# Define _ XOPEN_SOURCE

# Endif

# Include

Int

Main (int argc, char * argv [])

{

Char password [100];

Char confirm [100];

Char * salt [] = {

"AB", "cd", "ef", "gh"

};

Cout <"please input password:> ";

Cin> password;

Cout <"password:" <password <endl;

Cout <"press" y "to confirm:> ";

Cin> confirm;

If (confirm [0] = 'y ')

{

Cout <"confirmed." <endl;

For (int I = 0; I <4; I ++)

{

Char * ret = crypt (password, salt );

Cout <"password:" <I <"result =" <ret <endl;

}

}

Else

{

Cout <"canceled." <endl;

}

Return 0;

}

Compilation Method: g ++-o cvsuser. cpp-lcrypt
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.