Monday, November 24, 2008

How to add a CVS account

How to add a CVS account (example user jsmith):
log in to the linux box
su - root
cd /home (to see list of users)
/usr/sbin/useradd jsmith
vi /etc/group
Find the cvs line and append ,jsmith
:wq (save the group file)
vi /etc/passwd
Find jsmith at the end of the file, change its second number to match other cvs users (group number)
:wq (save the passwd file)
/usr/bin/passwd jsmith
Enter new password

How to remove a CVS account (example user jsmith):
/usr/sbin/userdel jsmith
vi /etc/group
Delete jsmith line and ensure jsmith is removed from cvs line
:wq (save the group file)
vi /etc/passwd
Ensure jsmith line is deleted


Variation for Solaris:

1. mkdir -p /export/home/jsmith (Create the home directory for the user, before creating the user)
2. useradd -s /bin/sh -d /export/home/jsmith jsmith (Default shell will be sh. Home directory will be in /export/home)
3. chown -R jsmith /export/home/jsmith (Let the user own his home directory)
4. passwd jsmith (Change the password)

Followers