# CVS: no such user in CVSROOT/passwd

## 2COOL4-U

Hello everyone,

I have been busy trying to get a CVS server up and running and I followed some docs, configured xinetd and initialised a CVS repository. I checked out CVSROOT, added a line <user>:<password>:<real user> to the new passwd file, added it and finally commited it. I added <user> to writers then I updated and commited that file as well.

Everytime I try to login to CVS it gives me the following error:

```

cvs -d :pserver:<user>@localhost/var/cvs login

Logging in to :pserver:<user>@localhost:2401/var/cvs

CVS password:

no such user <user> in CVSROOT/passwd

```

I do not know what to do next. Could someone please help me out?

----------

## jdgill0

Are you wanting to use the CVS server for you own needs, i.e. do you need public access with pserver?

----------

## 2COOL4-U

 *jdgill0 wrote:*   

> Are you wanting to use the CVS server for you own needs, i.e. do you need public access with pserver?

 

Yes, I do. It'll need to be accessible over the internet.

----------

## jdgill0

 *2COOL4-U wrote:*   

> Yes, I do. It'll need to be accessible over the internet.

 

Sorry.  I should have been more clear. You don't have to have cvs setup with pserver to have access over the internet. You only need the pserver (and hence cvsd) working if you want to have an anonymous access for others. I currently use cvs myself and access it over the internet, but I have not set it up for pserver (or cvsd for that matter).

The reason I am trying to clarify your needs, is because if you don't need anonymous access, (i.e. ONLY those with an account on your computer can access the repository) then setting up cvs is a lot simpler, and you don't have to have another daemon running.

----------

## 2COOL4-U

Okay let me clarify the situation then. There will be 3 developers working on this small project, which will need to access the CVS server using their own account. They are all windows users, except for me.

----------

## jdgill0

DISCLAIMER: I am not a CVS expert  :Smile: .

Let me say first that pserver is not the best method. The disadvantages of pserver is that it has a poor encryption scheme for passwords and the data stream to/from the pserver is not encrypted.  I think the typical use of pserver is for anonymous access from a mirrored repository, i.e. not the main developement repository.

Having said that, the secure method of using CVS is throush SSH.  I know little about setting up SSH on Windows, but hopefully the Windows users can do that.

Since it sounds like you only need CVS access for development, you don't actually have to have a CVS server running. At least from the Linux point of view, as I said I know little to nothing about Windows+SSH+CVS.

Let me assume the Windows' CVS clients (maybe running WinCVS?) can access CVS in the same manner as the Linux clients can.

Here are the steps I use on the Linux box hosting the CVS repositories (as root):

```
$ mkdir /cvsroot

$ export CVSROOT=/cvsroot

$ groupadd cvsroot

$ chgrp cvsgroup /cvsroot

$ chmod 2770 cvsroot

$ cvs init

$ add each user that needs access to /cvsroot to the group cvsgroup
```

The chmod 2770 gives owner and group rwx permissions and makes it sticky such that all files entered into the repository are owned by the group cvsgroup.

That's it, CVS is ready to use. Change /cvsroot and cvsgroup to be whatever you prefer.

You will need to log out and back in on your Linux box to make the group change effective.

To use the CVS repository on your local Linux box:

```
$ export CVSROOT=/cvsroot

$ do the usual CVS commands (import/commit/checkout) as you need.
```

To use the CVS repository remotely (again I don't know if this will absolutely work on the Windows boxes):

```
$ export CVSROOT=:ext:username@machine_name_or_ip:/cvsroot

$ do the usual CVS commands (import/commit/checkout) as you need.
```

This is how I use my CVS. It runs 100% through SSH.  If a friend needs access, I just create them an account on my machine and add them to the group cvsgroup.

If this method will not work (i.e. for the Windows users) or is not preferrable, I still suggest doing something different than pserver for development access if possible.

----------

## orionrobots

The best way to access this if you are using wincvs is to download the full version of putty(its free dont worry).

Then use puttygen - and generate yourself a public/private key pair.

Copy the public key into your .ssh/authorized_keys file on your gentoo box, and then start up pagent. It is porbably a good idea to have a password for your key. Once you start up pagent - you will not need to type your password to get in via ssh as the key auth will do it.

Following this - in wincvs set the login mode to ssh (they dont list it as Ext). Then click the advanced button. You can then set the path of the ssh to the path of putty's plink executable - a command line ssh tool.

I normally use this so I can test my python/wxWindows packages under windows, even though I normally develop them under Gentoo.

Orion

----------

## 2COOL4-U

Thanks for all the tips so far, now I have to figure out how to configure SSH. How I love browsing through all those man pages. I tried to search for a nice howto, didn't find a good one, any pointers would be nice  :Smile: .

----------

## jdgill0

To start the ssh server, just

```
/etc/init.d/sshd start

rc-update add sshd default
```

As for key generation, you might check out this howto:

ssh howto

Basically you do the following:

```
ssh-keygen -t dsa

scp  ~/.ssh/id_dsa.pub  username@hostname:.ssh/authorized_keys2

```

Copying the pub key makes it such that you don't have to enter your passphrase when you ssh into the remote host.

----------

