Most commands are setup to support both administration of a local CVS password file and remote access using the cvsuserd daemon
(discussed below). Local access must normally be forced using the switch local <path> which directs cvsuser to modify
the password file located at /CVSROOT/passwd as well as the readers and writers file and other files maintained by
cvsuser/cvsuserd. The cvsroot <cvsroot_string> switch commands cvsuser to modify files at the remote server specified
by the cvsroot string. The format of the CVSROOT string should match that of the $CVSROOT environment variable used by CVS,
including the leading :pserver:. The login <password> switch may optionally be used to specify the login password.
the port <port> switch may be used to force cvsuser to use a port other port 2402. The login and port switches are only
accepted when communicating with a remote cvsuserd daemon. If neither the cvsroot switch nor the local switch is specified on
the command line, cvsuser will look for the $CVSROOT environment variable. If this variable is defined, cvsuser will use this
environment variable to determine the location of a remote cvsuserd daemon. If this environment variable is not specified, then
cvsuser will look for an CVS archive at /home/cvs.
The common switches cvsroot, local, and login may use any of the substitutions listed:
cvsroot: | -d | --cvsroot |
local: | -z | --local |
login: | -g | --login |
port: | -t | --port |
Note that local access to a CVS archive using cvsuser while the cvsuserd daemon is managing this same archive will cause
unpredictable results. This issue can be circumvented by using the remote access feature with the hostname localhost.
cvsuser switches may be specified in any order and may precede or follow the command. This allows for automatic inclusion
of switches on the command line using the bash alias command within the .bashrc login script.
cvsuser/cvsuserd supports 5 basic commands:
cvsuser add
The add command adds users to the CVS password file. Users may be added with administrator access rights, developer
access rights, or restricted access rights. Administrator access rights allows a user to add and remove users at will,
list all the users in the password file and change any user's password. Developer access rights allows a user to change
his/her password only. Restricted access (neither administrator or developer) has no access to the CVS password file.
Users may be given read-only or read-write access rights using the readonly or writable switches on the command line. If
not specified, read-only access is assumed (unless the default is changed in defaults.h) To provide fine control of access
rights, the user's system account may be specified using the account switch. The password switch may be used to specify
the new user's login password. If no specified, cvsuser will prompt for a password unless the nopassword switch is
specified. Note that the nopassword switch is provided primarily to setup anonymous accounts and is disable when
accessing a remote cvsuserd daemon.
cvsuser add <user> [ readonly | writable ]
[ developer | administrator ]
[ account <system account> ]
[ password <password> | nopassword ]
[ cvsroot <cvsroot string> [ login <login password ] |
[ port <port> ] | local <archive path> ]
Each switch may use any of the substitutes listed if desired:
add: | -a | --add |
readonly: | -o | --readonly | read_only | --read_only |
writable: | -w | --writable | writeable | --writeable |
developer: | -e | --developer |
account: | -s | --account | system_account | sysaccount | --sysaccount | --system_account |
password: | -p | --password | pw | --pw |
nopassword: | -np | --no_password | no_password | --no_password | nopw | --nopw | no_pw | --no_pw |
cvsuser change
The change command changes a user's CVS login password in the CVS password file. At this time, no other user parameters
can be changed. Administrators can change any user's password while developers are only allowed to change their
password. The nopassword switch is only accepted when modifying a local CVS password file.
cvsuser change <user> [ password <password> | nopassword ]
[ cvsroot <cvsroot string> [ login <login password ] |
[ port <port> ] | local <archive path> ]
Each switch may use any of the substitutes listed if desired:
password: | -p | --password | pw | --pw |
nopassword: | -np | --no_password | no_password | --no_password | nopw | --nopw | no_pw | --no_pw |
cvsuser help
This command displays a short list of supported commands and their optional switches. No other action is performed.
cvsuser help
Each switch may use any of the substitutes listed if desired:
cvsuser list
The list command generates a list of users, their access rights, system account and read-only/read-write status.
Below is an example output showing the format:
Connected to www.hackerworld.org.
-----------------------------------------------------------
administrator cvsadmin writeable administrator
anonymous cvs read-only restricted
joevoncoder cvs writeable developer
paulhsmith cvs writeable developer
Command syntax is:
cvsuser list [ cvsroot <cvsroot string> [ login <login password ] |
[ port <port> ] | local <archive path> ]
cvsuser remove
The remove command removes a user from the CVS password file (any any other associated files).
cvsuser remove <user> [ cvsroot <cvsroot string> [ login <login password ] |
[ port <port> ] | local <archive path> ]
Private Key
cvsuser/cvsuserd use a weak encryption scheme (although its much stronger than that used by CVS itself) to
encrypt commands sent by the cvsuser client to the cvsuserd daemon and the generated reply. This encryption
scheme requires a private key which must be stored in the file .cvsuser in the user's home directory. This
file contains a list of cvsroot strings followed by the key for the server. Note that the key starts at the
first non-space character and ends at the end of line and therefore may inadvertantly be wrong due to trailing
spaces, tabs, etc. All lines beginning with an pound sign are comments and are ignored. Below is an example
file. Spaces before the cvsroot string and pound-sign are ignored.
#
# This is the cvsuser key file, which should be placed in the
# user's home directory using the name ".cvsuser". Note to be careful
# about tabs or trailing whitespace at the end of the key as these characters
# are included in the key.
#
:pserver:Ralph@hackerworld.org:/home/cvs This is the key for hackerworld
:pserver:Ralph@nobleeffort.com:/cvs Yet another private key
:pserver:Ralph@futileeffort.com:/cvsroot And even another private key
Examples
To add an administrator account for the user admin to a local archive with the password Pizza, you would
use the following command:
cvsuser add admin password Pizza administrator writable account cvsadmin local /home/cvs
To change the current password for Tom on the server pointed to by the current $CVSROOT environment variable
the command would be:
cvsuser change Tom
For user admin with password "password123" to remove user "Tom" from a CVS archive at hackerworld.org with a
CVS directory set to /home/cvs, the command would be:
cvsuser remove Tom cvsroot :pserver:admin@hackerworld.org:/home/cvs login password123
|