LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-02-2016, 11:22 PM   #1
shuen
LQ Newbie
 
Registered: May 2016
Posts: 1

Rep: Reputation: Disabled
Setup CVS Server Ubuntu 14.04 Server


Hi,

I am new. I also new to Linux. I have setup CVS server in Ubuntu 14.04 Server. The guide that I follow is http://www.itnotes.eu/?p=358. After setup, CVSROOT can be checkout by normal user. I thought CVSROOT directory should be not checking out by normal user, is that correct? How do know that I correctly setup CVS server?

Appreciate your help and guidance.

Thank you very much.
 
Old 05-10-2016, 08:53 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
The CVSROOT directory can be looked at but not modified by users; it should be owned by root and it would be a good idea to have a group, I use cvsusers, for all the content of the cvsroot directory. My repository looks like this:
Code:
ls -al /usr/local/cvsroot
total 52
drwxrwxr-x 13 root cvsusers 4096 Nov  3  2011 ./
drwxr-xr-x 24 root root     4096 May 12  2015 ../
drwxrwxr-x  3 root cvsusers 4096 Oct 20  2012 CVSROOT/
drwxr-xr-x  3 root cvsusers 4096 Oct  7  2009 county/
drwxr-xr-x  3 root cvsusers 4096 Nov 15  2011 general/
drwxrwxr-x  3 root cvsusers 4096 Oct 20  2012 gnis/
drwxrwxr-x  3 root cvsusers 4096 Jan 22  2012 ims/
drwxrwxr-x  6 root cvsusers 4096 Nov  3  2011 map/
drwxrwxr-x  3 root cvsusers 4096 Nov  3  2011 nawk/
drwxr-xr-x  3 root cvsusers 4096 Oct  7  2009 nhpn/
drwxrwxr-x  5 root cvsusers 4096 Sep 25  2012 recipes/
drwxrwxr-x  9 root cvsusers 4096 Jun  4  2010 topics/
drwxrwxr-x  3 root cvsusers 4096 Jun 30  2012 utils/
That content is the CVSROOT directory and the project directories.

