Monday, March 17, 2008

Adding and managing CVS users for pserver and sserver access

Adding and managing CVS users for pserver and sserver access

This is a step that is only needed if you plan on using the sserver or pserver protocols with this CVS server. If your users are all on Windows PC:s pserver is not recommended since it has inherent security flaws. Instead use SSPI because that protocols integrate much better with Windows. If you decide to go with sspi (recommended) then you can skip the discussion on how to add and manage users in this section.
1. Creating CVS accounts on the server
In order for pserver and sserver to work you have to define CVS users, but before you can do this you need to create two real accounts on the server. These accounts will be used by the CVS users as the working accounts.
You need one account which will be a CVS administrative account and one which will be a normal user account. Note that the CVS administrator need not be a server administrator!

The two accounts are added through the Users dialog in Computer Management.
I have used the account names cvsadmin and cvsuser.

2. Adding CVS users
Open a command window and do the following (replace items <text> with the real values from your system).

set cvsroot=:sspi:<computername>:/TEST
cvs passwd -a <account name>

You will now be asked to enter a password for this user. This password is only for CVS use so it should not be the real system password! Enter the password twice.
Now the CVSROOT/passwd file will be created and the user you entered will be added to the list in this file.
This step is necessary if you are going to use the pserver or sserver protocol in the future since there is no way to log in with pserver/sserver unless there is a passwd file present with the user listed.

Important note:
Any user entered like this MUST be an NT user on the local system! CVS will not accept any user login that is not connected to a "real" account.

3. Aliasing CVS users to real accounts
In order to have many CVS user logins you don't need to create masses of system accounts! Instead you can "alias" a CVS login to a "real" account using this command:

cvs passwd -r <real accountname> -a <cvs login name>

What will happen now is that to CVS the user will be known and registered as the CVS login given in the command, but for file operations that will encounter permission issues the commands will be executed in the context of the real system account that was aliased. This makes it possible to use NTFS file system permissions to limit access to certain parts of the repository to some users. You simply create a system account for which you set limited permissions and then you alias the CVS login to this user.

Note that this command will fail if there is a space embedded in the real account name! DON'T ever use spaces in these contexts!!!!! (But using quotes may solve the problem like this:
cvs passwd -r "system admin" -a "new user"
Since I don't have a valid user with embedded space I could not check the quotes trick with the valid user name parameter, but adding a CVS login with space embedded *can* be done with quotes.)

Examples:
cvs passwd -r cvsuser -a charlie

or if you want the new user to be a CVS administrator:

cvs passwd -r cvsadmin -a rogerh

Note about Domain users:
You can add domain users with the following command:
cvs passwd -r <real accountname> -D <domain name> -a <cvs login name>
This command is reported by a user to have worked for him. I cannot check it because I don't have a domain. But based on information from the mail list I think that it will only work if there is a trust between the CVSNT server PC and the domain controller. If the CVSNT server PC is a member of the domain then this is the case.

The server is now ready to be used and you can check the pserver functionality by doing this:

4. Testing the CVS connection with sserver
Open another command window and type:
set cvsroot=:sserver:<user>@<computername>:/TEST
Replace <user> and <computername> with valid entries like:
set cvsroot=:sserver:charlie@cvsserver:/TEST

Then:
cvs login (enter password on prompt)
cvs ls -l -R
(this should give you a list of the files in TEST/CVSROOT)

5. Testing the CVS connection with pserver
Open another command window and type:
set cvsroot=:pserver:<user>@<computername>:/TEST
Replace <user> and <computername> with valid entries like:
set cvsroot=:pserver:charlie@cvsserver:/TEST

Then:
cvs login (enter password on prompt)
cvs ls -l -R
(this should give you a list of the files in TEST/CVSROOT)

6. Testing the CVS connection from another PC
Open a command window on another PC where you have installed the CVSNT in client only mode and type:
set cvsroot=:sserver:<user>@<computername>:/TEST
Replace <user> and <computername> with valid entries like:
set cvsroot=:pserver:charlie@cvsserver:/TEST

Then:
cvs login (enter password on prompt)
cvs ls -l -R
(this should give you a list of the files in TEST/CVSROOT)

If you cannot get this far, for example if the login fails, then you should check the Windows Firewall settings on the CVSNT server:

7. Modifying Windows Firewall to allow CVS calls

  • Go to Control Panel
  • Open the Windows Firewall item.
  • Select the Exceptions tab
  • Click the "Add port" button
  • Enter the name CVSNT and port number 2401 as a TCP port
  • Accept back to the main screen
  • Make sure Windows Firewall is set to ON

Saturday, March 15, 2008

Logging into CVS / Setting CVSROOT - (CVSNT / Release 2.0.14)

Follow The Link...
http://www.idevelopment.info/data/Programming/change_management/cvsnt/PROGRAMMING_Logging_into_CVS_CVSNT.shtml

CVSNT Installation and Server Management Tips

Follow The Link
http://www.cvsnt.org/wiki/InstallationTips

CVSNT Wikipedia

Follow Link...

http://www.cvsnt.org/wiki/

Addition Link and Help Material

Some More Link...
http://web.telia.com/~u86216177/InstallCVSNT25.html
http://www.cvsnt.org/wiki/InstallationTips#head-a82f4aaa104807adf3863fced7000f2a69737ae4

CVSNT Auditing Configuration Tutorial

Innosetup CVSNT Installer download

CVSMailer homepage, Automatic email on commits and other events

ViewCvs Installer download

CVSNT command reference

CVSNT download (where you can download the latest CVSNT versions)

Karl Fogel's book 'Open Source development with CVS'

The free part of Karl Fogel's book in HTML format

DevGuy's CVS information pages

CVS-Gui (WinCvs) homepage

WinCvs Dialy use guide

WinCvs 1.3 manual (PDF format)

WinCvs download (on SourceForge)

Using spaces with CVSNT

Follow Process

http://web.telia.com/~u86216177/InstallCVSNT25.html#Spaces

Fine-tuning user access of CVS

Follow Link

http://web.telia.com/~u86216177/InstallCVSNT25.html#UserAccess

Using the SSPI protocol for CVSNT access

Follow Link...

http://web.telia.com/~u86216177/InstallCVSNT25.html#SSPI

Managing pserver and sserver users

Follow Link..,
http://web.telia.com/~u86216177/InstallCVSNT25.html#PserverUsers

Adding new pserver users using the cvs passwd command

Follow Link...
http://web.telia.com/~u86216177/InstallCVSNT25.html#CVSPasswd

Adding new pserver users using the cvs passwd command

Follow Link...

http://web.telia.com/~u86216177/InstallCVSNT25.html#CVSPasswd

Disabling the pserver protocol

Follow Link

http://web.telia.com/~u86216177/InstallCVSNT25.html#DisablePserver

Administrating the repository, users with admin rights

Follow Link..

http://web.telia.com/~u86216177/InstallCVSNT25.html#AdminFile

Adding and managing CVS users for pserver and sserver access

Follow Link..
http://web.telia.com/~u86216177/InstallCVSNT25.html#AddUsers

Configuring the CVSNT server and repository

Follow Link...
http://web.telia.com/~u86216177/InstallCVSNT25.html#ConfigureServer

CVSNT 2.5.03 Installation on Windows 2003

Follow Links...

http://web.telia.com/~u86216177/InstallCVSNT25.html#InstallSteps

Thursday, March 13, 2008

CVSNT

cvsnt