(2) init cvs repository
a. create repository root directory /usr/local/cvs-repository
b. create a Solaris system user/group as: cvs/cvs
c. grant ownership of /usr/local/cvs-repository to Solaris user/group cvs/cvs
d. cvs -d /usr/local/cvs-repository init
This will create repository CVSROOT under /usr/local/cvs-repository
(3) create cvs user/password
a. create a password file as "passwd" under CVSROOT directory
b. user pl file below to create encoded password for cvs user
c. assign password to solaris user "cvs"
The CVS password file is CVSROOT/passwd in the repository. It was not
created by default when you ran cvs init, because CVS doesn't know for
sure that you'll be using pserver. Even if the password file had been
created, CVS would have no way of knowing what usernames and passwords
to create. So, you'll have to create one yourself; here's a sample
CVSRoot/passwd file:
Here is the perl script to generate encoded password
#!/usr/bin/perl
srand (time());
my $randletter = "(int (rand (26)) + (int (rand (1) + .5) % 2 ? 65 : 97))";
my $salt = sprintf ("%c%c", eval $randletter, eval $randletter);
my $plaintext = shift;
my $crypttext = crypt ($plaintext, $salt);
print "${crypttext}\n";
I keep the preceding script in /usr/local/bin/pass.pl:
pass.pl "passwd"
output : Urmh23wFp1aOs
Then use the output passwd adding line in CVSROOT/passwd file
cvs:Urmh23wFp1aOs:cvs
(Here we create cvs user and solaris user same as "cvs")
The format is as simple as it looks. Each line is:
c. in the /etc/inetd.conf add one line as
cvspserver stream tcp nowait root /opt/sfw/bin/cvs cvs --allow-root=/usr/local/cvs-repository pserver
d. On Solaris 10 inetd.conf change does not take effect other than SFM service profile.
using "inetconv" command to convert the inetd.conf as /var/svc/manifest/network/rpc/100235_1-rpc_ticotsord.xml
In addition, add online in /etc/services to give permission
cvspserver 2401/tcp
e. this service file will be auto started by SFM daemon
f. verify pserver service is started
# svcs | grep cvs
online 14:18:27 svc:/network/cvspserver/tcp:default
g. use login test
cvs -d :pserver:cvs@
No comments:
Post a Comment