The CVSROOT directory looks like this:
Code:
ls -al /usr/local/cvsroot/CVSROOT
total 156
drwxrwxr-x  3 root cvsusers 4096 Oct 20  2012 ./
-rw-rw-r--  1 root cvsusers  495 Oct  7  2009 .#checkoutlist
-rw-rw-r--  1 root cvsusers  760 Oct  7  2009 .#commitinfo
-rw-rw-r--  1 root cvsusers 1302 Oct  7  2009 .#config
-rw-rw-r--  1 root cvsusers  602 Oct  7  2009 .#cvswrappers
-rw-rw-r--  1 root cvsusers 1025 Oct  7  2009 .#editinfo
-rw-rw-r--  1 root cvsusers 1141 Oct  7  2009 .#loginfo
-rw-rw-r--  1 root cvsusers 1087 Oct  7  2009 .#modules
-rw-rw-r--  1 root cvsusers  564 Oct  7  2009 .#notify
-rw-rw-r--  1 root cvsusers  649 Oct  7  2009 .#rcsinfo
-rw-rw-r--  1 root cvsusers  879 Oct  7  2009 .#taginfo
-rw-rw-r--  1 root cvsusers 1026 Oct  7  2009 .#verifymsg
drwxrwxr-x 13 root cvsusers 4096 Nov  3  2011 ../
drwxrwxr-x  2 root cvsusers 4096 Oct  7  2009 Emptydir/
-r--r--r--  1 root cvsusers  495 Oct  7  2009 checkoutlist
-r--r--r--  1 root cvsusers  696 Oct  7  2009 checkoutlist,v
-r--r--r--  1 root cvsusers  760 Oct  7  2009 commitinfo
-r--r--r--  1 root cvsusers  961 Oct  7  2009 commitinfo,v
-r--r--r--  1 root cvsusers 1302 Oct  7  2009 config
-r--r--r--  1 root cvsusers 1503 Oct  7  2009 config,v
-r--r--r--  1 root cvsusers  602 Oct  7  2009 cvswrappers
-r--r--r--  1 root cvsusers  803 Oct  7  2009 cvswrappers,v
-r--r--r--  1 root cvsusers 1025 Oct  7  2009 editinfo
-r--r--r--  1 root cvsusers 1226 Oct  7  2009 editinfo,v
-rw-rw-rw-  1 root cvsusers 7713 Oct 20  2012 history
-r--r--r--  1 root cvsusers 1141 Oct  7  2009 loginfo
-r--r--r--  1 root cvsusers 1342 Oct  7  2009 loginfo,v
-r--r--r--  1 root cvsusers 1087 Oct  7  2009 modules
-r--r--r--  1 root cvsusers 1288 Oct  7  2009 modules,v
-r--r--r--  1 root cvsusers  564 Oct  7  2009 notify
-r--r--r--  1 root cvsusers  765 Oct  7  2009 notify,v
-rw-r--r--  1 root cvsusers   62 Jun 19  2010 passwd
-r--r--r--  1 root cvsusers  649 Oct  7  2009 rcsinfo
-r--r--r--  1 root cvsusers  850 Oct  7  2009 rcsinfo,v
-r--r--r--  1 root cvsusers  879 Oct  7  2009 taginfo
-r--r--r--  1 root cvsusers 1080 Oct  7  2009 taginfo,v
-rw-rw-rw-  1 root cvsusers    0 Oct  7  2009 val-tags
-r--r--r--  1 root cvsusers 1026 Oct  7  2009 verifymsg
-r--r--r--  1 root cvsusers 1227 Oct  7  2009 verifymsg,v
Note the passwd file: all CVS users are required to use a password, not their log in password, a defined encrypted password to use CVS. You may not want to mess with that, but it is a layer of security to keep the unwashed out of project files (let me know if you want the password generator utility I use to create CVS user passwords). The passwd file contains
Code:
userid:encrypted_password
one line per authorized CVS user.

You will want the users to create a file in their home directory named .cvspass:
Code:
touch .cvspass
chmod 600 .cvspass
The first time they connect to CVS with the password function active they will be prompted for their password and it will be saved in their home directory .cvspass. The file mode is read-write for only the individual user (that's the 600 mask).

You will want to use the groupadd utility to create a group for CVS users. You will want to use the groupmod utility to add userids to that group (you can also directly edit /etc/group to add userid to the group line separated by colons).

Once added, you will want to change the user and group of all the files and directories
Code:
cd /usr/local/
chown -R root:cvsusers cvsroot
Of course, you have to be root to do any of the above (use su -, sudo or whatever floats your boat).

Assuming you're using the server setup, you should have it defined system-wide or on a per CVS user basis such that the environment variable looks like this:
Code:
echo ${CVSROOT}
:pserver:userid@fubar.lan:/usr/local/cvsroot
You would want to define that the individual user's home directory .profile file (better than system-wide) like so:
Code:
#	set up CVSROOT
CVSROOT=:pserver:${USER}@fubar.lan:/usr/local/cvsroot
export CVSROOT
fubar.lan is my LAN server, yours, of course, will vary.

I know it's a little complicated (it is actually documented in the CVS docs) but it does work. Just be careful because you're going to be working as root, so look at the man pages if you don't fully understand things like groups and make a back up file before you twiddle.

Hope this helps some.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to setup CVS server in Fedora11 and CVS client in Windows Xp? smh Linux - Networking 1 09-12-2009 05:07 AM
How to setup CVS server in Fedora11 and CVS client in Windows Xp? smh Linux - Server 1 09-12-2009 05:05 AM
How to setup CVS server in Fedora7 and CVS client in Windows Xp? yashavanth_kumar Linux - Newbie 2 01-28-2008 08:48 PM
CVS Server setup harisankar Linux - Software 0 08-06-2004 08:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration